Skip to content

Verdict output contract is fragile: no structured-output path, unbounded reasoning, degradations warned once per run across a fan-out #1787

Description

@macanderson

Problem

Three related robustness gaps in the verdict call's I/O (crates/stella-pipeline/src/verify.rs::parse_verifier_response, pipeline/verifier_stage.rs):

  1. First-non-empty-line protocol vs reasoning models. A verifier that opens with "Here is my assessment:" yields no token → heuristic_fallback, silently converting every verdict from that model into the heuristic (which fails anything without green touched tests). The goal verifier already asks for JSON (stella-core/src/goal.rs); the pipeline verdict has no structured path. Consider a provider-parity-aware forced tool-call/JSON mode (invariant 8: declare the posture per provider, with witness tests), falling back to the token protocol where unsupported. Negation handling shipped separately; this issue is about the protocol itself.
  2. Verdict::reasoning is the whole response, unbounded — it flows into the worker's revision prompt and the verdict cache. Bound it (the disclosure ladder already caps what crosses to the worker; the cap should be structural).
  3. Degradation warnings are once-per-run AtomicBools (verifier_stage.rs::warn_verifier_fallback) — a best-of-N fan-out reports one caveat for N candidates, and nothing records WHICH candidates degraded. Consider per-candidate proof steps instead of (or besides) the one warning.

Also worth folding in: the trusted evidence summary has no length bound (oracle_trace grows per observation; the diff has a token budget, the trusted zone does not) — pipeline/evidence.rs since the extraction.

Verify

Each sub-fix carries its own witness: (1) a scripted verifier replying with a preamble line parses to a real verdict under the structured path; (2) a 100KB reply does not land 100KB in the revision prompt; (3) a two-candidate fan-out with a dead verifier records two degradation facts.

Related

#1483/#1501 (timeout vs fallback), the 46%-agreement measurement cited at verify.rs (asymmetric trust), #1284 (turn the independent checker on and measure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important — next in linearea:pipelinestella-pipeline — triage→…→judge orchestration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions