What is missing
No existing spec has two selectors that scope the same entity. When two flows each scope TaskProcessor.Run and a diff touches it, the expected behaviour is exactly 2 findings (one per flow) — not 4 (duplication) and not 1 (collapsing).
Grepping all e2e yaml specs for 2 findings returns zero results.
Why it matters
In production, a function like an API entry point is often scoped by multiple flows (e.g., AuthSafety and RateLimitPolicy). If findings are duplicated or collapsed, review routing breaks silently.
Proposed test
Fixture: go-module-multi-method
Setup: install an overlay with two selectors (FlowAlpha, FlowBeta) both pointing at service.TaskProcessor.Run via anchor qualified_name. Apply demo.diff (which touches Run).
steps:
- name: two_overlapping_selectors_produce_two_findings
command: graph-harness validate-diff --diff demo.diff --json
assert:
- { type: exit_code, expected: 0 }
- { type: contains, value: "2 findings" }
- { type: contains, value: "FlowAlpha" }
- { type: contains, value: "FlowBeta" }
Spec location: tests/e2e/specs/validate-diff/overlapping-selectors-no-duplicate-findings.yaml
What is missing
No existing spec has two selectors that scope the same entity. When two flows each scope
TaskProcessor.Runand a diff touches it, the expected behaviour is exactly 2 findings (one per flow) — not 4 (duplication) and not 1 (collapsing).Grepping all e2e yaml specs for
2 findingsreturns zero results.Why it matters
In production, a function like an API entry point is often scoped by multiple flows (e.g.,
AuthSafetyandRateLimitPolicy). If findings are duplicated or collapsed, review routing breaks silently.Proposed test
Fixture:
go-module-multi-methodSetup: install an overlay with two selectors (
FlowAlpha,FlowBeta) both pointing atservice.TaskProcessor.Runviaanchor qualified_name. Applydemo.diff(which touchesRun).Spec location:
tests/e2e/specs/validate-diff/overlapping-selectors-no-duplicate-findings.yaml