You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8e03393
Browse filesBrowse the repository at this point in the historyBrowse files
fix(lint): derive the runtime gate's context-collection set from RuntimeStackContext (#14285)
CONTEXT_STACK_KEYS carried a satisfies clause -- validity, not completeness --
while the RuntimeStackContext docblock claimed it was derived from that shape.
A collection declared on the interface and missing from the list was silently
never carried into the per-write snapshot, so every rule resolving into it
judged an empty universe and emitted findings that look correct.
Derive it from a keyed record typed { [K in keyof RuntimeStackContext]-?: true }
-- the -? mechanism proven at metadata-protocol's protocol.ts -- so a new
context collection without its row is a type error naming that collection at
tsc --noEmit and at the DTS build. Declaration order is preserved, since it
feeds both the snapshot key order and the derived top-level-index alternation,
and is now pinned end to end.
Co-authored-by: Claude <trymqms@gmail.com>
Derive the runtime publish gate's context-collection set from `RuntimeStackContext` instead of hand-listing it.
6
+
7
+
`CONTEXT_STACK_KEYS` carried `as const satisfies readonly (keyof RuntimeStackContext)[]`, which asks that every entry it names is a real context key (validity) and never that every context key has an entry (completeness) — while the docblock on `RuntimeStackContext` claimed it was "derived from this shape and keeps the two from drifting". A collection declared on the interface but missing from the list was never carried into the per-write snapshot: the host passed it in, the gate dropped it, and every rule resolving references into that collection judged an empty universe and emitted findings that look correct. Measured, adding a collection to the interface left the package building at exit 0 with nothing red inside it.
8
+
9
+
The set is now derived from a keyed record typed `{ [K in keyof RuntimeStackContext]-?: true }` — the `-?` mechanism already proven at `@objectstack/metadata-protocol`'s `protocol.ts` — so a new context collection without its row is a type error naming that collection at `tsc --noEmit` and at the build. Declaration order is preserved and pinned, since it feeds both the snapshot's key order and the derived top-level-index alternation. No behaviour change: the same five collections are carried, in the same order.
0 commit comments