Back to Engineering Blog
AI Development 5 min read

Fail Closed, Never Quietly Partial

A reviewer read 23,000 characters of a 234,000-character prompt and said 'incomplete', and our pipeline counted that as a finished review. How we closed the gap.

Jason NevillBy , Houston, TX
#AI-Logos#Reliability#FailClosed#PeerReview

Key Architectural Takeaways

  • A reviewer that could read only a tenth of an oversized prompt returned INCOMPLETE, and the pipeline published it as a completed review.
  • Oversized prompts are now declined before any model call, so no credits are spent and another reviewer takes the job.
  • Only an explicit approve or request-changes verdict is ever published.

What happened

Our metered fallback reviewer, after a fix to a stall problem, could only read what the first read of its temporary prompt file returned. On one large pull request that was 23,168 characters of a 234,728-character prompt. It answered VERDICT: INCOMPLETE. The dispatcher published that as a review, counted the reviewer as having completed, and the scorecard became non-approving, which blocked the pre-merge gate.

Two fixes

  1. Decline early. Prompts over a set limit (22,000 characters; the largest one that had worked was about 17,000) now raise a budget error before any model call. The job is marked escalated instead of failed, so the picker chooses another reviewer and no credits are spent.
  2. Publish decisively. Only an explicit approve or request-changes verdict is published. Anything else is escalated, and doesn't bench the reviewer, because it wasn't a provider failure.

What it means in practice

The fallback reviews the small pull requests, which is most of the small fix PRs, and declines the large ones, which the other reviewers cover. Each tool is used where it's strong.

The general rule

A system that returns a partial answer and calls it a result is worse than one that says it can't answer. For every new stage of the pipeline we ask: what happens when this stage can only do part of the job? The answer should be 'it says so, and something else takes over'.

Takeaway

Make 'I couldn't do this' a first-class, non-failing outcome.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.