effect_sites runs the EffectInModel cop through Detector::CopSites #1230

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

Problem

Step 3 of Phase 1 in docs/crc/os-sdlc/detector-plan.md converts the effect-site detector. Today collaborator_pass/effect_sites.rb finds effect calls by its own code. The EffectInModel cop finds the same calls. EffectCall is shared by the cop and the detector, so it must stay on RuboCop AST.

Reproduce

n/a: design ticket

Approach

collaborator_pass/effect_sites.rb runs the EffectInModel cop through Detector::CopSites. The cop config widens the role set to model and value. EffectCall stays on RuboCop AST. The Signal output does not change.

Required work:

  1. Replace the effect-call search in effect_sites.rb with a runner call — check: present CopSites in plugins/os-sdlc/lib/os_sdlc/collaborator_pass/effect_sites.rb
  2. Set the cop role set to model and value through the cop config.

Acceptance criteria

  1. Given a file with an effect call in a model or a value, when effect_sites runs, then it returns the same Signal rows as before.
  2. Given the cop config with roles model and value, when the runner runs, then it reports effect calls in both roles.
  3. 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 effect_sites, EffectInModel, CopSites, EffectCall

VERDICT: CREATE

Blocked by #1228

## Problem Step 3 of Phase 1 in docs/crc/os-sdlc/detector-plan.md converts the effect-site detector. Today collaborator_pass/effect_sites.rb finds effect calls by its own code. The EffectInModel cop finds the same calls. `EffectCall` is shared by the cop and the detector, so it must stay on RuboCop AST. ## Reproduce n/a: design ticket ## Approach `collaborator_pass/effect_sites.rb` runs the `EffectInModel` cop through `Detector::CopSites`. The cop config widens the role set to model and value. `EffectCall` stays on RuboCop AST. The `Signal` output does not change. Required work: 1. Replace the effect-call search in `effect_sites.rb` with a runner call — check: present `CopSites` in `plugins/os-sdlc/lib/os_sdlc/collaborator_pass/effect_sites.rb` 2. Set the cop role set to model and value through the cop config. ## Acceptance criteria 1. Given a file with an effect call in a model or a value, when `effect_sites` runs, then it returns the same `Signal` rows as before. 2. Given the cop config with roles model and value, when the runner runs, then it reports effect calls in both roles. 3. 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 effect_sites, EffectInModel, CopSites, EffectCall VERDICT: CREATE Blocked by #1228
Author
Owner

Resolution

Done: EffectInModel records label and role through report and reads its role set from the existing Roles cop config; CollaboratorPass::EffectSites runs the cop through Detector::CopSites with Roles [model, value] and builds the same 22 Signal rows. EffectCall stays on RuboCop AST.

Evidence: fast-batch-7 merged to main ae057ddd: commit dbfbf0d2; memo docs/crc/os-sdlc/fast-batch-7/finding-c-effect-sites-runs-cop.md; Signal rows byte-identical; CopSites registry fix pinned in tests/detector/cop_sites_test.rb

Follow-ups: none

## Resolution **Done:** EffectInModel records label and role through report and reads its role set from the existing Roles cop config; CollaboratorPass::EffectSites runs the cop through Detector::CopSites with Roles [model, value] and builds the same 22 Signal rows. EffectCall stays on RuboCop AST. **Evidence:** fast-batch-7 merged to main ae057ddd: commit dbfbf0d2; memo docs/crc/os-sdlc/fast-batch-7/finding-c-effect-sites-runs-cop.md; Signal rows byte-identical; CopSites registry fix pinned in tests/detector/cop_sites_test.rb **Follow-ups:** none
jared closed this issue 2026-10-22 12:56:14 +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#1230
No description provided.