os-backlog validator: optional sections list for ## Retired tests and ## Approach #612
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#612
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?
os-backlog validator: optional sections list for
## Retired testsand## Approach[capture]Context
#610 (commit
7462a0d2) added## Retired teststo capture.md as optional, onepath#test_methodper line.TicketBodyChecker#check_headingsonly visits@required_sections + @conditional_sections(plugins/os-backlog/lib/backlog/ticket_body_checker.rb:26).Backlog::TemplateValidatoronly knowsREQUIRED_SECTIONSandAGENT_READY_SECTIONS(plugins/os-backlog/lib/backlog/template_validator.rb:13,15).An unlisted heading is never visited, so a malformed
Retired testsline passes capture and fails later atimplementation-open.Retired teststoAGENT_READY_SECTIONSready-for-agent; rejects every agent-ready ticket with no tests to retireObserved
Reproduce
Expected
Slice
OPTIONAL_SECTIONS = ["Retired tests", "Approach"].freezetoBacklog::TemplateValidator.optional: OPTIONAL_SECTIONSinto thesectionshash built byTemplateValidator#build_checker.TicketBodyCheckeracceptssections[:optional](default[]) and stores it as@optional_sections.check_headingsiterates@required_sections + @conditional_sections + present_optional_sections, wherepresent_optional_sectionsfilters@optional_sectionsto thoseheadings_holder.select_by_name(name)is non-empty for.check_heading_sectionunchanged for the optional sections that are present.RETIRED_TEST_LINE = /\A\S+#\S+\z/toTicketBodyCheckerand acheck_retired_test_lines(match)step, called only when@name == "Retired tests", that reports each non-blank line failing the regex by name.## Approachinplugins/os-backlog/references/templates/capture.mdas optional, under the## Retired testsline in the agent-ready section.Acceptance criteria
## Casesare green as Minitest tests.plugins/os-backlogtest suite is green.capture.mddocuments## Approachas optional with its content rule.Non-goals
os-sdlc.REQUIRED_SECTIONSorAGENT_READY_SECTIONS.## Approach.Owner sketch
Cases
## Retired testsor## Approach, when validated, then it passes unchanged.## Retired testspresent with validpath#test_methodlines, when validated, then it passes.## Retired testswith a line not matchingpath#test_method, when validated, then it reports an error naming the line.## Retired testspresent but empty, when validated, then it reports an empty section.## Approachpresent and non-empty, when validated, then it passes; given## Approachpresent and empty, then it reports an empty section.## Retired testsor## Approach, when validated, then it passes.capture.md, when read, then it documents## Approachas optional with its content rule.Approach
Rejected: adding
Retired teststoAGENT_READY_SECTIONS. Reason: that list means required-and-non-empty forready-for-agent; it would reject every agent-ready ticket with no tests to retire.Chosen: a third
OPTIONAL_SECTIONSlist, checked only when the heading is present.Depends on:
HeadingsHolder#select_by_namealready returning[]for an absent heading, so "present" is a plain emptiness check.## Approachmotivation: design intent today has only## Owner sketch(code shape) and## Cases(one-line items; prose there caused an escalation, #593), so approach prose has no home. #611 will be the first ticket to use it.Origin
DESIGN(plugins/os-backlog/lib/backlog/template_validator.rb).plugins/os-backlog/lib/backlog/template_validator.rb,plugins/os-backlog/lib/backlog/ticket_body_checker.rb.Work started on branch ticket-612 via the os-sdlc pipeline (worktree .claude/worktrees/ticket-612). Also adds plugins/os-backlog/.sdlc/project.yaml, the plugin's first pipeline config.
Implementation 1 escalated at test-writer with unexpected_pass:test-writer/diff-test. Cause: environment defect. The new .sdlc/project.yaml set no test_path, the Runner default is test/, this plugin uses tests/, so the diff-test gate selected no files and auto-passed (exit 0, empty output, 0 ms on every attempt). The written tests are red for the right reason when run directly. Fix: test_path: tests added. Re-opening as implementation 2 with the red-round files kept on disk.
Resolution
Done: OPTIONAL_SECTIONS added to TemplateValidator; TicketBodyChecker checks Retired tests and Approach only when present (depth, unique, non-empty); Retired tests lines must be a bare path or path#test_method; capture.md documents Approach. Also adds plugins/os-backlog/.sdlc/project.yaml (first pipeline config for this plugin).
Evidence: Branch ticket-612 commit
ffea5110. os-backlog suite 234 runs, 0 failures. rubocop clean on the 5 changed Ruby files. validate-template 611 and 612 exit 0 (both carry ## Approach). Pipeline impl 2 reached bound_exhausted at programmer-repair because the lint gate doubled the plugin path (gate defect, not code); diff-test was green every round; hand-finished after reading the diff.Follow-ups: #615 (P1, ready-for-agent): Git::Repo#changed_paths mixes repo-relative and cwd-relative paths. #616 (P2): test_path default test/ vs tests/ undetected. Both carry skeptic CREATE verdicts.