Give constant-node-to-name conversion one owner in CodeShape #1736

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

Problem

Eight pieces convert a constant node to its name parts, and they differ on dynamic paths, self::, the leading ::, and nil results. Blocked by #1729.

Observed

The AST inventory of this session (2026-11-12, plugins/os-sdlc/lib): constant_path.rb:1-36 is the shared ConstantPath (parts drops the root anchor; rooted_parts keeps it and has one caller, holders/visitor.rb:38). Other copies: crc/definitions/namespace_definitions.rb:27-30, system_model/extractor/fact_scan.rb:27 (calls full_name with no rescue), detector/constructor_graph/visitor.rb:37 and call.rb:19 (.slice.split("::"), no dynamic-path check), detector/entry_points/tree.rb:20. RuboCop side: cops/structural/rescue_site/constant_parts.rb, const_name and identifier.source uses in dry/owned_message/send_match.rb:31, collaborator_construction_in_initialize.rb:71, query_method_reaches_write/write_chain_offense.rb:68, module_owns_instance_state.rb:39.

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: eight constant-name conversions with different rules ← 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 ConstantPath, constant node to name, rooted_parts, const_name
  • Where: plugins/os-sdlc/lib/os_sdlc/constant_path.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 Eight pieces convert a constant node to its name parts, and they differ on dynamic paths, `self::`, the leading `::`, and nil results. Blocked by #1729. ## Observed The AST inventory of this session (2026-11-12, `plugins/os-sdlc/lib`): `constant_path.rb:1-36` is the shared `ConstantPath` (`parts` drops the root anchor; `rooted_parts` keeps it and has one caller, `holders/visitor.rb:38`). Other copies: `crc/definitions/namespace_definitions.rb:27-30`, `system_model/extractor/fact_scan.rb:27` (calls `full_name` with no rescue), `detector/constructor_graph/visitor.rb:37` and `call.rb:19` (`.slice.split("::")`, no dynamic-path check), `detector/entry_points/tree.rb:20`. RuboCop side: `cops/structural/rescue_site/constant_parts.rb`, `const_name` and `identifier.source` uses in `dry/owned_message/send_match.rb:31`, `collaborator_construction_in_initialize.rb:71`, `query_method_reaches_write/write_chain_offense.rb:68`, `module_owns_instance_state.rb:39`. ## 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: eight constant-name conversions with different rules ← 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 ConstantPath, constant node to name, rooted_parts, const_name - Where: `plugins/os-sdlc/lib/os_sdlc/constant_path.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#1736
No description provided.