Run each Required work check: command as a deterministic required-work gate #814
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#814
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
No deterministic gate checks a ticket's
Required worklist. The change-auditor copies eachcheck:command into aWORK:line as text (agents/change-auditor.md:49). No gate or agent runs the command. Only the contract-auditor compares the diff with the work list, and it runs aftersuite-check. When a node before it escalates, or a hand-finish skips it, nothing checks the required work.plugins/os-sdlc/CLAUDE.mdputs every pass/fail decision in tested Ruby, not in prompts.In #808, implementation 67, this happened:
check: grep -rnE "RedTests|..." plugins/os-sdlc/lib prints nothingThe behavior-verifier did what its charter says (
agents/behavior-verifier.md:17: "AWORK:item missing from the diff is aGAP:item, not a verdict change").suite-checkthen failed on the time limit (#813), and the run escalated before the contract-auditor ran.Reproduce
n/a: design ticket. Evidence is implementation 67 on #808.
Approach
Add a
required-workcheck to the existing suite-check gate call. The suite-check agent still runsos-sdlc-gate DISPATCH_IDonce; that one call now runs two checks. No new agent call and no new node.required-workruns first because it takes about 1 s; the gate stops at the first failing check (model/gate.rb:125-131), so the suite runs only when the required work is done.The step follows the
retired-testspattern: the registry inquery/gate/commands.rbmapsrequired-workto a script command,os-sdlc-required-work-check IMPLEMENTATION_ID. The script reads the ticket body, runs each item'scheck:command in the project root, printsRequiredWorkReport#lines(failing items only), and exits 1 when any item fails. The gate stores that short report as the step output.Receiver:
programmer-repair. Itsenrichlist already hasgate_results, which holds every step of the latest completed dispatch (query/brief/facts.rb:49-59) — after suite-check fails, that is{"required-work" => {verdict, output: <report>}}. The brief and the mapenrichlists do not change.The check form is the one the capture template already uses:
check: `<command>`. Exit 0 means pass. For "prints nothing", negate:check: `! grep -rnE "RedTests" plugins/os-sdlc/lib`. #808 wrote its check as free text.Known limit:
programmer-repairnever edits tests. An item that needs a test change fails twice and escalates, with the report in the escalation. Routing by item owner is out of scope.Decision record: ADR-0244 (amends ADR-0209).
Required work:
TicketShape::RequiredWorkreturns the backtickedcheck:command of each item that has one.RequiredWorkReportwithlines(limit:)that lists only failing items, each with its item text, command, and at mostlimitoutput lines.os-sdlc-required-work-check IMPLEMENTATION_IDscript and registerrequired-workinquery/gate/commands.rbandGate::Name.[required-work, suite]inmaps/poodr-ticket-implementation.yaml.TicketShapeatimplementation-openrejects acheck:that has no backticked command and names the item. The os-backlog ticket body checker gets the same rule in #817 (ADR-0209 keeps the two in lockstep; one pipeline run takes one target).Rejected: the contract-auditor runs the check — an agent would still read the output and decide the verdict, and it runs after suite-check, so it never ran on #808.
Rejected: add
required-workto the programmer gate list — items owned by the test-writer or refactorer would block the programmer.Rejected:
[suite, required-work]— one wasted suite run per repair round.Acceptance criteria
check:command that exits non-zero, when the suite-check node runs, then its verdict is fail and therequired-workstep output names only the failing item, its command, and its output.check:commands all exit 0 and a green suite, when the suite-check node runs, then its verdict is pass.check:commands, when the suite-check node runs, then therequired-workstep passes.required-workstep, when the programmer-repair brief is built, then itsgate_resultscontain therequired-workreport.check:followed by text and no backticked command, whenimplementation-openruns on it, then it refuses and names the item.Owner sketch
Origin
check:commands are text, never run (agents/change-auditor.md:49) <- DESIGN (ADR-0209, change-auditor alignment work list)Work started on branch ticket-814 via /os-sdlc:implement, target os-sdlc. The os-backlog checker half moved to #817.
Resolution
Done: required-work gate step added: suite-check runs [required-work, suite] in one gate call; os-sdlc-required-work-check runs each backticked check: command and prints RequiredWorkReport lines for failing items only; implementation-open refuses a check: without a backticked command; Dispatch::CheckResult replaces RetiredTestsCheckResult (lens challenge found the name a defect).
Evidence: Implementation 71 complete: 10 dispatches, 14 min 49 s, all verdicts pass after one test-reviewer fail. Commits
d2fc40f6,dcade8ff,4abb2cc3on ticket-814. Full os-sdlc suite 1302 runs, 0 failures, 14.0 s. Rubocop clean on 13 changed files. Negated checks verified: '! grep' that matches exits 1. ADR-0244.Follow-ups: #817 (os-backlog body checker half, next in this session). Worktree guard blocks subagent-stop heredocs in worktree-isolated sessions; handoffs were submitted from files this run (known from #803, not ticketed here: see session summary).
Follow-up from the close comment: the worktree guard defect is now #819.