Sdlc/Structural/InwardDependency: carve out the composition root and a namespace's own children #1366

Open
opened 2026-10-25 21:23:22 +00:00 by jared · 0 comments
Owner

Problem

Sdlc/Structural/InwardDependency records references that no fix can change.
Shape: each const reference whose ledger role layer is outer to the file's role layer.
The message prescribes "pass the value in, or move the behavior to the outer layer".

Observed

89 hits, all in os-sdlc.
34 are plugins/os-sdlc/lib/os_sdlc/boot/commands.rb:7-46 (ledger role value), the composition root's command table: it must name every command, and neither fix applies.
plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb:9 records IssueSource::Forgejo/Github, its own nested implementations selected by a factory.

Reproduce

Run rubocop with .rubocop-sweep.yml (LedgerPath set) on the two files above.

Approach

Required work:

  1. Skip references from the Boot command table (the composition root wires every command).
  2. Skip a reference to a constant nested under the referencing file's own constant (a factory over its own implementations).

Carve-outs go in the cop matcher. Do not add config Exclude lists or test-path exclusions.

Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md)

Origin

  • Trigger: #1325 zero-false-positive audit of the Sdlc cops
  • Improvised this session: none
  • Chain: false positive on valid code ← cop matcher tests a proxy shape, not the real condition ← DESIGN (cop source named in Where:)
  • Root candidate: none found; searched the cop name, its mechanism terms, and false positive
  • Where: plugins/os-sdlc/lib/os_sdlc/cops/inward_dependency.rb (layer_ledger.rb:12-21, inward_dependency/constant_reference.rb)
  • Session: eb98cdcd-6783-46a0-b7df-cf18a8fe2a56
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1325/eb98cdcd-6783-46a0-b7df-cf18a8fe2a56.jsonl

VERDICT: CREATE

## Problem Sdlc/Structural/InwardDependency records references that no fix can change. Shape: each const reference whose ledger role layer is outer to the file's role layer. The message prescribes "pass the value in, or move the behavior to the outer layer". ## Observed 89 hits, all in os-sdlc. 34 are plugins/os-sdlc/lib/os_sdlc/boot/commands.rb:7-46 (ledger role `value`), the composition root's command table: it must name every command, and neither fix applies. plugins/os-sdlc/lib/os_sdlc/tracker/issue_source.rb:9 records `IssueSource::Forgejo`/`Github`, its own nested implementations selected by a factory. ## Reproduce Run rubocop with .rubocop-sweep.yml (LedgerPath set) on the two files above. ## Approach Required work: 1. Skip references from the Boot command table (the composition root wires every command). 2. Skip a reference to a constant nested under the referencing file's own constant (a factory over its own implementations). Carve-outs go in the cop matcher. Do not add config Exclude lists or test-path exclusions. Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md) ## Origin - Trigger: #1325 zero-false-positive audit of the Sdlc cops - Improvised this session: none - Chain: false positive on valid code ← cop matcher tests a proxy shape, not the real condition ← DESIGN (cop source named in Where:) - Root candidate: none found; searched the cop name, its mechanism terms, and false positive - Where: plugins/os-sdlc/lib/os_sdlc/cops/inward_dependency.rb (layer_ledger.rb:12-21, inward_dependency/constant_reference.rb) - Session: eb98cdcd-6783-46a0-b7df-cf18a8fe2a56 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1325/eb98cdcd-6783-46a0-b7df-cf18a8fe2a56.jsonl VERDICT: CREATE
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#1366
No description provided.