Let the programmer escalate a test defect from a gate-sourced node #890
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
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
rule-proposal
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#890
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?
Problem
A test defect that shows only after production code exists burns the programmer-repair bound. Programmers may not edit tests, and a gate-sourced node ignores any agent verdict, so the programmer can only retry until the bound is spent.
Observed
In #873 implementation 5, every test first raised
KeyError: key not found: "implementation-map-update"atcontroller/boot/commands.rb:54. That was the intended missing seam, so test-reviewer passed correctly. After the programmer built the command,run_cli_okintests/support/subagent_start_cli.rblackedstdin:. Dispatches 34-36 spent the repair bound and escalatedbound_exhausted:programmer-repair/fail.In #880 implementation 2, test-reviewer saw
Errno::ENOENTfor the drafted map, which was also the intended missing behavior. After production code,Brief#composeraisedNoMethodError: undefined method 'fact' for an instance of OsSdlc::BriefDraftedMapTest::Facts(presenter/brief.rb:51). Three programmer-repair dispatches could not fix it.In both runs the defect could not show at test-review time.
programmer.mdsays "If a test appears wrong, disclose that fact but leave the test unchanged".CompletionIntake#verdict_outcomeignores agent verdicts on gate-sourced nodes, so that disclosure routes nowhere.Reproduce
n/a: process defect in past runs; see #873 implementation 5 and #880 implementation 2.
Approach
Let the programmer end its repair loop on a test defect with the existing
escalateverdict (ADR-0258 decision 2: downstream agents escalate). On a gate-sourced node,CompletionIntake#verdict_outcometakesescalatefrom the handoff content when present. Any other agent verdict on a gate-sourced node is ignored, so an agent cannot pass a red gate. The run goes toneeds-orchestrator, and the orchestrator hand-fixes the test under the escalation procedure. The test-reviewer brief does not change: both triggers were red for the intended reason at review time.HandoffContentalready accepts an optional verdict when the verdict is not required.Required work:
verdict: escalateinplugins/os-sdlc/agents/programmer.mdIf a test appears wrong, disclose that fact but leave the test unchangedinplugins/os-sdlc/agents/programmer.mdfield. The gates determine the result.inplugins/os-sdlc/agents/programmer.mdgate, the handoff may carryverdict: escalate, and only that value. When it is present, CompletionIntake recordsescalateas the dispatch verdict, whatever the gate recorded and whether or not the gate ran. The run then follows the node'sescalateedge. Any other handoff verdict on a gate-sourced node is ignored. Agents still cannot author pass, fail or error on gated nodes. The gate step results stay the record of the gate classification (ADR-0248)." — check: presentAgents still cannot author pass, fail or error on gated nodesindocs/adr/*.mdverdict: escalateon gate-sourced nodes in/home/jared/dev/cc-os/plugins/os-sdlc/reference/handoff-artifact-format.md(line 31) — check: absentnever expects ainplugins/os-sdlc/reference/handoff-artifact-format.md/home/jared/dev/cc-os/plugins/os-sdlc/references/escalation-procedure.md(line 3) — check: presenttest defectinplugins/os-sdlc/references/escalation-procedure.mdAcceptance criteria
verdict: escalateand a disclosure that names the test defect, then the dispatch verdict isescalateand the run's position isneeds-orchestrator.verdict: escalate, then the dispatch verdict isescalate(not agate_skiperror), nogate_skipstep result is recorded, and the run's position isneeds-orchestrator.verdict: pass, then the dispatch verdict isfailand the run routes to programmer-repair.passand the run routes to behavior-verifier.Owner sketch
Origin
run_cli_okstdin:, reopened as implementation 6Found during #873. Approach revised 2026-10-02 after the predicted-ruling review (see comment).
More evidence (2026-10-01, #878 implementation 11): test-reviewer passed plugins/os-sdlc/tests/controller/implementation/change_auditor_reroute_test.rb on round 2 (dispatch 74) although its helper stop_change_auditor sent subagent-stop without a dispatch_id and never called next session-1, so no implementation could route the run. The reviewer prompt told it to run the file and check helper validity. Two programmer dispatches (75, 76) were spent before the programmer named the defect. Hand-fixed in
5125c6b5; reopened as implementation 12, which completed (a99c06fb).PREDICTED RULING: REVISE
a. No. The brief edit would not be accepted.
b. Reasons:
c. The user would call it lazy because the clause does not stop its own trigger. In #873 the KeyError came from controller/boot/commands.rb:54, the intended missing seam. In #880 the reviewer saw Errno::ENOENT, the intended behavior. Both defects showed only after production code existed. Then the programmer, which may not edit tests and whose agent verdict CompletionIntake#verdict_outcome ignores, used up programmer-repair. Research done: TestReport, CompletionIntake, programmer.md, the maps, ADR-0211 and ADR-0258, and the #873 and #880 transcripts.
d. Approach: on gate-sourced nodes, CompletionIntake accepts only the existing
escalateverdict from the handoff. programmer.md tells the programmer to escalate on a test defect, and the orchestrator hand-fixes the test (escalation procedure step 4). This stays inside ADR-0258 decision 2: downstream agents escalate. The body is edited to match.e. Not read: the tests that pin how gate nodes treat agent verdicts, and ADR-0133. ADR-0135 says handoffs carry a verdict "where the node's verdict source is agent". HandoffContent already accepts an optional verdict. If the user reads ADR-0135 as exclusive, it needs a clarifying amendment.
Require test-reviewer to confirm tests reach production codeto Let the programmer escalate a test defect from a gate-sourced nodeWork started on branch ticket-890 through /os-sdlc:implement (poodr-ticket-implementation map). ADR-0269 (amends ADR-0141, ADR-0134, ADR-0135) committed on the branch.
Resolution
Done: On a gate-sourced node a handoff verdict: escalate now becomes the dispatch verdict (gate ran or not) and the run follows the escalate edge; other agent verdicts stay ignored. programmer.md tells the programmer to escalate a defective test. HandoffContent verdict set now comes from Verdict::ALL. handoff-artifact-format.md and escalation-procedure.md updated. ADR-0269 amends ADR-0141/0134/0135; decided autonomously in an AFK run, awaiting the user's ruling.
Evidence: Implementation 23 complete, 13 dispatches, one test-reviewer and one contract-auditor fail each fixed in-run, suite gate exit 0 twice. New test tests/pipeline/cli_subagent_stop_gate_escalation_test.rb covers gate-fail escalate, ungated escalate, and two regression guards. Commits
5f0ffe85(ADR-0269),25d69c3c,4dc28101on main.Follow-ups: none
os-sdlc project-config --helptreats --help as a project name and writes .sdlc/project.yaml #860