Skip to content

R23

What to build

A failed attempted judge whose retry is budget-blocked returns valid partial evidence.

Source and evidence

Repository scientific/architectural review, snapshot 86c8517, item R23. Classification: confirmed defect; medium severity.

When an attempted judge call fails and its retry cannot reserve budget, the result is marked budget-exhausted with one attempt. Evidence counts neither a completed call nor an error for that result, and derives zero retries. Its count invariant then rejects the evidence: one attempted request cannot reconcile with zero completed, error, and retry counts.

The retained probe uses one request, max_requests=1, max_retries=1, and a judge that raises RuntimeError. Execution raises ValueError with “LLM judge attempt and retry counts do not reconcile” instead of returning partial budget evidence.

Acceptance criteria

  • [ ] One request with max_requests=1/max_retries=1 and a failing judge returns evidence rather than an accounting ValueError.
  • [ ] Attempt, unit and cost exhaustion distinguish never-started requests from attempted failures with refused retries.
  • [ ] Attempted/completed/error/retry/budget totals conserve every invocation and serialize successfully.
  • [ ] No extra provider call starts after a refused reservation; actual usage remains unknown when not reported.
  • [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
  • [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.

Design guidance

Model terminal outcomes separately from next-attempt admission. A retry refusal must not erase the preceding failed attempt; derive aggregate counters from an explicit attempt ledger/state.

Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.

Blocked by

None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.

Verification scope

Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.