Resolve
Run a linear resolve loop for findings closure.
Input Schema
{
"findings_source": "required path or explicit list",
"target_scope": "required path/module",
"done_when": "critical/high findings are either fixed or explicitly unresolved"
}
Workflow (Exact Commands)
-
Create run directory.
TS=$(date -u +%Y-%m-%dT%H-%M-%SZ) OUT_DIR=".reports/codex/resolve/$TS" mkdir -p "$OUT_DIR" -
Validate and copy findings source.
cp "$FINDINGS_SOURCE" "$OUT_DIR/findings-input.txt" -
Apply fixes in priority order:
critical->high->medium. -
Run shared quality gates.
.codex/skills/_shared/run-gates.sh \ --out "$OUT_DIR" \ --lint "${LINT_CMD:-uv run --no-sync ruff check .}" \ --format "${FORMAT_CMD:-uv run --no-sync ruff format --check .}" \ --types "${TYPES_CMD:-uv run --no-sync mypy src/}" \ --tests "${TESTS_CMD:-uv run --no-sync pytest -q}" \ --review "${REVIEW_CMD:-git diff --check}" -
Write unresolved findings to
$OUT_DIR/unresolved.txt. -
Write mandatory result artifact.
.codex/skills/_shared/write-result.sh \ --out "$OUT_DIR/result.json" \ --status "$STATUS" \ --checks-run "lint,format,types,tests,review" \ --checks-failed "$CHECKS_FAILED" \ --critical "$CRITICAL" \ --high "$HIGH" \ --medium "$MEDIUM" \ --low "$LOW" \ --confidence "$CONFIDENCE" \ --artifact-path "$OUT_DIR/result.json"
Fail-fast Rules
- Missing findings source => fail.
- Shared gate script missing => fail.
- Critical unresolved findings => fail.
- Result artifact missing => fail.
Output Contract
Use shared gate schema from ../_shared/quality-gates.md.
Minimum artifact payload:
{
"status": "pass|fail",
"checks_run": [
"lint",
"format",
"types",
"tests",
"review"
],
"checks_failed": [],
"findings": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0
},
"confidence": 0.0,
"artifact_path": ".reports/codex/resolve/<timestamp>/result.json"
}