Skip to content

fix(metadata-protocol, runtime)!: refuse navigationContributions on a package created at runtime - #30707

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-7vnlcf
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-7vnlcf

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #30072

Clause-②: yes (narrowing) — POST /api/v1/packages (both install limbs, the no-protocol fallback included) and the protocol install primitive installPackage (so the package duplicate and every in-process caller too) refuse a manifest whose navigationContributions is a non-empty list with 400 VALIDATION_ERROR, where they stored it and answered 201 before. Widened: @objectstack/metadata-protocol publishes one new export, runtimeNavigationContributionsRefusal, the predicate both doors ask (the shape customizationPairManifestRefusal already has).
Metadata-protocol: narrowed
Skills-docs: follow-up #30711

维护者速读

  • 改了什么:运行时新建包(Studio、REST、MCP、AI 调 POST /api/v1/packages)如果带 navigationContributions,现在直接拒绝(400),不再存下来;代码包的菜单贡献照旧生效。
  • 为什么改:这种包的菜单贡献从来不会注册,服务器却回「成功」,重启后也不出现,AI 会告诉用户「已加好菜单」。按裁决 A:响亮拒绝,并指出两条能走通的路(应用覆盖进定制包;贡献写进代码包)。
  • 风险与回滚:只收窄运行时建包入口;已存进 sys_packages 的旧包照常加载(其菜单本来就不生效)。示例与 HotCRM 只在代码包里用这个键,不受影响。回滚即还原本 PR。
  • 先看:packages/metadata-protocol/src/protocol-package-install.ts(判定函数与原语里的调用点)、packages/runtime/src/domains/packages.ts(入口在两条安装分支之前、409 之前询问)、packages/runtime/src/domains/packages-install-navigation-contributions.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run src/domains/packages-install-navigation-contributions.test.ts,预期 10 个用例全过(两条分支各 5 个:拒绝、裸清单拒绝、先于 409、无键或空数组放行、代码包贡献照常)。
  • 需要你做的:无,席位落地。

What changes

  • runtimeNavigationContributionsRefusal(manifest) (new, protocol-package-install.ts, exported from the package entry): undefined when the manifest carries no navigationContributions or an empty list; otherwise the refusal sentence. It names the key and the package, and both routes that work: an override of the app in its customization package for a customer's own menu (ADR-0146 D2, what Studio's navigation editor writes), and a code package for a contribution into another package's app.
  • The install primitive (installPackage) asks it right after the whole-manifest declaration parse, so a malformed manifest keeps the declaration's located answer, and before every write and every server-state read. It throws with statusCode: 400, which an HTTP boundary answers as VALIDATION_ERROR. Every caller passes here: the HTTP door's composed limb, duplicatePackage (a base stored with the key before this change is now refused on duplicate, by the rethrow rule that refuses a duplicate whose record is refused), and an embedder.
  • POST /api/v1/packages asks the same predicate after the whole-body verdict and ahead of the duplicate-id 409, so both install limbs are judged (the no-protocol fallback writes the registry directly and never reaches the primitive) and the answer does not depend on whether the id is installed.
  • No new error code. A request-shape refusal at an install door is a validation refusal; the ledger's rule sends a generic condition to the standard catalog, and the door's sibling refusals (id, version, whole body, customization pair) all answer 400 VALIDATION_ERROR. Nothing in packages/spec moves.

Why

On main the runtime door stored navigationContributions and answered 201, but only ObjectQL.registerApp (the door a code package takes at boot, from the marketplace or on an artifact reload) registers contributions. SchemaRegistry.installPackage, which the runtime install and the sys_packages replay at boot both use, registers none, so the entry never appeared, not after a restart either. The maintainer ruled option A on the card (record 6631177389), verbatim: 「…其他全部同意」 — refuse the key loudly and name the working routes.

Doors enumerated. Every runtime door that stores a manifest: POST /api/v1/packages (both limbs) and the protocol primitive (with its in-process callers: duplicatePackage, ensureCustomizationPackage, which builds its own manifest without the key, and the unmanaged install's base, which carries identity keys only and whose plan already refuses navigationContributions as 422 UNMANAGED_INSTALL_UNCOPYABLE). PATCH /api/v1/packages/:id accepts only name, description, version and dependencies, so it never stores the key. Marketplace installs and code packages go through registerApp, which registers contributions, and are untouched.

ADR-0087 disposition: not-required (no-migration-prescription), in the changeset. No key of any schema is added, removed or renamed; ManifestSchema.navigationContributions keeps its shape and meaning for code packages. A refused contribution never reached any app's navigation, so there is no rewrite that keeps what the author meant: the author takes one of the two routes the refusal names. First-party users of the key, measured: examples/app-multi-package (orders module) and HotCRM (its artifact modules) use it only in code packages, which register through registerApp; the platform's own users (Setup capability plugins, cloud-connection, mcp, plugin-approvals) are code packages too. Rows already in sys_packages are data at rest and replay as stored.

Tests

  • packages/metadata-protocol/src/protocol.install-navigation-contributions.test.ts: the primitive refuses (envelope 400 / VALIDATION_ERROR via resolveThrownHttpError, neither the registry write nor the durable publish ran); the sentence's first clause and the two routes; a malformed manifest keeps the declaration's answer first; lit controls (no key, empty list) install.
  • packages/runtime/src/domains/packages-install-navigation-contributions.test.ts, on both the composed and the no-protocol arm, over a real ObjectQL engine and protocol: refusal with the ADR-0112 envelope (code, status, ApiErrorSchema parse) and nothing stored (GET answers 404); the bare-manifest body form; refused ahead of the 409; lit controls; and a code package's contribution registered through registerApp is still served and untouched by the refusal.

Ablation, one per guarded behaviour, through scripts/ablation-replace.mjs (anchor hit 1 → 0, blob changed, restored to the HEAD blob with an empty git diff HEAD; both suites import the source, so no dist/ leg):

  • the door's guard (navRefusal !== undefined → && false) turned the runtime suite red, 5 failed | 5 passed: all four fallback-arm refusal cases, plus the composed arm's "ahead of the 409" case (the 409 answers first without it).
  • the primitive's guard, the same mutation, turned the primitive suite red, 1 failed | 3 passed: the refusal case.

Acceptance notes

  • An empty navigationContributions: [] installs: it promises nothing and registers nothing.
  • A writable base stored with the key before this change cannot be duplicated until it is reinstalled without the key (POST /api/v1/packages with overwrite: true); PATCH cannot remove a manifest key. The refusal on duplicate is the same sentence.
  • The refusal text is not pinned beyond its first clause and its two route names.

Verification

All at head 10809d6b, after the @objectstack/runtime^... closure build (plus @objectstack/driver-turso, which runtime's test typecheck reads).

Package tests and typecheck
  • pnpm --filter @objectstack/metadata-protocol test: exit 0, Test Files 318 passed | 4 skipped (322), Tests 22458 passed | 26 skipped.
  • pnpm --filter @objectstack/runtime test: exit 0, Test Files 545 passed (545), Tests 8718 passed | 19 skipped.
  • pnpm --filter @objectstack/metadata-protocol typecheck: exit 0. pnpm --filter @objectstack/runtime typecheck: exit 0 (a first run exited 1 on TS2307 @objectstack/driver-turso in an untouched test file because that package's dist was not built; rebuilt, exit 0).
Derived gate families (dispatch-gates)

node scripts/pm/dispatch-gates.mjs --ran: 60 derived families accounted for, 59 run green, 1 NOT MEASURED: pnpm check:dual-build-cjs-loads exited 3 (PREREQUISITE NOT MET: it needs a whole-tree build); CI's Lint & Repo Gates runs it. node scripts/check-plugin-teardown-shape.mjs --self-test first exited 3 on the shallow clone, and exited 0 after fetching its pinned fixture commit. pnpm lint: exit 0. check-adr-0087-registration --base origin/main: exit 0, the changeset carries not-required (no-migration-prescription). check-changeset-no-major --base origin/main: exit 0.

Dogfood battery (owed by the narrowing arm)

pnpm --filter @objectstack/dogfood test under the verify lock, after the @objectstack/dogfood^... closure build: VERDICT command-exit 0, Test Files 421 passed | 3 skipped (424), Tests 3513 passed | 36 skipped (3549), no failures.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cz2siW3GknVnPzUXgd


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/metadata-protocol, @objectstack/runtime, touching 4 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/deployment/app-dependencies.mdx (via installPackage (symbol, a top-level function))
  • content/docs/deployment/cli.mdx (via /api/v1/packages/:packageId (route, bridged from symbol installPackage — its route source's handler names it))
  • content/docs/kernel/contracts/metadata-service.mdx (via /api/v1/packages/:packageId (route, bridged from symbol installPackage — its route source's handler names it))
  • content/docs/permissions/system-context.mdx (via handlePackagesRequest (symbol, a top-level function))
  • content/docs/protocol/kernel/error-handling.mdx (via /api/v1/packages/:packageId (route, bridged from symbol installPackage — its route source's handler names it))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via installPackage (symbol, a top-level function))
  • content/docs/releases/v17/17-0.mdx (via /api/v1/packages/:packageId (route, bridged from symbol installPackage — its route source's handler names it))
  • content/docs/releases/v17/17-4.mdx (via /api/v1/packages/:packageId (route, bridged from symbol installPackage — its route source's handler names it))
  • content/docs/releases/v18/18-2.mdx (via installPackage (symbol, a top-level function))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 63 of 221 client-bound route-ledger rows — the other 158 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 158: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 103 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 33 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 483539c78981a4423207511856e0dbc1e7bbca5d — the merge of head 10809d6bc19064085c0d62fcd6fa1297baef697d into base 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 483539c78981a4423207511856e0dbc1e7bbca5d && git checkout 483539c78981a4423207511856e0dbc1e7bbca5d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a 10809d6bc19064085c0d62fcd6fa1297baef697d && git checkout -B drift-repro 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a && git merge --no-ff 10809d6bc19064085c0d62fcd6fa1297baef697d

node scripts/docs-audit/affected-docs.mjs --json 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 4bf9a2d7eeeec7c07971aba1a8734c227acaaa3a → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4cytLmJxfAmgPVjUbbW

Contract-review-claim: session_016WV4cytLmJxfAmgPVjUbbW · head 10809d6 · 2026-11-05T22:57Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4cytLmJxfAmgPVjUbbW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 10809d6bc19064085c0d62fcd6fa1297baef697d
Local-runs: none
Scope: packages/metadata-protocol/src/index.ts, packages/metadata-protocol/src/protocol-package-install.ts, packages/metadata-protocol/src/protocol.install-navigation-contributions.test.ts, packages/runtime/src/domains/packages.ts, packages/runtime/src/domains/packages-install-navigation-contributions.test.ts + packages/metadata-protocol/src/protocol-package-commits.ts, packages/metadata-protocol/src/protocol-customization-package.ts, packages/metadata-protocol/src/package-unmanaged-install.ts, packages/spec/src/kernel/unmanaged-install.ts, packages/spec/src/kernel/manifest.zod.ts, packages/spec/src/api/package-api.zod.ts, packages/services/service-package/src/index.ts, packages/objectql/src/engine.ts, packages/objectql/src/engine-registration.ts

Independent review of the tree at the head above against origin/main 4bf9a2d7ee, the card (#30072), its ruling (6631177389, option A) and the dev report (6671681348). The PR body was read last and judged against the code, not the other way round.

① Derived judgments

  1. POST /api/v1/packages, composed limb — RIGHT. The predicate is asked after the whole-body verdict (declaredBody) and before request extraction, the repeated-overwrite refusal, the 409, the read-only gate, the pair refusal and both limbs. manifest = body.manifest || body (packages.ts:1543 on main) covers the wrapped and the bare body form, and deps.error(msg, 400) derives VALIDATION_ERROR from the status (packages.ts:1026). Nothing is stored before the return.
  2. POST /api/v1/packages, no-protocol fallback limb — RIGHT. The same door gate sits ahead of registry.installPackage(manifest, 'authored', settings) (packages.ts:1774), which never reaches the primitive; no second copy of the rule.
  3. Protocol primitive installPackage — RIGHT. Asked after the PackageInstallManifestSchema parse (which admits the key: it is ManifestSchema.extend, package-api.zod.ts:229) and before the pair refusal, the namespace default, the ADR-0087 handshake, the ADR-0141 dependency check, packageInstallUndo, the registry write and the durable persist. The throw carries statusCode: 400, which resolveThrownHttpError answers as VALIDATION_ERROR.
  4. duplicatePackage (protocol-package-commits.ts:618) — RIGHT, with a note. It spreads the SOURCE manifest, so a source carrying the key is now refused by the metadata-protocol: duplicatePackage swallows its own installPackage refusal in a bare catch {} — a duplicate whose manifest the registry refuses is created with no package row and no log line #24041 rethrow rule before any item is copied. The HTTP door admits only a writable base as source (POST /packages/:id/duplicate 对一个启动中的代码包返回 success:false, copiedCount:0, failedCount:0(空 base)—— ADR-0070 D4「复制成可写 base」对代码包是否本就该拷贝其对象? #14451, packages.ts:786), so a code package's contributions (every HotCRM module, the example's orders) never enter this path; the only population hit is a base stored with the key before this change, which the dev flagged. See ④ should-fix (a) on the sentence.
  5. importUnmanagedPackage (protocol-package-commits.ts:950) — UNCHANGED, as claimed. plan.baseManifest holds identity keys only, and a non-empty navigationContributions is already uncopyable in the disposition table (spec/src/kernel/unmanaged-install.ts:101), answered 422 UNMANAGED_INSTALL_UNCOPYABLE before the primitive runs.
  6. ensureCustomizationPackage (protocol-customization-package.ts:393) — UNCHANGED. It builds a six-key manifest without the key.
  7. PATCH /api/v1/packages/:id — UNCHANGED. It accepts name, description, version, dependencies only (the card measured the 400), so it never stores the key.
  8. Boot replay of sys_packages (service-package/src/index.ts:777) — UNTOUCHED. It calls registry.installPackage directly, not the primitive; rows at rest replay as stored, consistent with the metadata-protocol installPackage parses only the manifest id, so the primitive stores manifests the public install door refuses (type 'application', scope 'environment' from cloud's AI authoring) #24086 tolerance.
  9. Code packages — UNTOUCHED. engine.registerApp goes through engine-registration.ts:89 and registers contributions at engine.ts:2414; the marketplace install and the artifact reload take registerApp. Every first-party user of the key on main (packages/apps/setup, cloud-connection, mcp, the plugin-* and service-* packages, examples/app-multi-package orders) and in HotCRM (src/revenue, src/service, src/marketing, src/o2c) is a code package; the runtime test pins a registerApp contribution still served beside the refusal.
  10. New public export runtimeNavigationContributionsRefusal(manifest: unknown): string | undefined on @objectstack/metadata-protocol's entry — RIGHT and justified. Same shape and reason as customizationPairManifestRefusal (index.ts:271): the fallback limb never reaches the primitive and the door must not carry a second copy. unknown input is correct for both callers; a null or non-array value is refused by the declaration parse ahead of it at both doors, and the predicate alone also refuses it (not undefined, not an empty array), the safe direction.
  11. navigationContributions: [] installs — RIGHT. It promises nothing and registers nothing; both suites pin it as a lit control.
  12. No new error code, no packages/spec edit — RIGHT. A request-shape refusal at an install door is the door's standard 400 VALIDATION_ERROR, as its sibling refusals (id, version, whole body, pair) are.

② Semver level

Changeset bumps @objectstack/metadata-protocol and @objectstack/runtime minor, with fix(...)!: and a BREAKING narrowing paragraph; Clause-②: yes (narrowing) and Metadata-protocol: narrowed are on the PR body and the changeset and agree with the diff (one export widened, one accept set narrowed). This is the level the launch-window rule in check-changeset-no-major.mjs prescribes, and the one metadata-protocol 18.3.0 used for its yes (narrowing) entries under Minor Changes. Check Changeset and Lint · CI, release & engine gates are green on this head. Consistent.

③ Boundary flags

  • open_questions: none declared; none found owed.
  • Deviation 1 (the index.ts export outside the claimed file surface): accepted, see ① item 10; the seat's amendment 6670540390 already re-derived the clause arm from it.
  • Deviation 2 (Clause re-derived as yes (narrowing)): matches the diff.
  • Out-of-scope finding 1 (docs follow-up for content/docs/ui/apps.mdx): a prose face, not reviewed here; the PR body declares it as Skills-docs: follow-up owed. The carrier reads "noted, not filed": the lane seat should file it as a card so it does not evaporate.
  • Out-of-scope finding 2 (a writable base stored with the key before this change is refused on duplicate): answered in ① item 4; the population is pre-change bases only, and the repair exists (POST /api/v1/packages with overwrite: true, without the key). See ④ (a).
  • ADR-0087 not-required (no-migration-prescription): sound. No key of any schema is added, removed or renamed; ManifestSchema.navigationContributions keeps its shape and meaning; stored rows replay as stored; every measured first-party user is a code package, which is untouched; the remedy is one of two authoring routes, not a mechanical rewrite. Same disposition the 18.3.0 narrowings carried.
  • Gates: the dev's one NOT MEASURED family (check:dual-build-cjs-loads) is covered by CI's Lint · repo & tooling gates, green on this head. At review time Build Core, Test Core (8 shards), Type Check (workspace, debt ledger, consumer gates), Check Changeset (one of two runs) and Live E2E UI were still in_progress; the landing check's all-green condition is the dispatch seat's to confirm, not this record's.
  • PR author is objectstack-fleet[bot]; no relay login to name.

④ Design judgment

  • protocol-package-install.ts: holds against ruling A and the acceptance scenario. The predicate is placed where every in-process caller passes, after the declaration so a malformed manifest keeps its located answer (pinned: manifest.type wins over the nav sentence) and before every write and every server-state read, so a refusal leaves nothing behind. The sentence names the key, the package id and both working routes (app override in the customization package; code package). Attempts to break it: a null or string value is refused by the declaration first; an embedder bypassing HTTP still hits the primitive; a code-package duplicate cannot reach it (① 4); boot replay does not pass through it (① 8). No gap found.
  • packages.ts: holds. Ordered after the whole-body verdict (an unknown key or missing type keeps the declaration's sentence) and ahead of the 409, so the answer never depends on whether the id is installed (pinned in both arms). The door answers the primitive's own sentence; no second copy.
  • index.ts: holds; one export, commented with the reason, precedent shape.
  • The two suites: the pins asked for are real. Primitive: status and code via resolveThrownHttpError, both writers (registry.installPackage, durable publish) not called. Runtime, on both arms over a real ObjectQL registry and protocol: code, status and ApiErrorSchema parse, GET answers 404 after the refusal, bare-manifest body form, refusal ahead of the 409 with the installed row's manifest unchanged, lit controls, and the boot path (registerApp) still served with getAppNavContributions holding the code package only. The ablation account (one guard per suite, both suites red when muted) was read, not re-run.
  • The narrowing against the published spec on main: ManifestSchema's docblock promises "the runtime merges these into the target app's navigation tree". For a runtime-created package that promise was false and silent. The change makes the spec's promise honest at the one door where it was not kept, and takes no declared capability away from the consumer that had it (code packages). It holds under ruling A.

Should-fix, non-blocking:

  • (a) The sentence's closing clause, "Remove navigationContributions from this manifest and retry", does not fit the duplicate door, whose request carries no manifest: there the repair is a reinstall of the SOURCE base with overwrite: true and without the key (the PR's acceptance note says so; the refusal does not). One clause, or a door-specific suffix on duplicatePackage's rethrow, would close it. Population: pre-change writable bases only.
  • (b) File the apps.mdx docs follow-up as a card (③).

Implemented-by: claude/project-thread-7vnlcf
Reviewed-by: session_016WV4cytLmJxfAmgPVjUbbW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4cytLmJxfAmgPVjUbbW

席位核对 · ACCEPT · 2026-11-05T23:24Z · #30072

Head-sha: 10809d6

  • Shape: 6 files, +343/−4: packages/metadata-protocol (protocol-package-install.ts, index.ts, one test), packages/runtime (domains/packages.ts, one test), one changeset. That matches the claimed surface (claim 6670120162, amendments 6670246513 and 6670540390). Not governed.
  • Contract review: PASS at CONTRACT_REVIEW_TIER, record 6671840220 (claim 6671716159), no must-fix. The head has not moved since that review.
  • Premise, measured: on main the runtime door stored navigationContributions and answered 201, while only ObjectQL.registerApp registers contributions; SchemaRegistry.installPackage (runtime install and the sys_packages replay) registers none. Ruling A (6631177389): refuse loudly and name the working routes.
  • Spot check (read in the diff):
    • One predicate, runtimeNavigationContributionsRefusal, asked by both doors: the protocol primitive after the whole-manifest parse and before any write, and POST /api/v1/packages ahead of the duplicate-id 409, so the no-protocol fallback limb is judged too.
    • The empty list and the absent key install; a code package's contribution through registerApp is pinned untouched.
    • Ablation of each guard turns its suite red (runtime 5 of 10, primitive 1 of 4).
  • Gates: every check-run on this head has concluded: 37 success, 15 skipped, 0 failure. The dogfood battery owed by the narrowing arm ran green locally (3513 passed).
  • Accepted deviations: check:dual-build-cjs-loads NOT MEASURED locally (whole-tree build); CI's Lint & Repo Gates covers it and is green. Should-fix (a) from the review (the refusal sentence on the duplicate door) is accepted as written: the duplicate rethrows the same sentence, which names both routes.
  • Out of scope: the docs follow-up is docs: content/docs/ui/apps.mdx should say that a runtime-created package refuses navigationContributions (PR #30707) #30711 (Skills-docs: follow-up #30711).
  • Contract: Clause-②: yes (narrowing) (plus one widened export), Metadata-protocol: narrowed, ADR-0087 not-required (no-migration-prescription), confirmed from the diff and the review.
  • Landing: ready, then auto-merge, through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 5, 2026 23:26
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 5, 2026 23:26
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 59bcd22 Nov 5, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-7vnlcf branch November 5, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Decision] A runtime-created package's navigationContributions are accepted and never applied: make them work, or refuse them?

1 participant