Skip to content

gate: a package door's field allowlist must not silently drop a key the producer stamps (writable would have vanished from GET /packages one day after #14499) #14642

Description

@hotlong

Why

PR #14499 (Fixes #14309) projects the InstalledPackage record at both package doors (packages/runtime/src/domains/packages.ts and packages/rest/src/package-routes.ts) through a hand-written field allowlist, so a non-serializable member can never 500 the list again. The trade the PM accepted (recorded on #14309): a newly declared or producer-stamped field becomes an explicit decision at each door, and drift shows up as a missing field, never a 500.

Within one day the failure mode materialised: main landed #14375, which stamps an ADR-0070 D2 writable verdict on every /packages row. Both allowlists would have dropped it — a 200 with the field simply absent, no red anywhere. The REST side was caught only because the dev happened to read the sibling pin package-list-writable-carry.test.ts; the runtime side was caught by a real merge conflict. Neither is a mechanism.

What this card asks for

A gate (or a pin shape both doors share) that goes red when a door's allowlist omits a key the producer stamps or the record declares — e.g. a test that builds the record through the real producer path (getMetaItems({type:'package'}) + the writability stamp), projects it through each door, and asserts the projected key set ⊇ the producer's stamped/declared key set minus an explicit, annotated exclusion list. Deriving the allowlist from packages/spec was weighed and not chosen (it makes the published surface a side effect of a schema edit and adds a spec import edge to packages/rest); this card is the detector that makes the hand-list honest.

Source: the os-dev patch-round report on #14309 (2026-09-03), open question 1, option C.

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions