Gate unexpected-pass settles verdict escalate, routing to the orchestrator escalation terminal #523
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#523
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
On #510 run 3, the test-writer node looped to bound_exhausted:test-writer/fail and killed the run because the test gate (expect: red) scored a green-on-arrival test as verdict fail — the behavior had already shipped, so red was impossible. The node's escalate: edge (validated by #513) sat unused because no gate path ever emits escalate. Decided with the user 2026-08-27: an unexpected pass settles verdict escalate on first occurrence, riding the existing escalate edge to the needs-orchestrator terminal so the orchestrator resolves it in-session; human escalation stays a last resort. Amends ADR-0147 (per-gate expect + red classifier).
Tasks
Acceptance criteria
Origin
Work started. Branch: ticket-523. Built directly (TDD agent), not via the os-sdlc pipeline, since the pipeline exhibits this very bug on greenfield/unexpected-pass shapes.
Resolution
Done: Gate unexpected-pass now settles verdict escalate: GateVerdict emits escalate when the red classifier yields :unexpected_pass (first occurrence, no fail-edge spend); routing rides the node's existing escalate: edge to the needs-orchestrator terminal; escalation reason names the cause unexpected_pass:/ via RoutingApplier::UnexpectedPassReason so the orchestrator acts on the payload alone. ADR-0158 records the decision (amends ADR-0147); history row added.
Evidence: Merged to main:
0ce1296(feat),a3daaf0(ADR-0158 + history row). New integration test test_an_expect_red_gate_unexpected_pass_escalates_on_the_first_occurrence asserts payload type escalation, reason unexpected_pass:start/test, and zero fail-edge spends; red-for-right-reason and expect:green tests untouched and green. Suite on main after merge: 1227 runs, 0 failures. Rubocop: zero offenses on changed production files.Follow-ups: Surface unexpected_pass explicitly in the immediate agent-facing gate reply (GateReply/GateHandoff), not just the escalation payload — minor, unticketed by choice: the escalation path already carries the cause. Option-2 complement (local bound exhaustion preferring escalate: when the node has one) deliberately not built per ADR-0158 alternatives. No other follow-ups.