altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

Verification gate: pluggable deterministic checks as escalation trigger

Open anandgupta42 opened this issue 3 months ago • 2 comments

Parent: #1134

The escalation trigger is deterministic verification, not model self-report:

  • Define a verify_gate interface: named checks that return pass/fail + a machine-readable reason. v1 checks: project build succeeds; declared data tests pass; schema-contract diff (written models/columns match the task's declared contract when one exists).
  • Gate runs identically after primary AND escalation attempts (measurement needs both lanes' outcomes).
  • Configurable per project: route.gate: [build, tests, contract]; sensible defaults; a check that cannot run (e.g. no tests declared) reports "skipped", never blocks.
  • Gate results are part of the session record (consumed by measurement subtask).
  • Tests: each check's pass/fail/skipped paths; gate composition; failure-reason payloads.

anandgupta42 avatar Aug 24 '26 17:08 anandgupta42

Evidence note from the prior-art research (parent #1134): gate discriminativeness is an ongoing investment, not a one-time checkbox — CHASE-SQL's execution selector captures only part of the oracle headroom (73.01% vs 82.79% oracle, arxiv.org/html/2410.01943v1) and TestPrune shows improving test quality on an already-gated pipeline adds +2.4 to +12.9pts (arxiv.org/html/2510.18270v2). The gate interface must make adding/refining checks cheap. Also: prefer project-declared tests over model-generated ones — the literature's verifier-gaming failure mode applies to self-generated checks.

anandgupta42 avatar Aug 24 '26 17:08 anandgupta42

Closing: after evaluating verifier-gated and cascade routing, we decided not to build an inferred per-request router. The direction is a strong default model with explicit, user-chosen modes. Reopen if routing is revisited.

anandgupta42 avatar Nov 05 '26 21:11 anandgupta42