Introduce parameter object: SourceTree for path+root #1201

Closed
opened 2026-10-20 02:11:14 +00:00 by jared · 4 comments
Owner

Problem

path+root (data_clump, score 15) spans 5 classes in concepts CollaboratorPass, Crc, Evidence.

  • OsSdlc::CollaboratorPass::SourceSnippet (/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/collaborator_pass/source_snippet.rb:9)
  • OsSdlc::Crc::Census::PathCheck (/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/crc/census/path_check.rb:7)
  • OsSdlc::Evidence::Fingerprint (/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint.rb:8)
  • OsSdlc::Evidence::Probe::Lsp::Lookup (/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/probe/lsp/lookup.rb:8)
  • OsSdlc::Evidence::Resolution (/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/resolution.rb:9)

support 5; maximal

  • crc-census born at as

Approach

No existing object holds the names; create one value object and pass it. Object: OsSdlc::Evidence::SourceTree (built at plugins/os-sdlc/lib/os_sdlc/evidence/collection.rb:45). The evidence CLI resolves tokens under any --root directory and loads no Project, so OsSdlc::Project cannot be the owner without a fake project or a new config requirement; one Evidence::SourceTree value built once in Collection from --root, holding root and the File.join, readlines, and glob calls the sites repeat, removes root from every Evidence site. PathCheck and SourceSnippet already have a Project at their callers and stay for a later preserve_whole_object recipe in their own concepts.

Required work:

  1. OsSdlc::Evidence takes fingerprints, source_tree, units, unresolved
  2. OsSdlc::Evidence::Resolution takes source_tree
  3. OsSdlc::Evidence::Resolution::TokenResolution takes token, source_tree
  4. OsSdlc::Evidence::Resolution::ShapeResolution takes token, source_tree
  5. OsSdlc::Evidence::PhantomEntry takes token, expected_new, source_tree
  6. OsSdlc::Evidence::Fingerprint takes unit, source_tree, lsp_runner
  7. OsSdlc::Evidence::Fingerprint::MethodProbes takes method_name, source_tree, lsp_runner, site
  8. OsSdlc::Evidence::Probe::Lsp takes method_name, source_tree, runner, site
  9. OsSdlc::Evidence::Probe::Lsp::Lookup takes method_name, source_tree, runner, site

Orchestrator work: re-measure with bin/collaborator-pass measure --runs docs/crc/os-sdlc/collaborator-runs, then stop-check.

Rejected: preserve_whole_object, build_once_at_entry — The evidence CLI resolves tokens under any --root directory and loads no Project, so OsSdlc::Project cannot be the owner without a fake project or a new config requirement; one Evidence::SourceTree value built once in Collection from --root, holding root and the File.join, readlines, and glob calls the sites repeat, removes root from every Evidence site. PathCheck and SourceSnippet already have a Project at their callers and stay for a later preserve_whole_object recipe in their own concepts.

Acceptance criteria

  1. Given today's lib, when bin/collaborator-pass measure --sources params,inward,flay runs after the change, then the data_clump finding path+root scores at most 6 (was 15) and none of root appears in its names.
  2. Given a directory and tokens, when bin/evidence collect runs with --root, then the brief lines and the --explain output are unchanged.
  3. Given a directory with no .sdlc/project.yaml, when bin/evidence collect runs, then it still collects evidence and exits as before.
  4. Given the touched Evidence classes, when their tests run, then they pass.

Owner sketch

OsSdlc::Evidence::SourceTree = Data.define(:root)

class OsSdlc::Evidence
  def initialize(fingerprints, source_tree, units, unresolved)
  end
end

class OsSdlc::Evidence::Resolution
  def initialize(source_tree)
  end
end

class OsSdlc::Evidence::Resolution::TokenResolution
  def initialize(token, source_tree)
  end
end

class OsSdlc::Evidence::Resolution::ShapeResolution
  def initialize(token, source_tree)
  end
end

class OsSdlc::Evidence::PhantomEntry
  def initialize(token, expected_new, source_tree)
  end
end

class OsSdlc::Evidence::Fingerprint
  def initialize(unit, source_tree, lsp_runner)
  end
end

class OsSdlc::Evidence::Fingerprint::MethodProbes
  def initialize(method_name, source_tree, lsp_runner, site)
  end
end

class OsSdlc::Evidence::Probe::Lsp
  def initialize(method_name, source_tree, runner, site)
  end
end

class OsSdlc::Evidence::Probe::Lsp::Lookup
  def initialize(method_name, source_tree, runner, site)
  end
end

Origin

  • Trigger: bin/collaborator-pass run 20261020T020325Z
  • Improvised this session: none
  • Chain: path+root across 5 classes ← DESIGN (plugins/os-sdlc/lib/os_sdlc/evidence.rb)
  • Root candidate: none found; searched SourceTree, path+root, source_tree, parameter object, Evidence
  • Where: plugins/os-sdlc/lib/os_sdlc/evidence.rb
  • 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 path+root (data_clump, score 15) spans 5 classes in concepts CollaboratorPass, Crc, Evidence. - `OsSdlc::CollaboratorPass::SourceSnippet` (`/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/collaborator_pass/source_snippet.rb:9`) - `OsSdlc::Crc::Census::PathCheck` (`/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/crc/census/path_check.rb:7`) - `OsSdlc::Evidence::Fingerprint` (`/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint.rb:8`) - `OsSdlc::Evidence::Probe::Lsp::Lookup` (`/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/probe/lsp/lookup.rb:8`) - `OsSdlc::Evidence::Resolution` (`/home/jared/dev/cc-os/.claude/worktrees/crc-os-sdlc-run-3/plugins/os-sdlc/lib/os_sdlc/evidence/resolution.rb:9`) support 5; maximal - crc-census born at as ## Approach No existing object holds the names; create one value object and pass it. Object: `OsSdlc::Evidence::SourceTree` (built at plugins/os-sdlc/lib/os_sdlc/evidence/collection.rb:45). The evidence CLI resolves tokens under any --root directory and loads no Project, so OsSdlc::Project cannot be the owner without a fake project or a new config requirement; one Evidence::SourceTree value built once in Collection from --root, holding root and the File.join, readlines, and glob calls the sites repeat, removes root from every Evidence site. PathCheck and SourceSnippet already have a Project at their callers and stay for a later preserve_whole_object recipe in their own concepts. Required work: 1. `OsSdlc::Evidence` takes `fingerprints, source_tree, units, unresolved` 2. `OsSdlc::Evidence::Resolution` takes `source_tree` 3. `OsSdlc::Evidence::Resolution::TokenResolution` takes `token, source_tree` 4. `OsSdlc::Evidence::Resolution::ShapeResolution` takes `token, source_tree` 5. `OsSdlc::Evidence::PhantomEntry` takes `token, expected_new, source_tree` 6. `OsSdlc::Evidence::Fingerprint` takes `unit, source_tree, lsp_runner` 7. `OsSdlc::Evidence::Fingerprint::MethodProbes` takes `method_name, source_tree, lsp_runner, site` 8. `OsSdlc::Evidence::Probe::Lsp` takes `method_name, source_tree, runner, site` 9. `OsSdlc::Evidence::Probe::Lsp::Lookup` takes `method_name, source_tree, runner, site` Orchestrator work: re-measure with bin/collaborator-pass measure --runs docs/crc/os-sdlc/collaborator-runs, then stop-check. Rejected: preserve_whole_object, build_once_at_entry — The evidence CLI resolves tokens under any --root directory and loads no Project, so OsSdlc::Project cannot be the owner without a fake project or a new config requirement; one Evidence::SourceTree value built once in Collection from --root, holding root and the File.join, readlines, and glob calls the sites repeat, removes root from every Evidence site. PathCheck and SourceSnippet already have a Project at their callers and stay for a later preserve_whole_object recipe in their own concepts. ## Acceptance criteria 1. Given today's lib, when bin/collaborator-pass measure --sources params,inward,flay runs after the change, then the data_clump finding path+root scores at most 6 (was 15) and none of root appears in its names. 2. Given a directory and tokens, when bin/evidence collect runs with --root, then the brief lines and the --explain output are unchanged. 3. Given a directory with no .sdlc/project.yaml, when bin/evidence collect runs, then it still collects evidence and exits as before. 4. Given the touched Evidence classes, when their tests run, then they pass. ## Owner sketch ```ruby OsSdlc::Evidence::SourceTree = Data.define(:root) class OsSdlc::Evidence def initialize(fingerprints, source_tree, units, unresolved) end end class OsSdlc::Evidence::Resolution def initialize(source_tree) end end class OsSdlc::Evidence::Resolution::TokenResolution def initialize(token, source_tree) end end class OsSdlc::Evidence::Resolution::ShapeResolution def initialize(token, source_tree) end end class OsSdlc::Evidence::PhantomEntry def initialize(token, expected_new, source_tree) end end class OsSdlc::Evidence::Fingerprint def initialize(unit, source_tree, lsp_runner) end end class OsSdlc::Evidence::Fingerprint::MethodProbes def initialize(method_name, source_tree, lsp_runner, site) end end class OsSdlc::Evidence::Probe::Lsp def initialize(method_name, source_tree, runner, site) end end class OsSdlc::Evidence::Probe::Lsp::Lookup def initialize(method_name, source_tree, runner, site) end end ``` ## Origin - Trigger: bin/collaborator-pass run 20261020T020325Z - Improvised this session: none - Chain: path+root across 5 classes ← DESIGN (`plugins/os-sdlc/lib/os_sdlc/evidence.rb`) - Root candidate: none found; searched SourceTree, path+root, source_tree, parameter object, Evidence - Where: plugins/os-sdlc/lib/os_sdlc/evidence.rb - 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 (persistent worktree, run 3 collaborator round).

Work started on branch crc-os-sdlc-run-3 (persistent worktree, run 3 collaborator round).
Author
Owner

Resolution

Done: Evidence::SourceTree holds the path and root pair; the path+root data clump is gone.

Evidence: 8691c784; pipeline suite-check green (dispatch 840); contract-auditor pass (dispatch 841); delta-check ok: path+root 15->0, data_clump total 266->209 vs baseline 20261020T020325Z

Follow-ups: none

## Resolution **Done:** Evidence::SourceTree holds the path and root pair; the path+root data clump is gone. **Evidence:** 8691c784; pipeline suite-check green (dispatch 840); contract-auditor pass (dispatch 841); delta-check ok: path+root 15->0, data_clump total 266->209 vs baseline 20261020T020325Z **Follow-ups:** none
jared closed this issue 2026-10-20 03:52:47 +00:00
Author
Owner

Follow-up dropped (skeptic, run 3 close-out): "rows-merge refuses created rows". RowLineCheck works as designed.

Follow-up dropped (skeptic, run 3 close-out): "rows-merge refuses created rows". RowLineCheck works as designed.
Author
Owner

Follow-up dropped (skeptic, run 3 close-out): "census path mode ignores --exclude". This is documented behavior; the run prompt and skill wording need the fix, not the code.

Follow-up dropped (skeptic, run 3 close-out): "census path mode ignores --exclude". This is documented behavior; the run prompt and skill wording need the fix, not the code.
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#1201
No description provided.