Replace the three whole-tree node flatten walks with one #1737

Open
opened 2026-11-12 21:37:49 +00:00 by jared · 0 comments
Owner

Problem

Three files hold the same recursive walk that flattens a Prism tree to a node list. Prism already offers breadth_first_search_all, which two other files use.

Observed

The AST inventory of this session (2026-11-12, plugins/os-sdlc/lib): detector/entry_points/tree.rb:16, system_model/extractor/subtree.rb:7, mutation_test/taxonomy/tree.rb:8 each do [node] + compact_child_nodes.flat_map(...). entry_points/tree.rb also tolerates a nil root and adds constants. crc/census/requiring_file.rb:22 and detector/parameter_uses/site_uses.rb:38 use breadth_first_search.

Reproduce

n/a: structure change; the existing suite is the proof.

Approach

Not decided. One walk, in CodeShape or Prism's own search; the three copies go.

Required work: none beyond the acceptance criteria.

Origin

  • Trigger: split of #1718 by Jared (rulings 145 and 146 in docs/decisions/rulings.tsv, 2026-11-12) after takedown run docs/takedown/1718-20261112-160038/ failed green-suite; parent #1718
  • Improvised this session: none
  • Chain: three copies of one tree walk ← no object owns facts read from parsed Ruby code, so each detector, lint check, and cop writes its own copy ← DESIGN (#1718; docs/system-design-format/README.md:242)
  • Root candidate: none found; searched flat_map, compact_child_nodes, breadth_first_search, tree walk, Prism
  • Where: plugins/os-sdlc/lib/os_sdlc/detector/entry_points/tree.rb, system_model/extractor/subtree.rb, mutation_test/taxonomy/tree.rb
  • Session: 784c0808-1e40-4296-8f93-77c40ca419c2
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/784c0808-1e40-4296-8f93-77c40ca419c2.jsonl

VERDICT: CREATE
REASON: Jared ruled the split of #1718 (ruling 146); the backlog search found no open ticket with the same mechanism.

## Problem Three files hold the same recursive walk that flattens a Prism tree to a node list. Prism already offers `breadth_first_search_all`, which two other files use. ## Observed The AST inventory of this session (2026-11-12, `plugins/os-sdlc/lib`): `detector/entry_points/tree.rb:16`, `system_model/extractor/subtree.rb:7`, `mutation_test/taxonomy/tree.rb:8` each do `[node] + compact_child_nodes.flat_map(...)`. `entry_points/tree.rb` also tolerates a nil root and adds `constants`. `crc/census/requiring_file.rb:22` and `detector/parameter_uses/site_uses.rb:38` use `breadth_first_search`. ## Reproduce n/a: structure change; the existing suite is the proof. ## Approach Not decided. One walk, in `CodeShape` or Prism's own search; the three copies go. Required work: none beyond the acceptance criteria. ## Origin - Trigger: split of #1718 by Jared (rulings 145 and 146 in `docs/decisions/rulings.tsv`, 2026-11-12) after takedown run `docs/takedown/1718-20261112-160038/` failed green-suite; parent #1718 - Improvised this session: none - Chain: three copies of one tree walk ← no object owns facts read from parsed Ruby code, so each detector, lint check, and cop writes its own copy ← DESIGN (#1718; `docs/system-design-format/README.md:242`) - Root candidate: none found; searched flat_map, compact_child_nodes, breadth_first_search, tree walk, Prism - Where: `plugins/os-sdlc/lib/os_sdlc/detector/entry_points/tree.rb`, `system_model/extractor/subtree.rb`, `mutation_test/taxonomy/tree.rb` - Session: 784c0808-1e40-4296-8f93-77c40ca419c2 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/784c0808-1e40-4296-8f93-77c40ca419c2.jsonl VERDICT: CREATE REASON: Jared ruled the split of #1718 (ruling 146); the backlog search found no open ticket with the same mechanism.
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#1737
No description provided.