Commit 7986d97
* feat(rest,runtime,client)!: retire compound-name metadata addressing
Stage 3 of the #12176 maintainer-ruled retirement of slash-bearing metadata
item names. Stage 1 (#12194) declared the item-name grammar and refuses every
slash-bearing name at the publish door, so the compound arities addressed only
names that can no longer be created — this removes them.
packages/rest:
- Un-mount the three compound arities: GET and PUT /meta/:type/:section/:name
and GET /meta/:type/:section/:name/published. Drop their three route-ledger
rows and the ordering pins that existed only because the three-segment
compound route was a CATCH-ALL shadowing every literal sibling.
packages/runtime:
- Un-fold the dispatcher: the /published branch requires exactly three
segments and the item branch exactly two, instead of re-joining every
trailing segment into one slash-bearing key.
- Decode the :name segment. This dispatcher splits the RAW path and nothing
decodes for it, unlike the Hono routes in packages/rest — measured, not
assumed. Without it a pre-grammar residue row would be addressable through
REST and not through the dispatcher, breaking #12194's landed acceptance
criterion that stored junk names stay listable and clearable. The sibling
domains/packages.ts already decodes its own id segments this way.
packages/client:
- One URL spelling: encodeURIComponent on every /meta item address, closing
the 10-unencoded / 4-encoded split. Encoding a name that satisfies #12194's
grammar is a no-op, so this is byte-identical for every writable name; a
residue name now reaches the single-segment door as %2F rather than forking
the request onto a second door.
- Correct the docblocks that promised unencoded compound pass-through, and
the #11712 mode carve-out, which is closed at the source rather than here.
Capability is re-expressed, not removed: %2F matches the single-segment
pattern and Hono decodes the parameter back to the stored spelling, so residue
rows still read, write and delete through the surviving doors.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9StxQgG2DPA26XzZZqnJB
* test(rest,runtime,client): rework the compound-arity pins for the removal
Every pin that measured the retired compound-name arities is REWORKED, never
silenced. Two shapes, chosen per file by what is actually still true:
INVERTED — files whose subject was a shadowing or divergence hazard now pin
the ABSENCE of the arity, because a re-mount is how the hazard returns and an
order pin phrased against a retired route would go green while the retirement
is undone:
- meta-route-registration-order: the three-segment catch-all ordering pins
become "no compound `:section` arity is mounted", plus a companion pin that
the literals it used to shadow are all still mounted.
- meta-item-layered-route, meta-plural-i18n, rest-server-meta-write-org-scope,
meta-compound-save-{mode,force}-parity, meta-compound-save-and-reset-
capability-gate, meta-501-envelope: same inversion, each keeping the reason
the original pin existed (a re-mounted door arrives ungated, org-blind, and
reading neither `?force` nor `?mode` until someone re-derives that work).
RE-AIMED at the surviving door — coverage that was never about the spelling:
- the full #11712 `?mode` and #11095 `?force` contracts, the #6877 repeated-
parameter guard, the #7019 capability gate and the #8842 falsy-body hole
now run against `/meta/:type/:name`.
- meta-published-overlay's residue-row read drives the single-segment
`/published` route with the decoded name — the pin that the retirement
costs no capability.
- client URL pins invert to `%2F`, each with a control proving a grammar-legal
name is byte-identical on the wire.
NEW post-removal pins, ADR-0112 code AND status on every one:
- the compound path answers `404 ROUTE_NOT_FOUND` at the dispatcher;
- the ENCODED spelling still reaches the item-name grammar's `400
INVALID_REQUEST`, so "the route is gone" and "the name is illegal" stay
distinguishable;
- `DELETE` on a compound path answers 404, not the 405 its two-segment
address gets — the two refusals are different facts.
Also: the meta domain's tail `{ handled: false }` was unreachable dead code
until this card (0, 1 and — through the fold — every 2+ segment path were all
covered). Un-folding makes it reachable, so it becomes a LOCATED
`routeNotFound` rather than letting the adapter answer an anonymous 404 on the
very shape this retirement newly produces. Same form `domains/ai.ts` and
`domains/share-links.ts` already use.
Changeset: minor on rest/runtime/client with the BREAKING route table and the
FROM → TO spelling, per the launch-window convention.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9StxQgG2DPA26XzZZqnJB
* test(rest,dogfood): pay the six new TEST_DEBT errors and rework the dogfood compound-door rows (#12195)
The pin rework left four dead constants and two off-type boot calls in the
rest test layer — TEST_DEBT measured 161 against the frozen 155; all six are
fixed, none ledgered. The dogfood anonymous-deny table drops the retired
compound-save row (its registered-door leg asserts .not.toBe(404), which is
what a retired route answers) and gains the retired-door case: the compound
spelling must 404 for anonymous and member alike, since an auth floor only
speaks for a door that exists. The authz-conformance matrix note re-tallies
six -> five with the retirement named.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9StxQgG2DPA26XzZZqnJB
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent c4a27b7 commit 7986d97
29 files changed
Lines changed: 1042 additions & 1140 deletions
File tree
- .changeset
- packages
- client/src
- qa/dogfood/test
- rest/src
- runtime/src
- domains
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
326 | 339 | | |
327 | | - | |
328 | | - | |
329 | 340 | | |
330 | | - | |
| 341 | + | |
331 | 342 | | |
332 | 343 | | |
333 | 344 | | |
334 | | - | |
| 345 | + | |
335 | 346 | | |
336 | 347 | | |
337 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
338 | 364 | | |
339 | 365 | | |
340 | 366 | | |
| |||
2662 | 2688 | | |
2663 | 2689 | | |
2664 | 2690 | | |
2665 | | - | |
| 2691 | + | |
2666 | 2692 | | |
2667 | 2693 | | |
2668 | | - | |
2669 | | - | |
2670 | | - | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
2671 | 2698 | | |
2672 | | - | |
| 2699 | + | |
2673 | 2700 | | |
2674 | 2701 | | |
2675 | 2702 | | |
| |||
2878 | 2905 | | |
2879 | 2906 | | |
2880 | 2907 | | |
2881 | | - | |
| 2908 | + | |
2882 | 2909 | | |
2883 | 2910 | | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
2889 | 2915 | | |
2890 | | - | |
| 2916 | + | |
2891 | 2917 | | |
2892 | 2918 | | |
2893 | 2919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
| 648 | + | |
| 649 | + | |
657 | 650 | | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
| 914 | + | |
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
960 | 966 | | |
961 | 967 | | |
962 | 968 | | |
| |||
1090 | 1096 | | |
1091 | 1097 | | |
1092 | 1098 | | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1096 | 1108 | | |
1097 | 1109 | | |
1098 | 1110 | | |
1099 | | - | |
| 1111 | + | |
1100 | 1112 | | |
1101 | 1113 | | |
1102 | 1114 | | |
| |||
1177 | 1189 | | |
1178 | 1190 | | |
1179 | 1191 | | |
1180 | | - | |
| 1192 | + | |
1181 | 1193 | | |
1182 | 1194 | | |
1183 | 1195 | | |
| |||
1200 | 1212 | | |
1201 | 1213 | | |
1202 | 1214 | | |
1203 | | - | |
| 1215 | + | |
1204 | 1216 | | |
1205 | 1217 | | |
1206 | 1218 | | |
1207 | 1219 | | |
1208 | 1220 | | |
1209 | 1221 | | |
1210 | | - | |
1211 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1212 | 1225 | | |
1213 | 1226 | | |
1214 | 1227 | | |
| |||
1229 | 1242 | | |
1230 | 1243 | | |
1231 | 1244 | | |
1232 | | - | |
| 1245 | + | |
1233 | 1246 | | |
1234 | 1247 | | |
1235 | 1248 | | |
| |||
1241 | 1254 | | |
1242 | 1255 | | |
1243 | 1256 | | |
1244 | | - | |
| 1257 | + | |
1245 | 1258 | | |
1246 | 1259 | | |
1247 | 1260 | | |
| |||
1258 | 1271 | | |
1259 | 1272 | | |
1260 | 1273 | | |
1261 | | - | |
| 1274 | + | |
1262 | 1275 | | |
1263 | 1276 | | |
1264 | 1277 | | |
| |||
5581 | 5594 | | |
5582 | 5595 | | |
5583 | 5596 | | |
5584 | | - | |
| 5597 | + | |
5585 | 5598 | | |
5586 | 5599 | | |
5587 | 5600 | | |
| |||
5608 | 5621 | | |
5609 | 5622 | | |
5610 | 5623 | | |
5611 | | - | |
| 5624 | + | |
5612 | 5625 | | |
5613 | 5626 | | |
5614 | 5627 | | |
| |||
0 commit comments