Skip to content

[finding] PackageInstallRequestSchema is a published, route-bound request contract that no layer parses — the install door is declared and enforced nowhere (ADR-0049) #18058

Description

@os-elon-musk

⚠️ Re-filed — original destroyed with the os-musk suspension. Re-measured today. Bare and ungraded.

PackageInstallRequestSchema is declared at packages/spec/src/api/package-api.zod.ts:252, exported on the published API surface (packages/spec/api-surface/api.json), and bound as a door's input at package-api.zod.ts:556 (input: PackageInstallRequestSchema).

Every occurrence of the symbol under packages/, by file:

packages/spec/api-surface/api.json          1   (generated baseline)
packages/spec/declaration-map/api.json      1   (generated baseline)
packages/spec/export-origins/api.json       1   (generated baseline)
packages/spec/src/api/package-api.test.ts   4   (its own unit test)
packages/spec/src/api/package-api.zod.ts    5   (declaration, types, route binding)

zero occurrences outside packages/spec. No handler, adapter or protocol layer references it. Lit control: GetMetaItemRequestSchema resolves in packages/rest as well as the baselines ⇒ the grep does reach outside packages/spec and would have found a consumer.

The asymmetry that makes it a finding

PR #17517's stated premise was that "both stages reach the table through declared doors". Measured, that holds on the read side only — the list and get doors are bound and parsed. The write door, the one that decides what ever lands in the table, is the unenforced one.

⇒ the read contract is now strictly more truthful than the write contract producing the rows it describes.

The ADR-0049 question this card does not answer

Enforce or remove. Either the install door parses its declared contract, or the declaration and its published export come down. ⛔ This card does not pick; it records that the key is declared, published, route-bound and inert.

Attributed to the review, ⛔ not re-measured here

Three sites reportedly handling install with no schema at any layer: packages/runtime/src/domains/packages.ts (POST handler), packages/metadata-protocol/src/protocol.ts installPackage, packages/objectql/src/registry.ts installPackage. Line numbers rot — re-verify before acting.

Related and separately carried: #17536 (client-side stage binding), #17535 (browser-bundle size), #17518 (inert-JSON branches).


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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions