Observed while implementing #9741 (declare previewDrafts/state, retire the as any casts at the four REST meta-read doors). Recording the residue outside that card's named scope rather than widening it.
The observation
#9741 retired the request casts at the doors the card named (list, cached and uncached single-item, layered) and introduced a typed transport envelope (TransportScopedMetaRequest in packages/rest/src/rest-server.ts) for the transport-level environmentId. Several OTHER getMetaItems call sites in the same file still call through as any (or a p: any parameter) even though every member they thread is now expressible with the declared spec shape plus that envelope:
loadObjectItems — (p as any).getMetaItems?.({ type, environmentId? }); note getMetaItems is a REQUIRED member of MetadataProtocol, so the optional-call spelling is not feature detection either;fetchAudienceBooks — p: any with an as any request literal threading environmentId;- the discovery-scoping object listing and the
api listing (protocol?.getMetaItems?.(...) sites around the discovery route); - the dataset listing door —
(p as any).getMetaItems?.({ type: 'dataset', previewDrafts }).
Not asserted: no behavioural defect and no undeclared members — after #9741 these literals carry only declared keys plus environmentId. This is purely retirable blindness: each cast keeps the compiler from checking a request that is now fully typeable. Genuinely feature-detected server-only verbs (getMetaDiagnostics, listDrafts, migrateStoredMetadata, ...) are NOT part of this observation — runtime casts are the documented convention for those.
Repo: objectstack. File: packages/rest/src/rest-server.ts. Related: #9741 (the ruling and the envelope; not addressed further there — its card named the four doors only), #9726.
Generated by Claude Code
Observed while implementing #9741 (declare
previewDrafts/state, retire theas anycasts at the four REST meta-read doors). Recording the residue outside that card's named scope rather than widening it.The observation
#9741 retired the request casts at the doors the card named (list, cached and uncached single-item, layered) and introduced a typed transport envelope (
TransportScopedMetaRequestinpackages/rest/src/rest-server.ts) for the transport-levelenvironmentId. Several OTHERgetMetaItemscall sites in the same file still call throughas any(or ap: anyparameter) even though every member they thread is now expressible with the declared spec shape plus that envelope:loadObjectItems—(p as any).getMetaItems?.({ type, environmentId? }); notegetMetaItemsis a REQUIRED member ofMetadataProtocol, so the optional-call spelling is not feature detection either;fetchAudienceBooks—p: anywith anas anyrequest literal threadingenvironmentId;apilisting (protocol?.getMetaItems?.(...)sites around the discovery route);(p as any).getMetaItems?.({ type: 'dataset', previewDrafts }).Not asserted: no behavioural defect and no undeclared members — after #9741 these literals carry only declared keys plus
environmentId. This is purely retirable blindness: each cast keeps the compiler from checking a request that is now fully typeable. Genuinely feature-detected server-only verbs (getMetaDiagnostics,listDrafts,migrateStoredMetadata, ...) are NOT part of this observation — runtime casts are the documented convention for those.Repo:
objectstack. File:packages/rest/src/rest-server.ts. Related: #9741 (the ruling and the envelope; not addressed further there — its card named the four doors only), #9726.Generated by Claude Code