Repository navigation
Commit eae94b3
feat(metadata): retired vocabulary explains itself instead of reading as a broken install (#337)
An adopter's 75-node ledger stopped loading on 0.24.0-rc.5 and the error said `@verifiedBy`
was "not declared by any registered provider". True, and the wrong story: it says YOUR
METADATA IS MALFORMED when the fact is that the vocabulary was retired deliberately, in a
named release, with a written migration. Reading that, they filed a registration bug against
an adjudicated breaking change and argued against reasoning they had never seen — because
nothing in the error pointed at it. `verified-by-retirement.md` answers their strongest
objection (deleting an `abandoned` node destroys history) precisely. They never found it.
Adds a retired-vocabulary map and consults it at the three doors retired vocabulary can fail
at: unknown ATTR, out-of-range attr VALUE, unknown SUBTYPE.
Unknown attribute '@Verifiedby' on requirement.functional 'orderRecord' — retired in
0.24.0 — it asked you to name a test, and verify could only check that the NAME occurred
somewhere in your test sources — never that the named test verified the claim.
Migration: docs/features/migrations/verified-by-retirement.md.
NO LOAD OUTCOME CHANGES. Retired vocabulary still fails, same error code, same site; only
the message gains a sentence. Pinned by a test asserting the load still errors with
ERR_UNKNOWN_ATTR — a "helpful" fix that also started accepting the attribute would silently
undo the retirement, which is the failure mode a sympathetic reading of #337 walks straight
into.
SCOPED BY TYPE, NEVER BY BARE NAME. `@unique` is retired on `identity.secondary` and is live
vocabulary on a field; `@readOnly` was retired from FIELDS and never existed on a
requirement. A name-only match would tell an author their typo was a retirement and send
them to a guide that says nothing about it — worse than the generic message it replaces.
Both directions are pinned: `@readOnly` on a field names `@mutability`, on a requirement it
reports generically.
A TYPO MUST STAY A TYPO. The map is consulted only after the normal check has already
decided to fail and returns undefined for anything it does not recognise, so `@verifiedByy`
and `@status: abandonned` still report against the registry with no migration pointer.
Pinned, because a map that made every failure sound like a retirement would be a downgrade.
Covers six retirements that would each have produced this same issue: @Verifiedby,
@supersededBy, @status abandoned/superseded (FR-038), @readonly (FR-037 R1),
origin.collection (FR-037 R2), @unique on identity.secondary (ADR-0040), and the dropped
@dbColumnType array kinds. Every entry naming a guide is checked against the FILESYSTEM, not
the path shape — a pointer to a document nobody wrote sends the reader looking and then
strands them, which is the exact failure this exists to prevent. Verified by pointing an
entry at a missing file and watching the gate go red.
Wired at BOTH subtype doors — root and child — though no retired subtype is root-legal
today, so that arm is currently unreachable. Fixing one door and leaving the other is how a
rule ends up half-true while passing every probe.
CROSS-PORT: this is a DIAGNOSTIC, not registered vocabulary. It touches no registry
manifest and no load outcome, so it carries no registry-conformance obligation and the other
four ports still fail identically — just with the generic message. Mirroring the map is a
per-port ergonomics follow-up, stated here rather than left for someone to discover the
asymmetry.
Verified: metadata 2449 pass / 0 fail, cli 609 / 0 fail, workspace typecheck exit 0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 9dc3a93 commit eae94b3
5 files changed
Lines changed: 496 additions & 4 deletions
File tree
- server/typescript/packages/metadata
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
170 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
| |||
290 | 300 | | |
291 | 301 | | |
292 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
293 | 307 | | |
294 | 308 | | |
295 | 309 | | |
296 | 310 | | |
297 | | - | |
| 311 | + | |
| 312 | + | |
298 | 313 | | |
299 | 314 | | |
300 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
430 | 436 | | |
431 | | - | |
| 437 | + | |
| 438 | + | |
432 | 439 | | |
433 | 440 | | |
434 | 441 | | |
| |||
1264 | 1271 | | |
1265 | 1272 | | |
1266 | 1273 | | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1267 | 1277 | | |
1268 | 1278 | | |
1269 | | - | |
| 1279 | + | |
| 1280 | + | |
1270 | 1281 | | |
1271 | 1282 | | |
1272 | 1283 | | |
| |||
| 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 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
0 commit comments