Commit 5180ff8
committed
refactor(layering): give each colliding rule id its own number
R11 and R13 each named two unrelated rules. report() groups violations by
the rule string and titles every annotation `Layering drift (${rule})`, so a
shared number made the guard's output ambiguous about which rule fired.
Reference counts decided which rule keeps its number. R11 package-boundaries
is named in ~30 places (CONTEXT.md, ADR 0019, testing.md, the mutation and
affected-check configs, four package source comments, its own tests) against
one for the contracts rule; R13 platform-package-substrate is the RULE in
three policy files plus CONTEXT.md, ADR 0019 and model.ts against two for the
devices cutover. Both keepers stay put and the two newest rules move up:
R11 contracts-implementation-authority -> R18
R13 device-inventory-cutover -> R17
R17/R18 follow the namespace's existing order-of-addition convention
(R14 #1701 < R15 #1702 < R16 #1724): device-inventory-cutover landed in
#1699, contracts-implementation-authority in #1701.
The rule-map header in check.ts is renumbered and reordered back into numeric
order, and gains the R18 entry the contracts rule never had -- without it a
reader looking up an R18 violation finds nothing where they used to find the
wrong rule. deviceInventoryCutoverSummary() was also the only OK-line summary
not leading with its rule number, which is what made the number unreadable
from the success line in the first place.
No docs needed changing: all twelve R11/R13 mentions across CONTEXT.md,
ADR 0019 and docs/agents/testing.md already refer to the keeper rules, and
both movers are described there in prose without a number.1 parent 0fc0b69 commit 5180ff8
3 files changed
Lines changed: 7 additions & 5 deletions
File tree
- scripts/layering
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
0 commit comments