Move method to owner: CommandController superclass for the seven commands (copied:defn:8a8c27d3) #1090
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#1090
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
copied:defn:8a8c27d3 (copied_entry, score 25) spans 5 classes in concepts CrcCensus, CrcFile, CrcJobs, CrcRecords, CrcTickets.
OsSdlc::CrcCensus::Command(/home/jared/dev/cc-os/plugins/os-sdlc/lib/os_sdlc/crc_census/command.rb:17)OsSdlc::CrcFile::Command(/home/jared/dev/cc-os/plugins/os-sdlc/lib/os_sdlc/crc_file/command.rb:11)OsSdlc::CrcJobs::Command(/home/jared/dev/cc-os/plugins/os-sdlc/lib/os_sdlc/crc_jobs/command.rb:11)OsSdlc::CrcRecords::Command(/home/jared/dev/cc-os/plugins/os-sdlc/lib/os_sdlc/crc_records/command.rb:9)OsSdlc::CrcTickets::Command(/home/jared/dev/cc-os/plugins/os-sdlc/lib/os_sdlc/crc_tickets/command.rb:22)IDENTICAL :defn mass 450; role controller
Approach
The copied or misplaced behavior belongs to one owner; move it there, callers delegate. Object:
OsSdlc::CommandController. The copied defn is the memoizedlinethat builds CommandLine from USAGE, @argv, @out, and @err with an options(parser) hook; it moves once into a new superclass OsSdlc::CommandController that owns the (argv, out, err, cwd) entry contract and the CommandLine it builds, and each of the seven commands inherits it, keeps its own USAGE, options(parser), and state set after super, so the copy is deleted rather than shared. The (argv, out, err, cwd) entry contract stays intact per the reject-expected clump ruling, andRequired work:
OsSdlc::CrcCensus::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_census/command.rbOsSdlc::CrcFile::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_file/command.rbOsSdlc::CrcJobs::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_jobs/command.rbOsSdlc::CrcRecords::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_records/command.rbOsSdlc::CrcSweep::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_sweep/command.rbOsSdlc::CrcTickets::Commandtakesargv, out, err, cwd— check: absentdef lineinplugins/os-sdlc/lib/os_sdlc/crc_tickets/command.rbOsSdlc::CollaboratorPass::Commandtakesargv, out, err, cwd— check: presentCommandControllerinplugins/os-sdlc/lib/os_sdlc/collaborator_pass/command.rbOrchestrator work: re-measure with bin/collaborator-pass measure --runs docs/crc/os-sdlc/collaborator-runs, then stop-check.
Acceptance criteria
Owner sketch
Origin
plugins/os-sdlc/lib/os_sdlc/crc_census/command.rb)Work started 2026-10-17 on branch ticket-1090 via /os-sdlc:implement, dispatched by the collaborator pass loop (run 20261017T163118Z, iteration 3). delta-check (#1089) runs before merge.
Session wrap 2026-10-17: implementation 60 waits at needs-orchestrator after escalation 32 (unexpected_pass at test-writer round 2; same shape as #1086: pure refactor, the existing bin tests guard it). Nothing is implemented yet; branch ticket-1090 holds the worktree state. Next step per the escalation procedure: hand-finish (implement CommandController per the recipe at docs/crc/os-sdlc/collaborator-runs/20261017T163118Z/recipes/copied-defn-8a8c27d3.yml, suite, lint, one design audit, delta-check against baseline run 20261017T163118Z, then commit, merge, close, abandon run 60).
Blocked on the next session; label waiting applied by hand if needed. Blocker: session context limit, not a defect.
Resolution
Done: OsSdlc::CommandController superclass owns initialize(argv, out, err, cwd) and the memoized line that builds CommandLine with an options(parser) hook; the seven commands inherit it one level deep and keep their USAGE and hook; the byte-identical line copies from #1088 are deleted.
Evidence: Commit
f1460db4merged to main. Suite 2042 runs, 0 failures. Rubocop clean on touched files. delta-check against run 20261017T163118Z: finding copied:defn:8a8c27d3 25 -> 0, copied_entry 49 -> 25, data_clump 309 -> 263, no shape rose. Implementation 60 escalated (unexpected_pass, pure refactor) and was hand-finished with suite, lint, one opus design audit.Follow-ups: #1091 UnusedPrivateMethod cop flags superclass-called hooks (skeptic CREATE); line and options stay protected until it ships. None else.