Sweep::Settings answers root, ledger and run_dir; drop the run_path chain #1179

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

Problem

Three Sweep files reach through the settings object into its run_path to get the root, the ledger and the run directory: request.run_path.root, request.run_path.ledger and request.run_path.relative. Crc::Sweep::Settings already answers ledger_path and plugin_root. Ruling S67 makes it answer the three questions too.

Reproduce

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

Approach

Required work:

  1. In plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.rb, add def root = run_path.root, def ledger = run_path.ledger and def run_dir = run_path.relative next to ledger_path and plugin_root. — check: present def run_dir in plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.rb
  2. In plugins/os-sdlc/lib/os_sdlc/crc/sweep/file_classification.rb:12, replace request.run_path.relative with request.run_dir. — check: absent request.run_path in plugins/os-sdlc/lib/os_sdlc/crc/sweep/file_classification.rb
  3. In plugins/os-sdlc/lib/os_sdlc/crc/sweep/files.rb:24, replace request.run_path.root with request.root. — check: absent request.run_path in plugins/os-sdlc/lib/os_sdlc/crc/sweep/files.rb
  4. In plugins/os-sdlc/lib/os_sdlc/crc/sweep/substitutions.rb:8, replace request.run_path.ledger with request.ledger. — check: absent request.run_path in plugins/os-sdlc/lib/os_sdlc/crc/sweep/substitutions.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 Crc::Sweep::Settings, when root, ledger and run_dir are called, then they return run_path.root, run_path.ledger and run_path.relative.
  3. Given the three Sweep files, when searched for request.run_path, then none remains.

Owner sketch

class OsSdlc::Crc::Sweep::Settings
  def root = run_path.root
  def ledger = run_path.ledger
  def run_dir = run_path.relative
  def ledger_path = run_path.relative_file("ledger.tsv")
  def plugin_root = target.path
end

Non-goals

crc/sweep/run.rb sends the settings four messages (run_path, target, excludes, histories). Ruling S68 keeps that. Add no test.

Origin

  • Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs)
  • Improvised this session: none
  • Chain: reach-through request.run_path.* in 3 Sweep files ← Settings holds run_path and does not answer root, ledger and run_dir ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S67)
  • Root candidate: none found; searched Sweep::Settings, run_path, RunPath, run_dir, Settings, reach-through
  • Where: plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.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 Three Sweep files reach through the settings object into its `run_path` to get the root, the ledger and the run directory: `request.run_path.root`, `request.run_path.ledger` and `request.run_path.relative`. `Crc::Sweep::Settings` already answers `ledger_path` and `plugin_root`. Ruling S67 makes it answer the three questions too. ## Reproduce n/a: structure-wave reach-through answer, nothing to reproduce ## Approach Required work: 1. In `plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.rb`, add `def root = run_path.root`, `def ledger = run_path.ledger` and `def run_dir = run_path.relative` next to `ledger_path` and `plugin_root`. — check: present `def run_dir` in `plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.rb` 2. In `plugins/os-sdlc/lib/os_sdlc/crc/sweep/file_classification.rb:12`, replace `request.run_path.relative` with `request.run_dir`. — check: absent `request.run_path` in `plugins/os-sdlc/lib/os_sdlc/crc/sweep/file_classification.rb` 3. In `plugins/os-sdlc/lib/os_sdlc/crc/sweep/files.rb:24`, replace `request.run_path.root` with `request.root`. — check: absent `request.run_path` in `plugins/os-sdlc/lib/os_sdlc/crc/sweep/files.rb` 4. In `plugins/os-sdlc/lib/os_sdlc/crc/sweep/substitutions.rb:8`, replace `request.run_path.ledger` with `request.ledger`. — check: absent `request.run_path` in `plugins/os-sdlc/lib/os_sdlc/crc/sweep/substitutions.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 `Crc::Sweep::Settings`, when `root`, `ledger` and `run_dir` are called, then they return `run_path.root`, `run_path.ledger` and `run_path.relative`. 3. Given the three Sweep files, when searched for `request.run_path`, then none remains. ## Owner sketch ```ruby class OsSdlc::Crc::Sweep::Settings def root = run_path.root def ledger = run_path.ledger def run_dir = run_path.relative def ledger_path = run_path.relative_file("ledger.tsv") def plugin_root = target.path end ``` ## Non-goals `crc/sweep/run.rb` sends the settings four messages (`run_path`, `target`, `excludes`, `histories`). Ruling S68 keeps that. Add no test. ## Origin - Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs) - Improvised this session: none - Chain: reach-through request.run_path.* in 3 Sweep files ← Settings holds run_path and does not answer root, ledger and run_dir ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S67) - Root candidate: none found; searched Sweep::Settings, run_path, RunPath, run_dir, Settings, reach-through - Where: plugins/os-sdlc/lib/os_sdlc/crc/sweep/settings.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 (structure-change map).

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

Resolution

Done: S67 applied: Sweep::Settings answers root, ledger and run_dir; file_classification.rb, files.rb and substitutions.rb call them.

Evidence: ca392ee6 (Runner commit, gate green, 3 min 2 s). Implementation 91, dispatch 773.

Follow-ups: none; crc/sweep/run.rb still sends @request.run_path.ledger?/.relative/.root at 4 sites outside S67; the post-step re-measure decides whether it is a row.

## Resolution **Done:** S67 applied: Sweep::Settings answers root, ledger and run_dir; file_classification.rb, files.rb and substitutions.rb call them. **Evidence:** ca392ee6 (Runner commit, gate green, 3 min 2 s). Implementation 91, dispatch 773. **Follow-ups:** none; crc/sweep/run.rb still sends @request.run_path.ledger?/.relative/.root at 4 sites outside S67; the post-step re-measure decides whether it is a row.
jared closed this issue 2026-10-19 22:48:16 +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#1179
No description provided.