Skip to content

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

Closed

Description

@objectstack-fleet

epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

The maintainer: 「等我决定的都要立卡,并且从业务的角度给我具体解释和我沟通」 (2026-11-04). Measured by the seat on main 63b86b385d, on the example CRM unless noted. No domain:* label is set: triage routes this card.

The question

A person or an AI creates a package at runtime with a menu entry for another app. The server says success and stores it, and the entry never appears, even after a restart. Nothing says why. Should the platform honour it, or refuse it?

Governing text: packages/spec/src/kernel/manifest.zod.ts (navigationContributions), ADR-0029 D7, ADR-0049 (enforce or remove). #30059 already covers the customer's own menu through an app override, so this is about what the manifest key promises.

Measured

  • POST /api/v1/packages with navigationContributions targeting crm_app: 201, stored.
  • GET /api/v1/meta/app/crm_app: no entry. GET /api/v1/packages/com.example.crm/customizations: contributions empty.
  • After a backend restart: the package is installed and enabled, its manifest still holds the entry, and the app still has no entry.
  • PATCH /api/v1/packages/com.example.crm.custom with the key: 400, "Body { name?, description?, version?, dependencies? } — nothing to update".

Code readings

packages/objectql/src/engine.ts:9375-9379: engine.registerApp is the only path calling registerAppNavContribution. A runtime install goes through registry.installPackage (packages/metadata-protocol/src/protocol-package-install.ts:310), which does not.

Options

Recommendation: A

四轴分析

实际业务需求。 客户加菜单已经由 #30059 解决。这个键的实际用途是合作伙伴发布的包,而它们从代码加载,已经生效。运行时手工建包再贡献导航,目前说不出真实场景;真有人这样做,今天只会困惑。

项目长远合理性。 平台的规则是声明了就要兑现,要么补实现要么拒绝。A 现在就让规则成立;以后有场景再做 B,不会有迁移成本。

防 AI 写错。 这条最重要。AI 建包写上这个键,得到成功响应,却不生效,还会告诉用户做完了。A 在结构上杜绝这种情况。

创业阶段不扩散。 A 改动很小。B 要补注册、撤销和多节点同步,为一个没有场景的路径付出不值。

棱 A B C
业务 中 中 弱
长远 强 强 弱
防错 强 强 弱
不扩散 强 弱 强

Re-check

git grep -n "navigationContributions" origin/main -- packages/metadata-protocol/src/protocol-package-install.ts

Activity

  1. added
    priority:p2
    needs-user-decision
    on Nov 4, 2026
  2. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

    The maintainer, 2026-11-04: 「30079这种不是应该在元数据应用中自己去开发自定义操作吗?你的意见是批量换负责人放到内核吗?其他全部同意」.

    Ruling: option A. The runtime door refuses navigationContributions loudly, naming the working routes: an app override for a customer (#30059), and a code package for a contribution. needs-user-decision is removed; triage routes this card.

  3. removed
    needs-user-decision
    on Nov 4, 2026
  4. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p2 kept · domain:server · 2026-11-04T13:05Z

    ⛔ Not a claim.

    • Read fresh. The ruling recorded on this card (A, 「其他全部同意」) is the scope. The runtime door refuses navigationContributions loudly and names the working routes. It narrows a door that accepted the key before, so the PR carries its ADR-0087 disposition. p2 kept.

    Generated by Claude Code

  5. added
    bug
    domain:server
    pm:queue
    pm:dispatched
    and removed
    pm:queue
    on Nov 4, 2026
  6. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 1 · 2026-11-05T21:33Z
    Session: session_016WV4cytLmJxfAmgPVjUbbW
    Account: os-elon-musk (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: the card thread's designated claude/project-thread-* branch, named in a claim amendment once the thread reports it
    Worktree: objectstack-issue-30072
    Domain: domain:server
    Seat: domain:server#1
    File surface: packages/metadata-protocol/src/protocol-package-install.ts and the runtime package door it serves (POST /api/v1/packages), the refusal's error code and prescription text, their tests, one root .changeset/ file; the ADR-0087 disposition goes in the PR body. ⛔ packages/spec/** (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable), effort: high
    Clause-②: no
    Metadata-protocol: narrowed
    Responsibility: the runtime package install door in packages/metadata-protocol (accepts and stores navigationContributions, never applies them) | none (code packages register contributions at boot; #30059 app overrides for a customer) | any person or AI creating a package at runtime with the key; measured on the card (201, never shown)
    Thread-read: 6631403140
    Premise: holds per the card's measurement on main 63b86b385d; the dev re-runs the card's Re-check on origin/main first
    Serial constraints cleared: none on the install door: no open PR touches protocol-package-install.ts (read over the 34 open PRs' file lists at claim time). PR #30656 (objectql/src/registry.ts, nav contributions on re-registration) is adjacent, not the same door; the dev reads its diff before writing

    Narrowing note: narrowing: the runtime door refuses a key it accepted; owes one contract-review-tier review before the queue.

  7. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    席位核对 · Amendment · 2026-11-05T21:39Z · claim 6670120162 branch named

    Branch: claude/project-thread-7vnlcf

    The card thread's harness-designated branch (a project-thread platform exception to the claude/issue-<n>-<slug> convention); the dev thread is session session_016WV4cz2siW3GknVnPzUXgd. Everything else in claim 6670120162 stands.

  8. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    席位核对 · Amendment · 2026-11-05T21:50Z · claim 6670120162 clause arm

    Clause-②: no (narrowing)

    The narrowing arm, which the claim's narrowing note already declared, is now on the key line. check-changeset-no-major refuses Metadata-protocol: narrowed beside a bare no. Everything else in claim 6670120162 stands.

  9. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    席位核对 · Amendment · 2026-11-05T21:53Z · claim 6670120162 clause arm, re-derived from the diff

    Clause-②: yes (narrowing)

    • The card thread's diff adds one export to @objectstack/metadata-protocol's entry, runtimeNavigationContributionsRefusal. That widens the package's public surface, so the arm is yes. Precedent, same package and same shape: customizationPairManifestRefusal (packages/metadata-protocol/src/index.ts:271 on origin/main); yes (narrowing) already appears in its CHANGELOG. Per SKILL.md, a name with a precedent lands under the veto window, and the card stays in this lane.
    • The refusal uses the standard 400 VALIDATION_ERROR: no new error code and no packages/spec edit. ADR-0087: not-required (no-migration-prescription). Measured first-party users (examples/app-multi-package, HotCRM) set the key only in code packages (registerApp), which stay untouched.
    • One contract-review-tier review is owed before the queue. Everything else in claims 6670120162 / 6670489708 stands.
  10. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#1 · os-elon-musk · session_016WV4cz2siW3GknVnPzUXgd
    os-dev-report

    {
      "issue": 30072,
      "status": "done",
      "branch": "claude/project-thread-7vnlcf",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30707",
      "session": "session_016WV4cz2siW3GknVnPzUXgd",
      "premise_still_valid": true,
      "summary": "Re-check on origin/main f4d568ba: zero hits for navigationContributions in protocol-package-install.ts (control: installPackage, 9 hits), so the premise holds. New predicate runtimeNavigationContributionsRefusal (metadata-protocol, exported from the entry like customizationPairManifestRefusal) refuses a non-empty navigationContributions; the install primitive asks it after the declaration parse (covers duplicatePackage and every in-process caller) and POST /api/v1/packages asks it after the whole-body verdict and ahead of the 409, so the no-protocol fallback limb is judged too. Answer: 400 VALIDATION_ERROR (standard catalog, no new code, no packages/spec edit), sentence naming the key, the package and both working routes (app override in the customization package; code package). Code packages registered through registerApp are unchanged and pinned. Declared Clause-2 yes (narrowing) because of the one new export; the seat amended the claim to match (6670540390).",
      "tests": "head 10809d6b. metadata-protocol test exit 0 (Test Files 318 passed, 4 skipped; Tests 22458 passed, 26 skipped); runtime test exit 0 (Test Files 545 passed; Tests 8718 passed, 19 skipped); metadata-protocol typecheck exit 0; runtime typecheck exit 0 (first run exit 1 on TS2307 @objectstack/driver-turso in an untouched test file, dist not built; rebuilt, exit 0). New suites: protocol.install-navigation-contributions.test.ts 4/4, packages-install-navigation-contributions.test.ts 10/10 (composed and fallback arms). Ablation via scripts/ablation-replace.mjs, src-imported suites, no dist leg: door guard muted turned the runtime suite red (5 failed, 5 passed), primitive guard muted turned the primitive suite red (1 failed, 3 passed); both restored to the HEAD blob with git diff HEAD empty.",
      "gates": "dispatch-gates --ran at 10809d6b: 60 derived, 59 run exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads exit 3, PREREQUISITE NOT MET, needs a whole-tree build; CI Lint and Repo Gates runs it). check-plugin-teardown-shape --self-test exit 3 on the shallow clone, exit 0 after fetching its pinned fixture commit (recorded as the rerun). pnpm lint exit 0. check-adr-0087-registration exit 0 (not-required, no-migration-prescription). check-changeset-no-major exit 0. check-commit-card-trailers --range origin/main..HEAD exit 0. PR check-runs: in_progress at report time, not waited on.",
      "dogfood_battery": "10809d6b · os-verify-lock: VERDICT command-exit 0 · Test Files 421 passed, 3 skipped (424) · Tests 3513 passed, 36 skipped (3549) · no failures",
      "mcp_calls": "4 — mcp__github__issue_read x3 (30072 get, 30072 get_comments, 30059 get), mcp__github__pull_request_read x1 (30656 get_files); no write tool",
      "api_writes": "2 — fleet-write relay pr_create (PR 30707, read-back identical 10746 bytes), this os-dev-report comment via post-stamped; plus 3 git pushes (not REST)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · noted, not filed · Skills-docs follow-up owed: content/docs/ui/apps.mdx navigation-contributions section names no door; one sentence that a runtime-created package is refused, with the app override as the customer route",
        "carrier: none · noted in PR acceptance notes · a writable base stored with the key before this change is now refused on duplicate until reinstalled without it (PATCH cannot remove a manifest key)"
      ],
      "deviations": [
        "file surface: packages/metadata-protocol/src/index.ts gained the one export line (needed so POST /packages asks the same predicate on its no-protocol limb)",
        "Clause-2 re-derived from the diff as yes (narrowing); claim amended by the seat to match"
      ],
      "files_changed": [
        ".changeset/30072-runtime-package-nav-contributions-refused.md",
        "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-install-navigation-contributions.test.ts",
        "packages/runtime/src/domains/packages.ts"
      ],
      "line_budget": "6 files, +343 / -4"
    }
  11. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    ACCEPT → PR #30707 comment 6672151175 · head 10809d6b · contract review 6671840220 · ready + auto-merge set 2026-11-05T23:26Z

  12. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Landed · 2026-11-05T23:54Z · PR #30707 merged by the queue as 59bcd2238e (2026-11-05T23:54Z), so the card closed by Fixes. This seat strips pm:dispatched in the same act. Docs follow-up stays open as #30711.

  13. removed
    pm:dispatched
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions