Tag one use_case test per os-backlog command for journeys #1514
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#1514
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
Journey coverage on os-backlog is 23 of 99 classes.
Journeys come only from tests that call
use_case.os-backlog has one such test, so the model has one journey.
The other 76 classes get no journey, and the pattern and shape detectors report them as untraced.
Ruling 2026-11-02 (session c39c41b9): every entry point gets a journey. Entry points are each
bin/os-backlogcommand,bin/decision-sweep,bin/wakeup-poll, and each hook. Hooks are "just as important as the executables". When every entry point is traced, code that no journey touches is a signal on its own: no use case reaches it. Untouched does not mean bad. It is never grounds for deletion by itself.Observed
Tracer#tagged_tests(plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:48) keeps only test files in which a call node nameduse_caseexists. It runs those tests in process against fixtures. It never runsbin/directly.In
plugins/os-backlog/teststhat matches one file:tests/comment_cli_test.rb:23, intest_comment_with_body_posts_and_confirms, tagos-backlog comment.tests/test_helper.rb:16defines the no-opuse_casehelper.The other 65 test files have no
use_casecall. 12 of them drive the CLI in process withrun_cli.tests/decision_sweep_test.rbcoversbin/decision-sweep. No test coversbin/wakeup-poll.The only hook is
hooks/session_start.rb(Ruby since #1522, entry objectBacklog::SessionStart, registered inhooks/hooks.json).tests/session_start_test.rbcovers it.Journey views are already committed:
plugins/os-backlog/design/generated/journeys/os_backlog_comment.c4is tracked. The Writer regenerates them onsystem-model build.Cause 2 (checked, not a cause of the 76): lazy loads. The close note of #1505 says the first traced journey absorbs the
Boot::Commandslazy-load calls (39 messages), kept on purpose;Tracer::SEED = 0keeps it stable.Reproduce
Approach
Tag one existing in-process test per Ruby entry point with
use_case, astests/comment_cli_test.rb:23does. Wrap the body of one existing test method. Change no assertion. Do not change the Tracer.run_cliinplugins/os-backlog/tests: tagos-backlog <command>.bin/decision-sweep: tag one test intests/decision_sweep_test.rbasdecision-sweep.hooks/session_start.rb: tag one test intests/session_start_test.rbassession-start.bin/wakeup-poll: it has no test. Add one in-process test that runs it against a fixture and tag itwakeup-poll. This is the only new test.A guard test enforces the rule by scanning: every
run_clicommand, every Ruby file inbin/, and every Ruby file inhooks/has a matchinguse_casetag. A new command, executable, or hook without a tag fails the guard.Then run
system-model buildfor os-backlog and commit the regenerateddesign/generated/files, including the newjourneys/*.c4. The committed journeys are the recorded traces; review changes to them as git diffs.Required work:
run_clicommand — check: presentuse_case("os-backloginplugins/os-backlog/tests/*_test.rbdecision-sweepandsession-start, and add plus tag awakeup-polltest — check: presentuse_case("wakeup-poll")inplugins/os-backlog/tests/*_test.rbuse_caseinplugins/os-backlog/tests/use_case_tag_coverage_test.rbwakeup-pollinplugins/os-backlog/design/generated/journeys/*.c4Acceptance criteria
run_cliinplugins/os-backlog/tests/*_test.rbeach Ruby file inplugins/os-backlog/bin/, and each Ruby file inplugins/os-backlog/hooks/, when the guard test runs, then a matchinguse_casetag exists for each one.system-model coverage plugins/os-backlogruns, then the touched count is higher than 23.bundle exec ruby plugins/os-backlog/tests/all.rbruns, then the suite passes with no existing assertion changed.system-model buildon os-backlog, thendesign/generated/journeys/holds one.c4file per tag, and the files are committed.Owner sketch
Non-goals
Tracer changes. Excluding boot messages from the touched count. Counting journeys per class. Method-level tracing. Cause labels for untouched classes. The residue ruling on classes that stay untouched.
Origin
plugins/os-sdlc/bin/system-model coverage plugins/os-backlogprintscoverage: 23/99.use_case← DESIGN (plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:48traces tagged tests only;plugins/os-backlog/tests/comment_cli_test.rb:23)VERDICT: CREATE
Widened 2026-11-02 (session c39c41b9). Scope now covers every Ruby entry point: each run_cli command, bin/decision-sweep, and bin/wakeup-poll (wakeup-poll gets its first test). The guard checks both. Regenerated design/generated/journeys/*.c4 get committed (Jared ruled option A). Python hook tracing and the measurement follow-ups are non-goals; see the 2026-11-02 handoff.
Follow-up filed: #1522 ports hooks/session_start.py to Ruby (the hook listed as a non-goal here). Ruled by Jared 2026-11-03. Items 2 to 6 of the round-table are not tickets: they are questions to ask of the map once this ticket produces it.
Work started on branch ticket-1514. Body corrected before the run: the hook is Ruby since #1522, so hooks/session_start.rb is now an in-scope entry point with tag session-start. The handoff 2026-11-03-1442 records this.
Resolution
Done: Tagged every run_cli command word, bin/ executable, and hook with use_case; added the guard test and a wakeup-poll skip-path test; committed 13 journey files.
Evidence: Branch ticket-1514, implementation 230. Coverage 23/99 to 52/107, same on two runs. Suite: 354 runs, 0 failures. Assertion lines on main: 579, all still present. system-model build gives no diff.
Follow-ups: none filed: handoff 2026-11-03-1442 holds follow-ups until Jared rules after seeing the map. Gaps reported to Jared: 10 CLI commands outside the run_cli scope have no tag; the wakeup-poll tag traces only the skip path; the session-start wrapper journey is empty.