Parse each source file once per process through a CodeShape source set #1740

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

Problem

os-sdlc has 25 parse sites and no shared parse, so one command parses the same lib tree up to four times, and five pieces list the source set with different sorting and path rules. Blocked by #1729.

Observed

The AST inventory of this session (2026-11-12, plugins/os-sdlc/lib): one Extractor run parses lib/**/*.rb four times (extractor.rb:57, extractor.rb:69, base_namespaces.rb:13, CopOffenses). ConceptCycleCheck builds References twice (lint/concept_cycle_check.rb:38, :43). Holders::Count parses the entry files twice (holders/count.rb:29,31). Source-set globs differ: system_model/extractor.rb:8 (sorted), lint/concept_cycle_check/references.rb:14 (unsorted), detector/error_lineage/definitions.rb:14 and rescue_index.rb:11 (sorted), crc/census/files.rb:49 (relative), detector/{holders/entries,constructor_graph,entry_points}.rb (bin/*), system_model/extractor/entry_scripts.rb:30-32 ({bin,hooks}), cops/structural/unused_private_method/superclass_calls.rb:36.

Reproduce

n/a: design finding from the ast inventory of this session (2026-11-12, plugins/os-sdlc/lib).

Approach

Not decided; the takedown designs it.

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: lib parsed up to four times per command ← 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 parse once, source set glob, Prism.parse, CopSource
  • Where: plugins/os-sdlc/lib/os_sdlc/system_model/extractor.rb, lint/concept_cycle_check.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 os-sdlc has 25 parse sites and no shared parse, so one command parses the same `lib` tree up to four times, and five pieces list the source set with different sorting and path rules. Blocked by #1729. ## Observed The AST inventory of this session (2026-11-12, `plugins/os-sdlc/lib`): one `Extractor` run parses `lib/**/*.rb` four times (`extractor.rb:57`, `extractor.rb:69`, `base_namespaces.rb:13`, `CopOffenses`). `ConceptCycleCheck` builds `References` twice (`lint/concept_cycle_check.rb:38`, `:43`). `Holders::Count` parses the entry files twice (`holders/count.rb:29,31`). Source-set globs differ: `system_model/extractor.rb:8` (sorted), `lint/concept_cycle_check/references.rb:14` (unsorted), `detector/error_lineage/definitions.rb:14` and `rescue_index.rb:11` (sorted), `crc/census/files.rb:49` (relative), `detector/{holders/entries,constructor_graph,entry_points}.rb` (`bin/*`), `system_model/extractor/entry_scripts.rb:30-32` (`{bin,hooks}`), `cops/structural/unused_private_method/superclass_calls.rb:36`. ## Reproduce n/a: design finding from the ast inventory of this session (2026-11-12, `plugins/os-sdlc/lib`). ## Approach Not decided; the takedown designs it. 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: lib parsed up to four times per command ← 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 parse once, source set glob, Prism.parse, CopSource - Where: `plugins/os-sdlc/lib/os_sdlc/system_model/extractor.rb`, `lint/concept_cycle_check.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#1740
No description provided.