Skip to content

Commit e57a5c9

Browse files
os-trumpclaude
andauthored
docs(runtime): state route-ledger conformance suite's domain granularity (#17075)
* docs(runtime): state route-ledger conformance's domain granularity Add a header paragraph to route-ledger.conformance.test.ts stating what the suite's six assertions do and do not check: domain-level presence and row-shape only, never per-route coverage. No assertion changed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37 * docs(runtime): drop hand-typed row/domain counts from the granularity note Remove the numeric counts from the paragraph added in the previous commit. They were wrong within hours (measured against a stale reading, not the tree), and more importantly a hand-typed count in prose that no gate recomputes is exactly the defect class this lane spent the same day eliminating elsewhere. Restate the granularity claim with a scale cue that cannot go stale instead of digits. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f87fdf3 commit e57a5c9

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

packages/runtime/src/route-ledger.conformance.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@
1818
* introspection). The legacy if-chain prefixes cannot be enumerated from the
1919
* registry, so they are pinned in LEGACY_CHAIN_PREFIXES — when ADR-0076 D11
2020
* extracts another branch, that list and the ledger move together.
21+
*
22+
* These are domain-level checks, not route-level ones, and worth naming
23+
* precisely so nobody reads this suite's green as "every route has a row".
24+
* "At least one ledger entry" is satisfied the moment any row exists for a
25+
* domain — most domains here carry several routes, but a few carry exactly
26+
* one, where domain- and route-granularity coincide only by accident. For a
27+
* multi-route domain, any non-last row can be deleted, or never added,
28+
* without turning anything red. That is not a slip in these six assertions —
29+
* it is what the registry exposes: `DomainHandlerRegistry.list()` returns
30+
* `{prefix, match, methods, handler}` per domain, with no sub-route field to
31+
* walk, and a busy domain like `/automation` resolves its own routes through
32+
* one function's inline `parts[N] === 'literal'` if-chain rather than a table
33+
* anything here could enumerate. An ablation on #17038 measured the
34+
* consequence directly: deleting a whole `ROUTE_LEDGER` row left this suite
35+
* fully green, because the row's domain still held "at least one" through its
36+
* siblings. Whether the ledger should also be checked at route granularity —
37+
* and how, given the registry's shape above — is an open maintainer decision
38+
* tracked in #17041; this paragraph states today's coverage, not a plan for
39+
* tomorrow's. Deliberately no row/domain counts here: a hand-typed number in
40+
* this prose is exactly the unguarded-count defect this lane spent the same
41+
* day eliminating elsewhere (#16919, #17039), and nothing in this file would
42+
* ever notice it going stale.
2143
*/
2244

2345
import { describe, it, expect } from 'vitest';

0 commit comments

Comments
 (0)