Move Detector::ErrorLineage definitions and scope onto CodeShape #1730

Open
opened 2026-11-12 21:37:43 +00:00 by jared · 1 comment
Owner

Problem

Detector::ErrorLineage keeps its own definition table and its own scope rule, a second copy of the job that CodeShape owns (#1718, ruling 145). Blocked by #1729.

Observed

detector/error_lineage/definitions.rb:21-71 and error_lineage/scope.rb:26 build a table of 1,822 names with a Scope Data object; Scope#resolve takes the first prefix that makes a known name. ErrorLineage also parses lib twice: with Prism in Definitions and with RuboCop in RescueIndex (rescue_index.rb:10-11), and calls MethodNames.in once per file.

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. ErrorLineage reads definitions and resolution from CodeShape and deletes its own table and Scope.

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: ErrorLineage keeps a second definition table and scope rule ← 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 ErrorLineage, definitions table, Scope, RescueIndex
  • Where: plugins/os-sdlc/lib/os_sdlc/detector/error_lineage/definitions.rb, scope.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 `Detector::ErrorLineage` keeps its own definition table and its own scope rule, a second copy of the job that `CodeShape` owns (#1718, ruling 145). Blocked by #1729. ## Observed `detector/error_lineage/definitions.rb:21-71` and `error_lineage/scope.rb:26` build a table of 1,822 names with a `Scope` Data object; `Scope#resolve` takes the first prefix that makes a known name. `ErrorLineage` also parses `lib` twice: with Prism in `Definitions` and with RuboCop in `RescueIndex` (`rescue_index.rb:10-11`), and calls `MethodNames.in` once per file. ## 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. `ErrorLineage` reads definitions and resolution from `CodeShape` and deletes its own table and `Scope`. 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: ErrorLineage keeps a second definition table and scope rule ← 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 ErrorLineage, definitions table, Scope, RescueIndex - Where: `plugins/os-sdlc/lib/os_sdlc/detector/error_lineage/definitions.rb`, `scope.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.
Author
Owner

Also blocked by #1741 (CodeShape::Definitions). #1729 builds only CodeShape::LexicalScope.

Also blocked by #1741 (CodeShape::Definitions). #1729 builds only CodeShape::LexicalScope.
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#1730
No description provided.