Add Project#lib_root and #relative_lib_root; drop the project.codebase chain in Crc #1178

Closed
opened 2026-10-19 22:34:58 +00:00 by jared · 2 comments
Owner

Problem

Ten files in the Crc concept reach through the project into its codebase to get the library root: project.codebase.lib_root and project.codebase.relative_lib_root. Project is the object that knows its codebase, so it should answer the two questions itself. Ruling S66 gives Project the two answers. Ruling S70 applies the same answer at crc/census/settings.rb:12.

Reproduce

n/a: structure-wave reach-through answer, nothing to reproduce

Approach

Required work:

  1. In plugins/os-sdlc/lib/os_sdlc/project.rb, add def lib_root = codebase.lib_root and def relative_lib_root = codebase.relative_lib_root next to codebase. — check: present def relative_lib_root in plugins/os-sdlc/lib/os_sdlc/project.rb
  2. Replace @project.codebase.lib_root with @project.lib_root and @project.codebase.relative_lib_root with @project.relative_lib_root at crc/census/expected_constants.rb:30, crc/census/files.rb:20, crc/census/test_lookup.rb:21, crc/cycle_edges/run.rb:13 and :22, crc/error_lineage/run.rb:13 and :22, crc/placement/run.rb:14 and :22, crc/records/path_lookup.rb:49 and crc/score/run.rb:26. All paths are under plugins/os-sdlc/lib/os_sdlc/. — check: absent project.codebase in plugins/os-sdlc/lib/os_sdlc/crc/cycle_edges/run.rb
  3. In plugins/os-sdlc/lib/os_sdlc/crc/census/settings.rb:12, replace project.codebase.relative_lib_root with project.relative_lib_root. — check: absent project.codebase in plugins/os-sdlc/lib/os_sdlc/crc/census/settings.rb
  4. In plugins/os-sdlc/lib/os_sdlc/crc/holders/run.rb:22-26, delete the private codebase method and use @project.lib_root and @project.relative_lib_root (same chain as item 2; the detector missed it behind the private wrapper). crc/reach_through/run.rb:22 passes the whole codebase to CollaboratorPass::Sources and stays unchanged. — check: absent def codebase in plugins/os-sdlc/lib/os_sdlc/crc/holders/run.rb

Acceptance criteria

  1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof.
  2. Given a Project, when lib_root and relative_lib_root are called, then they return the same values as project.codebase.lib_root and project.codebase.relative_lib_root.
  3. Given the files named in Required work, when searched for .codebase., then none of those sites remains.

Owner sketch

class OsSdlc::Project
  def codebase = target.codebase(root)
  def lib_root = codebase.lib_root
  def relative_lib_root = codebase.relative_lib_root
end

Non-goals

Add no test.

Origin

  • Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs)
  • Improvised this session: none
  • Chain: reach-through project.codebase.lib_root in 10 Crc files ← Project exposes codebase and not its lib root ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S66, S70)
  • Root candidate: none found; searched lib_root, relative_lib_root, project.codebase, Codebase, reach-through, Crc
  • Where: plugins/os-sdlc/lib/os_sdlc/project.rb
  • Ledger: docs/crc/os-sdlc/ledger.tsv
  • Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv
  • Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl

VERDICT: CREATE

## Problem Ten files in the Crc concept reach through the project into its codebase to get the library root: `project.codebase.lib_root` and `project.codebase.relative_lib_root`. `Project` is the object that knows its codebase, so it should answer the two questions itself. Ruling S66 gives `Project` the two answers. Ruling S70 applies the same answer at `crc/census/settings.rb:12`. ## Reproduce n/a: structure-wave reach-through answer, nothing to reproduce ## Approach Required work: 1. In `plugins/os-sdlc/lib/os_sdlc/project.rb`, add `def lib_root = codebase.lib_root` and `def relative_lib_root = codebase.relative_lib_root` next to `codebase`. — check: present `def relative_lib_root` in `plugins/os-sdlc/lib/os_sdlc/project.rb` 2. Replace `@project.codebase.lib_root` with `@project.lib_root` and `@project.codebase.relative_lib_root` with `@project.relative_lib_root` at `crc/census/expected_constants.rb:30`, `crc/census/files.rb:20`, `crc/census/test_lookup.rb:21`, `crc/cycle_edges/run.rb:13` and `:22`, `crc/error_lineage/run.rb:13` and `:22`, `crc/placement/run.rb:14` and `:22`, `crc/records/path_lookup.rb:49` and `crc/score/run.rb:26`. All paths are under `plugins/os-sdlc/lib/os_sdlc/`. — check: absent `project.codebase` in `plugins/os-sdlc/lib/os_sdlc/crc/cycle_edges/run.rb` 3. In `plugins/os-sdlc/lib/os_sdlc/crc/census/settings.rb:12`, replace `project.codebase.relative_lib_root` with `project.relative_lib_root`. — check: absent `project.codebase` in `plugins/os-sdlc/lib/os_sdlc/crc/census/settings.rb` 4. In `plugins/os-sdlc/lib/os_sdlc/crc/holders/run.rb:22-26`, delete the private `codebase` method and use `@project.lib_root` and `@project.relative_lib_root` (same chain as item 2; the detector missed it behind the private wrapper). `crc/reach_through/run.rb:22` passes the whole codebase to `CollaboratorPass::Sources` and stays unchanged. — check: absent `def codebase` in `plugins/os-sdlc/lib/os_sdlc/crc/holders/run.rb` ## Acceptance criteria 1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof. 2. Given a `Project`, when `lib_root` and `relative_lib_root` are called, then they return the same values as `project.codebase.lib_root` and `project.codebase.relative_lib_root`. 3. Given the files named in Required work, when searched for `.codebase.`, then none of those sites remains. ## Owner sketch ```ruby class OsSdlc::Project def codebase = target.codebase(root) def lib_root = codebase.lib_root def relative_lib_root = codebase.relative_lib_root end ``` ## Non-goals Add no test. ## Origin - Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs) - Improvised this session: none - Chain: reach-through project.codebase.lib_root in 10 Crc files ← Project exposes codebase and not its lib root ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S66, S70) - Root candidate: none found; searched lib_root, relative_lib_root, project.codebase, Codebase, reach-through, Crc - Where: plugins/os-sdlc/lib/os_sdlc/project.rb - Ledger: docs/crc/os-sdlc/ledger.tsv - Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv - Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl VERDICT: CREATE
Author
Owner

Work started on branch crc-os-sdlc-run-3 (implementation 90, structure-change map).

Work started on branch crc-os-sdlc-run-3 (implementation 90, structure-change map).
Author
Owner

Resolution

Done: S66/S70 applied: Project#lib_root and #relative_lib_root added; 10 Crc files plus crc/census/settings.rb call them; crc/holders/run.rb private codebase wrapper deleted.

Evidence: 2af8ddcc (Runner commit, gate green, suite 44-50 s). Implementation 90, dispatch 772.

Follow-ups: none

## Resolution **Done:** S66/S70 applied: Project#lib_root and #relative_lib_root added; 10 Crc files plus crc/census/settings.rb call them; crc/holders/run.rb private codebase wrapper deleted. **Evidence:** 2af8ddcc (Runner commit, gate green, suite 44-50 s). Implementation 90, dispatch 772. **Follow-ups:** none
jared closed this issue 2026-10-19 22:44:49 +00:00
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#1178
No description provided.