fix(layering): list the whole zone when R10's type-cycle ceiling is exceeded - #1852
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
|
Diagnostic-accuracy gap: the whole-zone member list is useful, but Report only that the zone is N above its ceiling and direct authors to changed files/import edges; add a replacement/edge-closure regression. Exact-head CI is otherwise green; no device evidence applies. |
…xceeded The per-zone R10 violation named members.find(<zone match>) — the alphabetically-first zone member, a file that had been in the cycle all along — so the +1 in #1825 x #1779 was found only by diffing largestTypeCycleMembers between commits. The ceiling records a count, not a membership, so the gate cannot name the joining file; it now lists every member of the over-budget zone and annotates the ceiling table instead. Closes #1837
Review nit: the overflow is net growth over the ceiling, not a join count (two joins and one departure print "1"), so the message no longer claims N members joined.
92ef061 to
60f88f3
Compare
|
Out of draft. CI is green on the actual head Second commit |
|
Reviewed exact head |
|
Summary
pnpm check:layeringR10 named the wrong file when a zone exceeded its type-cycle ceiling.checkTypeCycleBaselinereportedmembers.find(<zone match>)— the alphabetically-first zone member — so the #1825 × #1779 main break read[R10] 17 daemon-server files (baseline 16) at src/daemon/daemon-command-registry.ts, a file that had been in the cycle all along. The actual +1 (src/daemon/handlers/snapshot-interactor-capture.ts) was found only by diffinglargestTypeCycleMembersbetween two commits, ~40 min in.LARGEST_TYPE_CYCLE_ZONE_CEILINGSrecords a count per zone, not a membership, and the Layering Guard job checks out at depth 1, so there is no previous state to diff against inside the gate. The violation now lists every member of the over-budget zone (sorted) and annotates the ceiling table (scripts/layering/daemon-modularity.ts:1, like the sibling R9/R10 baseline violations) instead of an arbitrary member.Before:
After (planted: ceiling lowered 16 → 15 on the real tree):
The count is deliberately phrased as net overflow, not a join count: a change that adds two members and removes one prints
1 over the ceiling, so the message bounds nothing except that at least one listed file is new.No policy change: same ceilings, same rule id, same pass/fail set. Recording per-zone member lists (which would let the gate print the exact diff) would turn the count ratchet into a membership pin — a stricter policy the issue explicitly does not ask for; noted as an option, not taken.
Closes #1837. Refs #1781 A6, #1825, #1779.
Validation
R10 zone overflow lists the whole zone so the joining member is visibleplants a daemon-server +1 (src/daemon/snapshot-interactor-capture.ts, chosen to sort after the probes so the old first-member pick could not name it by luck; commands −1 keeps R9's total pinned) and asserts the single violation annotates the ceiling table and names all 17 members.git stashthe production file, runscripts/layering/daemon-modularity.test.ts):ℹ pass 10 / fail 0.node scripts/layering/check.tsisLayering guard: OK … the largest type-level cycle is 46 files (R9).pnpm check:affected --run: all runnable checks passed (layering, lint, typecheck, format, mutation-selection tests).Touched files: 2 (
scripts/layering/daemon-modularity.ts,scripts/layering/daemon-modularity.test.ts). Scope stayed on the layering gate. No docs/skills change: the gate's own message is the user-facing surface.