Repository navigation
fix(coding-loop): never report an unrun reviewer as an approval - #178
Conversation
When the code reviewer raised (timeout, provider error, malformed
response) the coding loop synthesised {"approved": True} and counted
the issue as COMPLETED. The build then reported work as reviewed when no
review had happened, and the flagged QA+review path fed the failure text
to the synthesizer as if it were a real result (an observed QA timeout
was read as "no real test failures" and approved).
Treat an infrastructure failure as 'unavailable' rather than as a
verdict: mark the result with review_unavailable / qa_unavailable, and
accept the coder's output as COMPLETED_WITH_DEBT instead of COMPLETED.
Failing with no file changes remains FAILED_UNRECOVERABLE. The
synthesizer prompt now says explicitly that an unavailable agent is not
evidence of failure or approval.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6267515e60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…run-reviewer fallback Conflicts with main's reviewer-outage blocker carry-forward and iteration history keys resolved as unions: a previously blocking review is still carried forward, otherwise an unrun reviewer is marked review_unavailable. Takeover fixes, each never worse than main: - Flagged path, synthesizer down: accept with debt only when QA really passed. A real QA failure, or QA also unavailable, keeps main's fix fallback (the Codex P1 finding). Drop the loosening that approved cleanly on an unrun QA. - approve_with_debt always records a review_unavailable debt item, as the COMPLETED_WITH_DEBT invariant in _debt_items_from_review requires. - A no-change result with an unrun reviewer stays COMPLETED_WITH_DEBT instead of becoming FAILED_UNRECOVERABLE (main completed it). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y the debt decision on resume The adversarial pass on the landing tree found the unrun-reviewer fix only covered an RPC failure; the reviewer reasoner itself still returned approved=True when its harness raised or produced nothing, which is how a reviewer outage really shows up. - run_code_reviewer reports an outage as approved=False, blocking=False, review_unavailable=True (added after model_dump so the agent's output schema is unchanged); run_qa reports qa_unavailable=True so the synthesizer prompt stops reading it as failing tests. - run_qa_synthesizer's local fallback treats an unavailable reviewer with passing QA like the previous approve (the loop records it as debt) instead of falling to fix, which main completed and this branch would have failed. - A reviewer outage never erases the previous iteration's blocking finding on the default path, whether the call raised or the reasoner reported it. - A checkpointed approve_with_debt decision replays as COMPLETED_WITH_DEBT with its debt item when the iteration window was already exhausted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…clean completion test_takeover_regressions pinned the old fail-open outcome (COMPLETED) for a reviewer that never ran. The outcome is now COMPLETED_WITH_DEBT with a review_unavailable debt item; the branch is still accepted and merged, only the trust record changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…proval nor objection With passing QA and a reviewer outage, the synthesizer used to see an approved review and approve. Telling it "approval is unknown" invited a BLOCK or FIX main would never have produced. Say instead that nothing was objected to, to decide on QA and the code, and that an APPROVE is recorded as debt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Took this over: merged main (conflicts in coding_loop.py with the escalation work, resolved so a previous blocking review still survives a reviewer outage) and pushed a few commits.
|
Summary
run_code_reviewer/run_qais now recorded as unavailable (review_unavailable/qa_unavailable) instead of being turned into a verdict.COMPLETED_WITH_DEBTwhen the reviewer never ran, rather thanCOMPLETED. With no file changes the issue still fails asFAILED_UNRECOVERABLE.Why:
_run_default_pathused to substitute{"approved": True}on any reviewer exception, so a timeout or provider error was indistinguishable from a clean review. In a real 35-issue build a QA timeout was read by the synthesizer as "no real test failures" and the issue was approved. Full evidence: #175.Fixes #175
Validation
.venv/bin/python -m pytest tests/ -q): 2214 passed, 1 skipped on this branch (the equivalentmake checkwas not run verbatim).tests/test_coding_loop.py:COMPLETED_WITH_DEBT,review_unavailableiniteration_history, no clean approval;FAILED_UNRECOVERABLE;approvebut reviewer was unavailable → stillCOMPLETED_WITH_DEBT;COMPLETED.Behavior Impact
An issue whose reviewer failed is now reported as
COMPLETED_WITH_DEBTinstead ofCOMPLETED, so it is visible in the build's debt accounting. Unverified code is also no longer written to the shared-memory convention store. Builds that never hit a reviewer failure are unchanged.Notes
review_unavailable/qa_unavailableare additive keys in the agent result dicts, so existing consumers keep working.fix/block; only anapproveit emits without a reviewer verdict is downgraded to debt.