Fail the paid eval fast when the route contract is not attached #229

Merged
weichen merged 2 commits from feature/fast-slow-o2-p1-eval-contract-failfast into main 2026-10-20 12:08:59 +00:00
Owner

Why: The O2 P1 paid A01 run must not silently run without the route contract. Today, if the protected route file configures routeContractEOF but production's rule (runtime.RouteContractFor) does not attach it (wrong digest, model or base URL), the eval runs on the legacy [DONE] path and wastes the paid budget.

Evidence: Change is test-only under build tag live. Implemented by agent-exec unit o2-p1b-eval-contract-failfast (cursor, fresh rerun authorized after a pre-start Cannot use this model: auto failed-unknown with zero changes). Host checks on ddb6e29: gofmt -l internal/server empty; go vet -tags live ./internal/server and go vet ./internal/server pass; go test -tags live -run TestEvalRouteContract ./internal/server ok. CI (SQLite, untagged) is authoritative for the default build.

Impact: In model mode, TestServeWorkCheckpointEval now fails with the fixed message "route contract configured but not attached" (no config values) before any provider stream is created. Routes without routeContractEOF are unchanged. No production code changes.

Refs: Dev plan docs/superpowers/plans/2026-10-19-fast-slow-o2-route-contract-eof-plan.md §5 P1; approved P1 resource proposal (sha256 03f401b4…).

Why: The O2 P1 paid A01 run must not silently run without the route contract. Today, if the protected route file configures `routeContractEOF` but production's rule (`runtime.RouteContractFor`) does not attach it (wrong digest, model or base URL), the eval runs on the legacy `[DONE]` path and wastes the paid budget. Evidence: Change is test-only under build tag `live`. Implemented by agent-exec unit `o2-p1b-eval-contract-failfast` (cursor, fresh rerun authorized after a pre-start `Cannot use this model: auto` failed-unknown with zero changes). Host checks on ddb6e29: `gofmt -l internal/server` empty; `go vet -tags live ./internal/server` and `go vet ./internal/server` pass; `go test -tags live -run TestEvalRouteContract ./internal/server` ok. CI (SQLite, untagged) is authoritative for the default build. Impact: In model mode, `TestServeWorkCheckpointEval` now fails with the fixed message "route contract configured but not attached" (no config values) before any provider stream is created. Routes without `routeContractEOF` are unchanged. No production code changes. Refs: Dev plan docs/superpowers/plans/2026-10-19-fast-slow-o2-route-contract-eof-plan.md §5 P1; approved P1 resource proposal (sha256 03f401b4…).
weichen added 1 commit 2026-10-20 12:02:17 +00:00
agent-exec transport 8b42e6435f6b297a2cdf67ab43c40db3/a83f1be549ed
governance / governance (pull_request) Successful in 20s
ci / vet-and-test (pull_request) Successful in 1m29s
ddb6e293b2
weichen added 1 commit 2026-10-20 12:04:32 +00:00
Merge remote-tracking branch 'origin/main' into feature/fast-slow-o2-p1-eval-contract-failfast
governance / governance (pull_request) Successful in 20s
ci / vet-and-test (pull_request) Successful in 1m31s
43575816e5
weichen merged commit 74e5396861 into main 2026-10-20 12:08:59 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#229