test-writer rewrites Retired tests into absence tests instead of deleting them; behavior-verifier passes anyway #613
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#613
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
A ticket's
## Retired testssection lists entries of two shapes: a bare path retires a whole file,path#methodretires one test.Pipeline::RetiredTestsplits on#.On #607 implementation 3 (session 4974deff-0140-4813-8cd1-e96c6356a214) the ticket listed three file entries. The test-writer tried to delete them and backed off. Its handoff: "the diff-test gate require_relatives every changed test path including a removed one, which produced an unconditional LoadError." It rewrote each file into a one-assertion absence test instead. test-reviewer and behavior-verifier passed although the acceptance criterion
grep -r lsp plugins/os/lib plugins/os/testsprints nothing was unmet. The main loop deleted the files by hand.The agent's charter already permits deletion (
agents/test-writer.md: "rewrite or delete each listed path#method"). The gate forbade it in practice. Blocked by #614, which lands first because it edits the samediff_test_command.Change
File entries are retired by the harness at
implementation-open, before any dispatch. Method entries stay with the test-writer, and a deterministic gate step refuses to go green while any entry is still present. The charter line loses its condition.os-sdlc-runner retired-tests-check IMPLEMENTATION_IDrunsRetiredTest#exists?on every entry of that implementation's ticket body. Exit 0 when none remain. Exit 1 with one line per entry still present:The step
retired-testsjoins the test-writer node's gate list inmaps/poodr-ticket-implementation.yaml.Charter,
agents/test-writer.md, replaces the retired_tests sentence with: "File entries under retired_tests are already deleted. Remove each listedpath#methodin this round."Tasks
RetiredTest#file?and#delete!.OpenImplementationdeletes file entries after the shape check, ticket map only.diff_test_commandfilterstest_pathsto files that exist.retired-tests-checkCLI subcommand;GateCommands#retired_tests_command;retired-testsstep on the test-writer node gate in the ticket map.agents/test-writer.md.ruby plugins/os-sdlc/tests/all.rb; green.Acceptance criteria
implementation-openon a ticket map, every file entry under## Retired testsis gone from the worktree.path#methodentry is still present, green when it is gone.Owner sketch
Cases
tests/a_test.rb, whenRetiredTest#delete!(root)runs, then the file is gone; giventests/a_test.rb#test_x,delete!leaves the file in place.OpenImplementation#callruns, then the file is deleted before the open payload returns.diff_test_commandis built, then the deleted path is not in the require list.tests/a_test.rb#test_xand the method still exists, whenretired-tests-checkruns, then it exits 1 and printsretired test still present: tests/a_test.rb#test_x -- remove the method; when the method is gone, it exits 0.retired-testsstep.Origin
Work started via os-sdlc pipeline on branch ticket-613 (session 4974deff). #614 merged first at
558f389c.Resolution
Done: File entries under Retired tests are deleted at implementation-open (ticket map only); diff_test_command drops deleted test paths; retired-tests-check verb and retired-tests gate step on the test-writer node; charter sentence replaced.
Evidence: Branch ticket-613 commit
301c191f; pipeline implementation 5 dispatches 40-44 pass, programmer gate green; behavior-verifier 45 returned verdict:error on a truncated brief so the run ended implementation_failed; main loop verified the full diff by hand, ruby plugins/os-sdlc/tests/all.rb 1354 runs 0 failures on rerun (first run had 2 lsp-probe socket flakes), rubocop clean.Follow-ups: #618 truncated code_changes brief fact and verdict:error terminal route.