ADR-0015: Every violation carries a stable id and a line and column
- Status: Accepted
- Date: 2026-09-20
- Derives from: design.md § Precision an agent can act on, § Reporters (
sariffingerprints), § What agents actually do with rules - Constrains: architecture.md § The graph document, § Outputs and CI contract
- Implemented by: Wave 1 plan
Context
dependency-cruiser and ArchUnitNET stop at the file or the type. An agent given a line edits the right import on the first try; a reviewer saying "fix RB-4f2a" needs the reference to mean the same thing across runs.
Decision
- Every edge carries
lineandcolumnfrom the AST span, the PDB sequence point or the Python node. - Every violation carries an
id:RB-followed by the first eight hex characters of a SHA-256 over the rule name, thefrompath, thetopath and thedependencyKind, in that order, separated by\n. Line numbers are excluded so the id survives an unrelated edit above the import. - The id is the SARIF
partialFingerprintsvalue, theknownViolationsbaseline key, and the reference in theagent,junit,trxand pull-request outputs. - Every report carries a receipt:
summary.inspectedwith counts of files, assemblies and modules per language.
Consequences
- Baselines written by
baselinesurvive line churn and fail loudly when the rule or the edge changes. - The hashing function lives in
rb-modeland is covered by a fixed-vector test, since a change would invalidate every baseline in the wild.
Alternatives considered
- Include the line in the hash. Rejected: every unrelated edit would churn the baseline.
- A sequential id. Rejected: not stable across runs or machines.