inward_edges runs the InwardDependency cop through Detector::CopSites #1229

Closed
opened 2026-10-22 12:28:06 +00:00 by jared · 1 comment
Owner

Problem

Step 2 of Phase 1 in docs/crc/os-sdlc/detector-plan.md converts the inward-edge detector. Today collaborator_pass/inward_edges.rb re-implements the layer rule that the InwardDependency cop already holds. Two copies of one rule can drift. crc/inward_delta parses the cop message text to get its data.

Reproduce

n/a: design ticket

Approach

collaborator_pass/inward_edges.rb runs the InwardDependency cop through Detector::CopSites. The cop records outer, inner, and constant as keys on its finding. crc/inward_delta reads the runner output and stops parsing the cop message. The Signal output does not change. Plan step 2 says to pilot this conversion first.

Required work:

  1. Replace the layer rule in inward_edges.rb with a runner call — check: present CopSites in plugins/os-sdlc/lib/os_sdlc/collaborator_pass/inward_edges.rb
  2. Record outer, inner, and constant as keys on the cop finding.
  3. Switch crc/inward_delta from message parsing to the runner.

Acceptance criteria

  1. Given a file with an inward dependency, when inward_edges runs, then it returns the same Signal rows as before.
  2. Given an InwardDependency finding, when the runner returns it, then outer, inner, and constant are keys on the finding.
  3. Given crc/inward_delta, when it runs, then it reads the runner and does not parse the cop message.
  4. Given the existing tests, when the suite runs, then they stay green.

Origin

  • Session: b2f2f23b-2a60-45d3-8f2c-f66275d9ab4f
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/b2f2f23b-2a60-45d3-8f2c-f66275d9ab4f.jsonl
  • Where: docs/crc/os-sdlc/detector-plan.md
  • Root candidate: none found; searched inward_edges, InwardDependency, CopSites, inward_delta, Detector

VERDICT: CREATE

Blocked by #1228

## Problem Step 2 of Phase 1 in docs/crc/os-sdlc/detector-plan.md converts the inward-edge detector. Today collaborator_pass/inward_edges.rb re-implements the layer rule that the InwardDependency cop already holds. Two copies of one rule can drift. crc/inward_delta parses the cop message text to get its data. ## Reproduce n/a: design ticket ## Approach `collaborator_pass/inward_edges.rb` runs the `InwardDependency` cop through `Detector::CopSites`. The cop records `outer`, `inner`, and `constant` as keys on its finding. `crc/inward_delta` reads the runner output and stops parsing the cop message. The `Signal` output does not change. Plan step 2 says to pilot this conversion first. Required work: 1. Replace the layer rule in `inward_edges.rb` with a runner call — check: present `CopSites` in `plugins/os-sdlc/lib/os_sdlc/collaborator_pass/inward_edges.rb` 2. Record `outer`, `inner`, and `constant` as keys on the cop finding. 3. Switch `crc/inward_delta` from message parsing to the runner. ## Acceptance criteria 1. Given a file with an inward dependency, when `inward_edges` runs, then it returns the same `Signal` rows as before. 2. Given an `InwardDependency` finding, when the runner returns it, then `outer`, `inner`, and `constant` are keys on the finding. 3. Given `crc/inward_delta`, when it runs, then it reads the runner and does not parse the cop message. 4. Given the existing tests, when the suite runs, then they stay green. ## Origin - Session: b2f2f23b-2a60-45d3-8f2c-f66275d9ab4f - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/b2f2f23b-2a60-45d3-8f2c-f66275d9ab4f.jsonl - Where: docs/crc/os-sdlc/detector-plan.md - Root candidate: none found; searched inward_edges, InwardDependency, CopSites, inward_delta, Detector VERDICT: CREATE Blocked by #1228
Author
Owner

Resolution

Done: InwardDependency records constant, outer, inner through report; CollaboratorPass::InwardEdges runs the cop through Detector::CopSites and builds the same 50 Signal rows from finding.facts; no message parsing. The crc-inward-delta switch is held as ruling R1 in docs/crc/os-sdlc/collaborator-rulings.tsv (default: message parsing stays until Phase 3 bin/detector).

Evidence: fast-batch-7 merged to main ae057ddd: commits f8cb385d cd17e9bb; memo docs/crc/os-sdlc/fast-batch-7/finding-b-inward-edges-runs-cop.md; Signal rows byte-identical

Follow-ups: R1 crc-inward-delta structured input, ruled in detector-plan.md Phase 3 (ruling row written, no new ticket until Jared rules); R2 InwardDependency fires at inward_edges.rb:8 and effect_sites.rb:8 because a detector names a cop constant, held for the detector-layer ADR

## Resolution **Done:** InwardDependency records constant, outer, inner through report; CollaboratorPass::InwardEdges runs the cop through Detector::CopSites and builds the same 50 Signal rows from finding.facts; no message parsing. The crc-inward-delta switch is held as ruling R1 in docs/crc/os-sdlc/collaborator-rulings.tsv (default: message parsing stays until Phase 3 bin/detector). **Evidence:** fast-batch-7 merged to main ae057ddd: commits f8cb385d cd17e9bb; memo docs/crc/os-sdlc/fast-batch-7/finding-b-inward-edges-runs-cop.md; Signal rows byte-identical **Follow-ups:** R1 crc-inward-delta structured input, ruled in detector-plan.md Phase 3 (ruling row written, no new ticket until Jared rules); R2 InwardDependency fires at inward_edges.rb:8 and effect_sites.rb:8 because a detector names a cop constant, held for the detector-layer ADR
jared closed this issue 2026-10-22 12:56:13 +00:00
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#1229
No description provided.