Route changed existing tests away from the programmer at place-code #1003
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#1003
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
The takedown design cards and the takedown-implement map contradict each other.
plugins/os-sdlc/eval/ticket-takedown/harness/cards/blind-designer.md:47andreviser.md:36tell the designer to list an existing test that changes only so it still passes incode_files, notfailing_tests.The map node
place-codeinplugins/os-sdlc/maps/takedown-implement.yamldispatches theprogrammerwith "Make each code_files path equal to its design content ... Never edit tests."The programmer may never edit tests, so every design that changes an existing test escalates at
place-code.Observed
Implementation 41 (#997), escalation 18: the programmer placed the 3 production files and refused
tests/command/fingerprint_test.rbandtests/evidence_bin_test.rb.The orchestrator hand-fixed the files and rerouted.
Related miss, implementation 39 (#999), escalation 17: the designer did not list the existing pinned test
pipeline_test.rbat all, so suite-check failed and the programmer escalated.Reproduce
n/a: verified by reading the cards and the map on 2026-10-12; the two runs above show the failure.
Approach
Ruled 2026-10-14 (Option A, confirmed by Jared); recorded in ADR-0290, which amends ADR-0283 decision 2.
A script places the design. No model writes design content at
place-testsorplace-code.os-sdlc-place-design MODE DISPATCH_IDis aBoot.runone-liner likeos-sdlc-gate. It loads the dispatch, takes the ticket of its implementation, fetches the ticket body, and reads the## Designpath the same wayDesignBasedoes. It runs in the worktree (process cwd).tests: writes eachfailing_testsentry byte for byte. If a path already exists, it exits non-zero, names the path, and writes no file (same rule as the current place-tests brief).code: writes everycode_filesentry byte for byte as a whole file, also over an existing file (test and production files), and deletes eachdeleted_filespath. If adeleted_filespath does not exist, it exits non-zero, names the path, and changes no file.It does not repeat the stale-base check (ADR-0284). It fails loudly on a missing
## Designsection or a missing design file.The agent
design-placer(model haiku, tools Bash only) runsos-sdlc-place-design, thenos-sdlc-gate DISPATCH_ID. It cannot edit files, so it cannot refuse or change content. On a non-zeroos-sdlc-place-designexit it gives the verdictescalate.The designer cards stay as they are: a changed existing test still goes in
code_files. Pinned tests that the design does not list are #1004, not this ticket.Required work:
plugins/os-sdlc/bin/os-sdlc-place-designas aBoot.runone-liner — check: presentBoot.run("place-design"inplugins/os-sdlc/bin/os-sdlc-place-designplace-designcommand in the Boot command table (key without the prefix, as"gate"foros-sdlc-gate) — check: present"place-design"inplugins/os-sdlc/lib/os_sdlc/controller/boot/commands.rbplugins/os-sdlc/agents/design-placer.mdwithmodel: haikuandtools: Bash— check: presenttools: Bashinplugins/os-sdlc/agents/design-placer.mdplugins/os-sdlc/maps/takedown-implement.yaml, setagent: design-placeronplace-testsandplace-code, with instructions to runos-sdlc-place-design tests|code DISPATCH_IDand thenos-sdlc-gate DISPATCH_ID; keep the gates and edges — check: presentagent: design-placerinplugins/os-sdlc/maps/takedown-implement.yamlplugins/os-sdlc/maps/briefs/place-tests.mdfor the script: runos-sdlc-place-design tests DISPATCH_ID, escalate on a non-zero exit, then run the gate; write and edit no file — check: presentos-sdlc-place-design testsinplugins/os-sdlc/maps/briefs/place-tests.mdplugins/os-sdlc/maps/briefs/place-code.mdthe same way foros-sdlc-place-design code— check: presentos-sdlc-place-design codeinplugins/os-sdlc/maps/briefs/place-code.mdplugins/os-sdlc/skills/ticket-takedown/SKILL.mdsection 4, state that thetakedown-implementmap places the design by script (os-sdlc-place-design, ADR-0290) and that no model writes design content — check: presentos-sdlc-place-designinplugins/os-sdlc/skills/ticket-takedown/SKILL.mdplugins/os-sdlc/skills/implement/SKILL.md, adddesign-placerto the list of gated producer agents — check: presentdesign-placerinplugins/os-sdlc/skills/implement/SKILL.mdOrchestrator work: run
bin/refresh-pluginsafter the merge; the live check of the new agent type is in Phase 2 ofdocs/takedown/integration-plan.md(needs a session restart).Rejected: Runner
command:node with no agent — NodeGuardChecks, TransitWalk and Gate::Run need an agent and a dispatch row (ADR-0290, parked).Acceptance criteria
place-testswhose ticket body names a design with twofailing_testsentries, whenos-sdlc-place-design tests DISPATCH_IDruns in the worktree, then each entry path holds itscontentbyte for byte and no other file changes.failing_testsentry whose path already exists, whenos-sdlc-place-design tests DISPATCH_IDruns, then it exits non-zero, names that path, and writes no file.code_filescontain a changed existing test file and a production file, and whosedeleted_filesname an existing file, whenos-sdlc-place-design code DISPATCH_IDruns, then eachcode_filespath equals itscontentbyte for byte and the deleted path no longer exists.deleted_filespath that does not exist, whenos-sdlc-place-design code DISPATCH_IDruns, then it exits non-zero, names that path, and changes no file.## Designsection, whenos-sdlc-place-designruns, then it exits non-zero with a message that names the missing section and changes no file.takedown-implementmap, when it loads and validates, thenplace-testsandplace-codename the agentdesign-placerand keep their gates (diff-testexpect red plustest-lint;diff-testpluslint).Owner sketch
The design path comes from the
## Designsection, the same rule asDesignBase. Share that rule; do not copy the regex.Origin
VERDICT: CREATE
REASON: This is a real defect in the design. The designer cards send changed existing tests into code_files, and place-code forbids the programmer from editing tests. It caused escalation 18 in #997. The Origin chain ends in DESIGN, not IMPROVISATION, so this ticket is the root. The hand-fix only worked around the defect.
Takedown relevance: needs a ruling
Harm: A takedown design that changes an existing test only so it still passes puts that test in
code_files, and theplace-codeprogrammer refuses it under "Never edit tests", so the implementation escalates and the orchestrator has to hand-fix the files.Protects: The takedown-implement map's contract that a design's complete code is placed mechanically, with tests placed by the test-writer and production code by the programmer, so that implementations run without manual intervention (ADR-0283 decision 2).
Harm path:
/os-sdlc:ticket-takedownruns/os-sdlc:implement <ticket> takedown-implement, which loadsplugins/os-sdlc/maps/takedown-implement.yaml; itsplace-codenode (programmer, briefplace-code.md) receives everycode_filesentry, and the designer cards (blind-designer.md:45-47,reviser.md:34-36) still tell the designer to put changed existing tests intocode_files. (live: true)Evidence:
f2196435,e94a252a) touches takedown-implement.yaml, place-code.md, or the designer cards; the defect is not fixed.Conflicting ADRs:
The ticket is waiting for Jared's ruling on the ADRs above.
jared referenced this issue2026-10-14 15:18:06 +00:00
Takedown relevance: needs a ruling
Harm: The designer cards tell the designer to put an existing test that changes only to still pass into
code_files, and theplace-codenode then dispatches the programmer, which may never edit tests, so the design escalates at place-code and a person must hand-fix it.Protects: The takedown-implement map's rule that the programmer writes production code only, with tests placed by the test-writer, so the red-then-green proof stays intact and implementations run without manual repair.
Harm path: The takedown pipeline runs the
blind-designerandrevisercards, which emitcode_filesthat may include existing test files, and then thetakedown-implementmap'splace-codenode dispatches theprogrammeragainst those entries. (live: true)Evidence:
d18a84d5: The newest commit in history.txt is docs-only and touches none of the cards or the map, so no later commit removed or fixed this path.Conflicting ADRs:
The ticket is waiting for Jared's ruling on the ADRs above.
Takedown run 1003-20261014-120014 stopped at relevance: needs ruling 0283. The run started before ADR-0290 (commit
1e8624fd) was in HEAD, and the Approach section still described the old direction. Jared ruled Option A on 2026-10-14; ADR-0290 records it and amends ADR-0283 decision 2. I rewrote the Approach section to match and removed the waiting label. A new takedown run follows.Takedown relevance: needs a ruling
Harm: A takedown design that changes an existing test is routed into code_files, so the programmer at place-code must either edit that test (forbidden) or refuse, and the run escalates, as in implementation 41 (#997), escalation 18.
Protects: The takedown pipeline's guarantee that an accepted design lands in the working tree as written, without a stalled run or an orchestrator hand-fix, while the programmer's rule against editing tests holds.
Harm path: The place-code node in plugins/os-sdlc/maps/takedown-implement.yaml dispatches the programmer agent with "Make each code_files path equal to its design content ... Never edit tests", and the designer cards still send changed existing tests into code_files. (live: true)
Evidence:
1e8624fd: Latest commit (2026-10-14) is an ADR-0290 docs commit; history shows no later commit that adds place-design or design-placer or changes place-code.Conflicting ADRs:
The ticket is waiting for Jared's ruling on the ADRs above.
Skeptic DROP (depth-1) for a follow-up: the takedown relevance step returns needs_ruling even when its own reason says Accepted ADR-0290 resolves the ADR-0283 conflict. Evidence: docs/takedown/1003-20261014-120213/02-relevance.reply.json. Because of this, #1003 is implemented with poodr-ticket-implementation, not with a takedown design.
Work started: /os-sdlc:implement 1003 on map poodr-ticket-implementation, branch prism-architect (persistent worktree). Fallback per docs/takedown/integration-plan.md: takedown stopped at relevance twice.
Resolution
Done: Script placement built per ADR-0290: bin os-sdlc-place-design (tests|code DISPATCH_ID) writes failing_tests / code_files byte for byte and deletes deleted_files; agent design-placer (haiku, Bash only); takedown-implement.yaml place-tests and place-code use it with unchanged gates; briefs, ticket-takedown SKILL.md section 4 and implement SKILL.md updated.
Evidence: Commit
ba1d7923on branch prism-architect (implementation 42, poodr-ticket-implementation, 15 dispatches, 14 min). 8 new tests in tests/controller/place_design_{tests,code}_mode_test.rb and tests/adapter/map/catalog_takedown_placement_test.rb; required-work gate exit 0; full suite gate exit 0. Two orchestrator reroutes: escalation 20 (fixture Array#^ hand-fixed to Set#^), escalation 21 (wrong behavior-verifier verdict on AC5). Live check of the new agent type is Phase 2 of docs/takedown/integration-plan.md (needs a session restart).Follow-ups: Relevance step returns needs_ruling when an Accepted amending ADR resolves the conflict: skeptic DROP (depth-1), recorded on this ticket and in the plan for Jared. Live check of design-placer: Phase 2 of the plan, not a new ticket. Lens A15 report: under opus challenge; outcome recorded in the plan.