Rename Project#path to Project#root, a Pathname (coding map) #796

Closed
opened 2026-09-28 14:17:18 +00:00 by jared · 2 comments
Owner

Problem

Project#path is the repository root. A Target also has a path, so project.path and target.path read as the same kind of thing. R5 renames it to root.

Reproduce

n/a: rename. Run on maps/coding.yaml.

Approach

Files: 11 lib files (tracker_resolver, diff_test_plan, issue_source, objection_intake, project_config_command, violation_recorder, brief/facts, gate/commands, snapshot, config, project.rb) and about 9 test files (grep -rlE "project\.path\b|Project\.new\(" plugins/os-sdlc/tests).
ADRs cited: ADR-0055 (root is derived, never stored; that stays true).

Required work:

  1. Project#root returns Pathname. Callers that join strings use root.join or root.to_s. — check: ! grep -rnE "project\.path\b" plugins/os-sdlc/lib
  2. The suite is green. — check: ruby plugins/os-sdlc/tests/all.rb

Rejected: a String root. The ruling says Pathname, and root.join removes the File.join(project.path, ...) repetition.

Acceptance criteria

  1. Given the full suite, when it runs, then it passes.

Owner sketch

OsSdlc::Project = Data.define(:name, :root, :tracker, :commit_on_complete, :targets)

Blocking edges

Blocked by: T7

Origin

  • Trigger: user ruling R5
  • Improvised this session: none
  • Chain: DESIGN: model/project.rb member path
  • Where: plugins/os-sdlc/lib/os_sdlc/model/project.rb
  • Session: bb36e383-017d-486e-809f-7ce25d151e61
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/bb36e383-017d-486e-809f-7ce25d151e61.jsonl
## Problem `Project#path` is the repository root. A Target also has a `path`, so `project.path` and `target.path` read as the same kind of thing. R5 renames it to `root`. ## Reproduce n/a: rename. Run on `maps/coding.yaml`. ## Approach Files: 11 lib files (tracker_resolver, diff_test_plan, issue_source, objection_intake, project_config_command, violation_recorder, brief/facts, gate/commands, snapshot, config, project.rb) and about 9 test files (`grep -rlE "project\.path\b|Project\.new\(" plugins/os-sdlc/tests`). ADRs cited: ADR-0055 (root is derived, never stored; that stays true). Required work: 1. `Project#root` returns `Pathname`. Callers that join strings use `root.join` or `root.to_s`. — check: `! grep -rnE "project\.path\b" plugins/os-sdlc/lib` 2. The suite is green. — check: `ruby plugins/os-sdlc/tests/all.rb` Rejected: a String root. The ruling says Pathname, and `root.join` removes the `File.join(project.path, ...)` repetition. ## Acceptance criteria 1. Given the full suite, when it runs, then it passes. ## Owner sketch ```ruby OsSdlc::Project = Data.define(:name, :root, :tracker, :commit_on_complete, :targets) ``` ## Blocking edges Blocked by: T7 ## Origin - Trigger: user ruling R5 - Improvised this session: none - Chain: DESIGN: model/project.rb member `path` - Where: plugins/os-sdlc/lib/os_sdlc/model/project.rb - Session: bb36e383-017d-486e-809f-7ce25d151e61 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/bb36e383-017d-486e-809f-7ce25d151e61.jsonl
Author
Owner

Work started on branch ticket-796 via /os-sdlc:implement (session 854e0e91).

Work started on branch ticket-796 via /os-sdlc:implement (session 854e0e91).
Author
Owner

Resolution

Done: Project is Data(name, root, tracker, commit_on_complete, targets); Project#root is Project::Root, a Pathname subclass; Project#path gone; Snapshot, Config, Setup, and callers build or read root. Twelve callers pass root.to_s; Root carries to_str and String == so string callers keep working.

Evidence: implementation 61 via /os-sdlc:implement, 13 dispatches, one suite-check retry, contract-auditor pass; commit 140fba48 on ticket-796; suite green at suite-check dispatch 637; ! grep project.path in lib

Follow-ups: Dropped by ticket-skeptic (root-vs-symptom): the to_str/== shim on Project::Root and the .to_s at call sites are a permitted variance of this ticket's own 'root.join or root.to_s' clause, recorded here, not ticketed. #803 (Facts#bound_target regression from #795, found while running this ticket) is filed and half fixed.

## Resolution **Done:** Project is Data(name, root, tracker, commit_on_complete, targets); Project#root is Project::Root, a Pathname subclass; Project#path gone; Snapshot, Config, Setup, and callers build or read root. Twelve callers pass root.to_s; Root carries to_str and String == so string callers keep working. **Evidence:** implementation 61 via /os-sdlc:implement, 13 dispatches, one suite-check retry, contract-auditor pass; commit 140fba48 on ticket-796; suite green at suite-check dispatch 637; ! grep project.path in lib **Follow-ups:** Dropped by ticket-skeptic (root-vs-symptom): the to_str/== shim on Project::Root and the .to_s at call sites are a permitted variance of this ticket's own 'root.join or root.to_s' clause, recorded here, not ticketed. #803 (Facts#bound_target regression from #795, found while running this ticket) is filed and half fixed.
jared closed this issue 2026-09-28 17:35:06 +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#796
No description provided.