Crc Run controllers build RunPath in the initializer; find the missing run config #1117

Open
opened 2026-10-18 18:32:20 +00:00 by jared · 1 comment
Owner

Problem

The Crc::*::Run controllers build Crc::RunPath in their initializers. A controller that builds its own dependency hides that dependency from its caller and from its tests. A lint cop and a lesson exist for a dependency built in an initializer. The cop did not flag these files. Jared suspects that an object is missing between Crc::*::Run and Crc::RunPath: a run config that holds the attributes of one run and goes to the controller whole, for example Run.new(config: run_config). Crc::RunPath itself may be that config.

Observed

# plugins/os-sdlc/lib/os_sdlc/crc/jobs/run.rb:11
@path = RunPath.within(project, run.fetch(:run_dir))
# plugins/os-sdlc/lib/os_sdlc/crc/tickets/run.rb:12
@path = RunPath.within(project, run.fetch(:run_dir))

Crc::Census::Settings and Crc::Sweep::Settings also build RunPath.within(project, run[:run_dir]).

A related question: Crc::RunPath and CollaboratorPass::RunDirectory may be one domain concept with two names. The proposed glossary term is "Run: the saved output of one pass over a target".

Reproduce

n/a: design ticket. The first step is to find the cop and the lesson and to find why the cop did not flag crc/jobs/run.rb.

Origin

  • Trigger: collaborator-pass iteration 4, finding data_clump project+run in run docs/crc/os-sdlc/collaborator-runs/20261018T172139Z.
  • Improvised this session: none
  • Chain: dependency built in initializer ← cop did not flag these files (cause not known) ← IMPROVISATION (not investigated)
  • Root candidate: none
  • Where: plugins/os-sdlc/lib/os_sdlc/crc/jobs/run.rb, plugins/os-sdlc/lib/os_sdlc/crc/tickets/run.rb, plugins/os-sdlc/lib/os_sdlc/crc/run_path.rb
  • Session: a71a2c2a-4943-47c4-8dd1-cc16fe42d120
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a71a2c2a-4943-47c4-8dd1-cc16fe42d120.jsonl
## Problem The `Crc::*::Run` controllers build `Crc::RunPath` in their initializers. A controller that builds its own dependency hides that dependency from its caller and from its tests. A lint cop and a lesson exist for a dependency built in an initializer. The cop did not flag these files. Jared suspects that an object is missing between `Crc::*::Run` and `Crc::RunPath`: a run config that holds the attributes of one run and goes to the controller whole, for example `Run.new(config: run_config)`. `Crc::RunPath` itself may be that config. ## Observed ```ruby # plugins/os-sdlc/lib/os_sdlc/crc/jobs/run.rb:11 @path = RunPath.within(project, run.fetch(:run_dir)) # plugins/os-sdlc/lib/os_sdlc/crc/tickets/run.rb:12 @path = RunPath.within(project, run.fetch(:run_dir)) ``` `Crc::Census::Settings` and `Crc::Sweep::Settings` also build `RunPath.within(project, run[:run_dir])`. A related question: `Crc::RunPath` and `CollaboratorPass::RunDirectory` may be one domain concept with two names. The proposed glossary term is "Run: the saved output of one pass over a target". ## Reproduce n/a: design ticket. The first step is to find the cop and the lesson and to find why the cop did not flag `crc/jobs/run.rb`. ## Origin - Trigger: collaborator-pass iteration 4, finding `data_clump project+run` in run `docs/crc/os-sdlc/collaborator-runs/20261018T172139Z`. - Improvised this session: none - Chain: dependency built in initializer ← cop did not flag these files (cause not known) ← IMPROVISATION (not investigated) - Root candidate: none - Where: plugins/os-sdlc/lib/os_sdlc/crc/jobs/run.rb, plugins/os-sdlc/lib/os_sdlc/crc/tickets/run.rb, plugins/os-sdlc/lib/os_sdlc/crc/run_path.rb - Session: a71a2c2a-4943-47c4-8dd1-cc16fe42d120 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/a71a2c2a-4943-47c4-8dd1-cc16fe42d120.jsonl
Author
Owner

Occurrence: crc command controllers take a typed request Settings object, not the parsed Hash
Seen: plugins/os-sdlc/lib/os_sdlc/crc//run.rb (11 sites of RunPath.within(project, x.fetch(:run_dir)); 7 controllers and 2 Settings.for builders still take the Hash as run)
Run: session 86f833b9 (run 3 retrospective, 2026-10-20)
Adds: #1194 renamed 5 of 14 Hash takers and the name_collision count fell 50 to 14 while 9 homonyms stayed untyped. The answer to this ticket's open question: one Settings value object per command in the Census::Settings / Sweep::Settings shape, with .for(project, request) building run_path once; add the glossary entry for the parsed command request in plugins/os-sdlc/CONTEXT.md before naming the class (do not default to request). The Crc::
::Run class names carry the same clash with glossary Run.

Occurrence: crc command controllers take a typed request Settings object, not the parsed Hash Seen: plugins/os-sdlc/lib/os_sdlc/crc/*/run.rb (11 sites of RunPath.within(project, x.fetch(:run_dir)); 7 controllers and 2 Settings.for builders still take the Hash as `run`) Run: session 86f833b9 (run 3 retrospective, 2026-10-20) Adds: #1194 renamed 5 of 14 Hash takers and the name_collision count fell 50 to 14 while 9 homonyms stayed untyped. The answer to this ticket's open question: one Settings value object per command in the Census::Settings / Sweep::Settings shape, with .for(project, request) building run_path once; add the glossary entry for the parsed command request in plugins/os-sdlc/CONTEXT.md before naming the class (do not default to `request`). The Crc::*::Run class names carry the same clash with glossary Run.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1117
No description provided.