fix-bounded-eval-evidence-sufficiency

Fail bounded evaluation closed on insufficient evidence

Metadata

Statusdone
Assignedagent-941
Modelpi:openai-codex:gpt-5.6-sol
Created2026-07-30T21:26:45.535683673+00:00
Started2026-07-31T06:44:59.137406844+00:00
Completed2026-07-31T07:05:15.081268052+00:00
Tagsevaluation, safety, candidate, regression
Tokens22959671 in / 42484 out

Description

Current source exposes a structural evidence-sufficiency bug in the dedicated bounded evaluation lane. BoundedCapabilities::no_authority() correctly sets worktree=false, but EvidenceManifest::artifact_diff_summary primarily carries declared artifact strings plus candidate/delta manifest paths, sizes, and hashes; it does not provide a full candidate checkout and may not provide changed file contents. The prompt nevertheless forces a closed pass|fail semantic verdict. A bounded model can therefore reject a valid coding/structural candidate merely because required evidence was absent from its automatically generated manifest. Users/agents must not be required to hand-curate manifest entries. Deep read-only FLIP already materializes the exact immutable candidate commit into its observation-only repository bundle; preserve that boundary and never expose the mutable/live worker worktree.

Implement an explicit evidence-sufficiency contract. Before invoking or consuming a bounded verdict, deterministically decide whether the bounded bundle can support the selected policy/task class. Extend the bounded response/protocol if needed so the evaluator can return insufficient_evidence as a structured non-semantic outcome. Missing/truncated/unreadable required candidate, delta, validation, declared artifact, or source evidence must become EvidenceUnavailable/InsufficientEvidence infrastructure state, never AcceptanceRejected, never source retry/reopen, and never a score averaged with or used to unlock required deep FLIP. Retain the immutable candidate in AwaitingAcceptance/PendingEval and consume only the bounded evaluation retry budget. Surface bounded diagnostics naming safe evidence IDs/categories rather than attacker-controlled text. Permit deterministic rebundling/evidence-locator expansion within budgets or route the decision to the already-required deep read-only FLIP; do not silently waive required evaluation and do not fall back across executors/models.

Keep bounded grading secondary/advisory under the FLIP-first policy. If bounded evidence is sufficient, existing exact candidate/route binding and pass/fail semantics remain. If the task is coding/structural and semantic correctness requires source context beyond bounded evidence, bounded must not be a required rejection authority. Manifest construction remains automatic from immutable candidate/finalization/validation/dependency records. Never mount the source worktree or use mutable main as evaluator input.

Validation

  • Add a regression candidate whose correctness depends on changed source bytes absent from a deliberately bounded/truncated manifest; assert bounded evaluation records insufficient/unavailable and cannot emit AcceptanceRejected or fail/retry the source.
  • Assert candidate bytes, source generation/attempt, and AwaitingAcceptance state remain unchanged across bounded infrastructure retries/exhaustion.
  • Assert deep FLIP receives a read-only materialization of the exact candidate commit and can decide independently.
  • Assert a genuinely sufficient bounded manifest can still produce candidate-bound advisory/pass/fail evidence without diluting required FLIP.
  • Run focused evaluation/finalization/lifecycle tests, relevant smoke scenarios, cargo fmt --check, and cargo clippy.
  • Document the bounded-vs-deep evidence boundary and operator-visible insufficient-evidence state.

Depends on

Required by

Log