Filed unassigned and unlabelled for triage, from the capability-coverage work on #14961 (PR #15541, which authors the checklist items for metadata_endpoints). Not that PR's change and not addressed there.
Measured on origin/main 6f944589
MetadataEndpointsConfigSchema.endpoints declares three live switches, and each one's describe() names exactly one route:
| key |
its declared meaning |
types |
GET /meta - List all metadata types |
items |
GET /meta/:type - List items of type |
item |
GET /meta/:type/:name - Get specific item |
packages/rest/src/rest-server.ts#registerMetadataEndpointsInner gates more than that. Counting the if blocks in that method:
endpoints.types !== false gates 2 mounts — GET {prefix} and GET {prefix}/types (one handler, two paths, deliberately).
endpoints.items !== false gates 4 mounts — GET {prefix}/:type, and also GET {prefix}/diagnostics (the cross-type spec-validation sweep), GET {prefix}/_drafts, and POST {prefix}/_migrate-stored, which is a write door.
endpoints.item !== false gates 4 mounts — GET {prefix}/:type/:name, plus /:type/:name/references, /:type/:name/layers and GET {prefix}/book/:name/tree.
Why it is worth a decision
An operator who reads the schema and turns off "list items of type" — a read they may consider chatty or unnecessary — silently unmounts a migration write door and the diagnostics sweep with it. Nothing warns, and nothing in the declared contract says those routes ride that switch. That is the declared-vs-enforced asymmetry ADR-0049 is about, in the direction the ledger does not look: the key is genuinely live, so no liveness census flags it; what drifted is the key's radius versus its own documentation.
Options (not decided here)
- Document the real radius — extend each
describe() to name what it gates. Cheapest; keeps every current behaviour.
- Give the extra routes their own switches (or move
_migrate-stored and diagnostics under a separate key) — the authored key then means what it says. A spec change with a compatibility question.
- Rule it correct as-is —
items is "the item-listing family, broadly" — and record that reading in the schema so the next reader does not re-derive this.
⚠️ Whichever way, note that RestServerConfig is not reachable from any shipped boot path today (filed separately), so the blast radius is currently limited to programmatic embedders.
Where it is already captured
docs/qa/platform-checklist/FOLLOW-UPS.md §10b E1, and as an acceptance clause on the new api-backend.rest-metadata-config-contract item, which requires a run to ENUMERATE each switch's real radius rather than trust the declared one.
Generated by Claude Code
Filed unassigned and unlabelled for triage, from the capability-coverage work on #14961 (PR #15541, which authors the checklist items for
metadata_endpoints). Not that PR's change and not addressed there.Measured on
origin/main6f944589MetadataEndpointsConfigSchema.endpointsdeclares three live switches, and each one'sdescribe()names exactly one route:typesGET /meta - List all metadata typesitemsGET /meta/:type - List items of typeitemGET /meta/:type/:name - Get specific itempackages/rest/src/rest-server.ts#registerMetadataEndpointsInnergates more than that. Counting theifblocks in that method:endpoints.types !== falsegates 2 mounts —GET {prefix}andGET {prefix}/types(one handler, two paths, deliberately).endpoints.items !== falsegates 4 mounts —GET {prefix}/:type, and alsoGET {prefix}/diagnostics(the cross-type spec-validation sweep),GET {prefix}/_drafts, andPOST {prefix}/_migrate-stored, which is a write door.endpoints.item !== falsegates 4 mounts —GET {prefix}/:type/:name, plus/:type/:name/references,/:type/:name/layersandGET {prefix}/book/:name/tree.Why it is worth a decision
An operator who reads the schema and turns off "list items of type" — a read they may consider chatty or unnecessary — silently unmounts a migration write door and the diagnostics sweep with it. Nothing warns, and nothing in the declared contract says those routes ride that switch. That is the declared-vs-enforced asymmetry ADR-0049 is about, in the direction the ledger does not look: the key is genuinely
live, so no liveness census flags it; what drifted is the key's radius versus its own documentation.Options (not decided here)
describe()to name what it gates. Cheapest; keeps every current behaviour._migrate-storedanddiagnosticsunder a separate key) — the authored key then means what it says. A spec change with a compatibility question.itemsis "the item-listing family, broadly" — and record that reading in the schema so the next reader does not re-derive this.RestServerConfigis not reachable from any shipped boot path today (filed separately), so the blast radius is currently limited to programmatic embedders.Where it is already captured
docs/qa/platform-checklist/FOLLOW-UPS.md§10b E1, and as an acceptance clause on the newapi-backend.rest-metadata-config-contractitem, which requires a run to ENUMERATE each switch's real radius rather than trust the declared one.Generated by Claude Code