Takedown: give the reviser the green-suite failure, and name the test in a polish rejection #1521
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#1521
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 pipeline cannot recover from a failed green-suite step. A failed green-suite step sends the run back to a revise round. The revise prompt does not contain the suite output, and the reviser cannot run commands. Thus the reviser cannot see the error that caused the revise round. Also, a rejected polish round does not name the test that is not red at base.
Observed
Run
docs/takedown/1511-20261102-181654/failed at the last green-suite step. The revise-2 prompt did not contain the revise-1 suite failure.The revise-2 failure was
KeyError: key not found: "EffectConstants"(19-green-suite.json:12).Run
docs/takedown/1511-20261102-175027/failed at polish-1. The rejection text does not name the test.The polish prompt gave the polisher a
Metrics/AbcSizeoffense on the test file (12-polish-1.prompt.md:22). The lesson for that offense says to split the test. The polisher splittest_file_form_constants_are_a_setting_with_the_old_defaultinto two tests. One of the two tests passes at base. The polisher card says to keep the tests as they are (harness/cards/polisher.md:10).Reproduce
n/a: each failure needs a live takedown run (about $2 and 25 min); the run directories above hold the full evidence.
Approach
The suite record of a design is a hash in
RunState#suite_checks, keyed by step name.GreenSuiteStepstoresSuiteCheck#to_hthere. The hash has the keysgreen,note,targets, andoffenses. Eachtargetsentry haspassedandoutput. Theoutputis empty when the target passed. The record has notests_greenkey.Flow#suite_tests_green?derives it: every target haspassedtrue. The revise prompt must do the same.Place the new section outside the text from
## Best design so farto## Objections, becausetest/command/pipeline_test.rb:323slices that text. When no suite check exists for the step, the section is empty; read it with a guarded lookup, asrun_state.rb:123does. The latest suite check is the last value ofsuite_checks. In a revise round,current_stepstill names the design that failed, so its check is the last one.Required work:
suite_sectiontoRunPrompts. It returns an empty string when@run.suite_checksis empty or when every target of the latest check haspassedtrue. Else it returns a section "Suite check" with the checknoteand theoutputof each target that haspassedfalse. Add#{suite_section}toreviseafter the "Accepted decisions named as the cause" section. — check: presentdef suite_sectioninplugins/os-sdlc/eval/ticket-takedown/lib/takedown/presenter/run_prompts.rbPolishStep#problem, keep theRedCheckresult and return itsnotewhen it is not red. Replace the fixed text "the failing tests are not red at base" with that note. Removestill_red?. — check: presentred_check.noteinplugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/polish_step.rbPolishStep. — check: absentthe failing tests are not red at baseinplugins/os-sdlc/eval/ticket-takedown/lib/takedown/command/polish_step.rbtest/presenter/run_prompts_test.rbandtest/command/polish_test.rb. — check: presentSuite checkinplugins/os-sdlc/eval/ticket-takedown/test/presenter/run_prompts_test.rbAcceptance criteria
passedfalse, when the revise prompt is built, then the prompt has a "Suite check" section with the check note and the failing target output.Owner sketch
Non-goals
Whether the polisher may edit test files. #1082 asks polish to fix lint offenses in test files; this ticket does not change that.
Origin
takedown-run --live 1511, two runs on 2026-11-02 (docs/takedown/1511-20261102-175027,docs/takedown/1511-20261102-181654)/os-sdlc:implementwithout a takedown design (ruling 2026-11-02)suite_checks(presenter/run_prompts.rb:36-42) ← the reviser cannot run commands (harness/cards/reviser.md:17) ← DESIGNplugins/os-sdlc/eval/ticket-takedown/lib/takedown/step_profile.rb:8,12,31,57VERDICT: CREATE — no open ticket covers the revise prompt that omits the green-suite failure, or the polish rejection that does not name the test; #1082 is related.
Work started on branch ticket-1521 via /os-sdlc:implement (session a5c3e206).
Resolution
Done: Revise prompt carries a Suite check section (latest failing check note plus failing target output; absent when no check or all targets pass). PolishStep#problem returns the RedCheck note, naming each test not red at base; fixed rejection text removed.
Evidence: main
8ab2bfc1; takedown tests 613 runs 0 failures; os-sdlc suite 3243 runs 0 failures; rubocop clean; contract audit pass (opus). Hand-finished after escalation 100: AC5 fixture named no test method, fixture corrected.Follow-ups: Dropped: dedupe the passed-rule between Flow#suite_tests_green? and RunPrompts#failing_targets (ticket Approach chose derivation; one-line rule). Dropped: AC6 test gap, existing test_a_rejected_round_is_flagged asserts the suite note. #1511 next.