Skip to content

Three read-side /meta verbs (history, audit, references) never reach canonicalizeMetaRequestType — they still derive their key from the MANIFEST map #9157

Description

@os-zhuang

Surfaced while measuring #9009's reachability. ⚠️ Filed plainly: the routes are live and the divergence is mechanical, but no end-to-end request was driven, so severity is for triage rather than for me.

What was measured

packages/metadata-protocol/src/protocol.ts on origin/main @ 3851f87f0. Nine methods run the boundary fold:

canonicalizeMetaRequestType(request) → getMetaItems · getMetaItem · getMetaItemLayered
getMetaItemCached · saveMetaItem · publishMetaItem
rollbackMetaItem · diffMetaItem · deleteMetaItem

Three more are /meta/:type/:name routes in rest-route-ledger.ts and are not in that list. Each opens by deriving its key from PLURAL_TO_SINGULAR instead — the MANIFEST-COLLECTION map that #7894 moved this boundary off:

protocol methodrouteline
auditMetaItemGET /api/v1/meta/:type/:name/auditconst singular = PLURAL_TO_SINGULAR[request.type] ?? request.type;
historyMetaItemGET /api/v1/meta/:type/:name/historyconst singularType = PLURAL_TO_SINGULAR[request.type] ?? request.type;
findReferencesToMetaGET /api/v1/meta/:type/:name/referencesconst singularTarget = PLURAL_TO_SINGULAR[request.type] ?? request.type;

Why the two maps are not interchangeable here

This is the same two-part divergence #8769 / #8819 / #8868 each closed on one verb:

What this is NOT

⛔ Not a lock-gate hole. None of the three reaches getEffectiveLock; the four write verbs that do all fold. #9009's dormancy framing is unaffected — this was measured as part of confirming it.

⛔ Not a claim that #9009's producer-side fold covers this. It does not: these three build their own key and never consult the lock gate.

Suggested disposition

Triage. The mechanical close is the one the other five verbs already took — run canonicalizeMetaRequestType at the top of each, which brings both the URL map and the spelling refusal with it. Whether the read verbs should refuse a plural the way the write verbs do (a 400 where they currently answer 200 with an empty body) is the part worth deciding rather than assuming, since it is a wire-visible change on three GET routes.

Backlinks: #9009 (the card whose reachability measurement surfaced this) · #7894 (moved the boundary off the manifest map) · #8769 · #8819 · #8868 (the same divergence closed one verb at a time) · #8896 (the empty-accumulator harm shape).

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions