Add entry-point coverage report to system-model #1405
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#1405
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?
VERDICT: CREATE
Problem
Journeys from
bin/*do not reach the whole codebase. Nobody can say what share of classes any journey touches, or which classes no entry point reaches.Reproduce
Output:
usage: system-model [generate|build|serve|stop|status] <project-root> [--docs DIR], exit 2.Approach
Add a
coveragesubcommand tosystem-model. It builds the model with the normal steps plus theTracer(the step that fillsModel#journeys; today onlybuildadds it), then prints aCoverageReportinstead of the censusReport. The report has three parts:Extractor::EntryScriptstoday returns receiver constant names only. Give it anentriesmessage that returns one entry per script path with its kind:binforbin/*,hookforhooks/*,taskfor Rakefile and*.rakefiles. The report lists each entry as<kind> <path>.fromandtonames of everyJourney::MessageacrossModel#journeys, intersected with the class names inModel#cards. Coverage is touched divided by all cards, printed ascoverage: <touched>/<all>.Wiring:
Boot::Inputs.system_modeladdscoverageto its subcommand allowlist and usage text;SystemModel::Run#callroutescoverageto the new report with the Tracer step added.Required work:
entrieswith kind toExtractor::EntryScripts— check: presententriesinplugins/os-sdlc/lib/os_sdlc/system_model/extractor/entry_scripts.rbCoverageReportunder the system-model library — check: presentCoverageReportinplugins/os-sdlc/lib/os_sdlc/system_model/**/*.rbcoveragein the system-model argv parser and usage text — check: presentcoverageinplugins/os-sdlc/lib/os_sdlc/boot/inputs.rbcoveragethroughRunwith the Tracer step — check: presentcoverageinplugins/os-sdlc/lib/os_sdlc/system_model/run.rbAcceptance criteria
bin/script, a Rubyhooks/script, and aRakefile, when entries are read, then each path is listed once with kindbin,hook, ortask.coverage: 2/4.plugins/osas the target, whensystem-model coverage plugins/osruns, then it exits zero and prints the entry-point list, the coverage line, and the unreached classes.system-modelwith no project root, when it runs, then the usage line namescoverageamong the subcommands.Owner sketch
Non-goals
Static reachability and graphify community grouping (spec section 6 steps b to d) are later work. Entry kinds
Thor subcommandandskill scriptare dropped from this ticket: no scanner owns them (EntryScriptshas no Thor scan and reads no skills directory); a later ticket adds them when a journey needs one.Retired tests
plugins/os-sdlc/tests/system_model_cli_test.rb#test_system_model_without_a_project_root_prints_usage_and_exits_two
Origin
80a39130)Work started on branch ticket-1405 via /os-sdlc:implement (session 47f54f99). Criteria: CLI wiring got its own check and criterion.
Resolution
Done: system-model gains a coverage subcommand: EntryScripts#entries lists entry points by kind (bin, hook, task), CoverageReport prints coverage touched/all and the unreached classes, Run routes coverage through the Tracer, Inputs accepts coverage in argv and usage.
Evidence: Implementation 186 complete, commit
4e3b8854on branch ticket-1405; 13 dispatches, 2 retries, suite green twice; behavior-verifier passed all five criteria; tests system_model_coverage_test.rb and the rewritten usage pin in system_model_cli_test.rb.Follow-ups: 1) #1427 captured (ticket-skeptic CREATE): entry kind read from the absolute path misclassifies roots under a hooks directory; 2) Thor subcommand and skill-script entry kinds dropped to Non-goals, no ticket until a journey needs one; 3) the contract-auditor LENS line (A4, Model held presenter text) was resolved in-run by the refactorer.