Skip to content

Artifact boot silently drops an app's code plugins: runtimeModule carries only functions, so plugins: [new XPlugin()] never mounts (and its dependencies are not shipped) #36647

Closed

Description

@os-bob

Filing gate ①: a reproducible defect and a contract violation (declared ≠ delivered).
Source: evaluation of the BrightRule app (objectstack-ai/brightrule, branch feature/policy-inquiry) on ObjectOS EE ghcr.io/objectstack-ai/objectos-ee:18.6.0, local stack (PostgreSQL 16 + pgvector), 2026-11-23.
Dedupe: org:objectstack-ai runtimeModule plugins and org:objectstack-ai artifact plugins dropped returned nothing on this.

What happens

An app whose objectstack.config.ts lists code plugins builds fine and reports them, but none of them mount when the app is booted from its artifact. Nothing says so.

BrightRule's config:

plugins: [
  new ConnectorRestPlugin(), new ConnectorOpenApiPlugin(), new ConnectorMcpPlugin(),
  new KnowledgeServicePlugin({ sources: [policyClauseKnowledgeSource()] }), // @objectstack/service-knowledge
  new KnowledgeVectorPlugin(),   // app code: OpenAI-compatible embedder + pgvector store (uses `pg`)
  new PolicyQaPlugin(),          // app code: indexes clauses at kernel:ready
],
  1. os build (18.6.0) prints Runtime: 6 plugins and writes dist/objectstack.json plus dist/objectstack-runtime.<hash>.mjs.
  2. The runtime module exports only functions and meta (the hook handlers). The plugins array in objectstack.json holds plain descriptors ({ name, version, dependencies, options }), not anything that can be started.
  3. Boot EE 18.6.0 with OS_COMPOSED_ARTIFACT_URL=file:///…/dist/objectstack.json. The plugin table shows 57 plugins and none of the six: no com.objectstack.service.knowledge, no app plugins, no connectors. No warning at build or at boot.
  4. Consequence for this app: the knowledge service, the vector adapter and the clause index never exist. Everything that depends on them fails later and elsewhere (empty retrieval, hooks finding no service).

Why (origin/main e9fa6b5)

  • packages/runtime/src/load-artifact-bundle.ts:199 mergeRuntimeModule imports the runtime module and reads mod.functions ?? mod.default?.functions only (L205). Plugins are never read from it.
  • packages/cli/src/utils/build-runtime.ts:233 bundles with packages: 'external'. Even if plugins were exported, their imports stay bare. In the EE 18.6.0 image @objectstack/service-knowledge, @objectstack/embedder-openai and pg do not resolve (require.resolve from /repo/cloud/apps/objectos-ee fails for all three), so a deployed artifact has no way to load them.

The contract it breaks

  • cloud apps/objectos-ee/deploy/artifact-pinned-boot.md, "What this mode does and does not mount": "The app's own plugins, flows and triggers come from the artifact".
  • The build summary's Runtime: 6 plugins tells the author the plugins are in the build.

Expected

One of these, decided by the maintainer:

  • Carry them. The artifact ships the app's code plugins in a form the runtime can start (exported from the runtime module), together with their dependencies (bundled, or installed beside the artifact), and the loader mounts them.
  • Refuse them. If code plugins are not supported on the artifact path, os build (or the boot) fails or warns loudly, naming each plugin that will not mount and saying what to do instead. Today the drop is silent.

Workaround used to finish the evaluation

A derived image on top of objectos-ee:18.6.0: the app's production dependencies installed under /srv/brightrule/node_modules, and an entry objectstack.config.ts that imports the stock EE config unchanged and appends the app's plugins. With it the plugins mount (60 plugins) and the pgvector index is built. Every customer with a plugin-bearing app would have to maintain such an image per EE release.

Related (filed together):

  • objectstack-ai/cloud#4935 — ask never loads a package's surface: 'ask' skill
  • objectstack-ai/cloud#4933 — search_knowledge is never registered
  • objectstack-ai/cloud#4934 — query_data fails on DeepSeek (json_schema response format)

Activity

  1. added
    bug
    domain:cli
    domain:server
    on Nov 23, 2026
  2. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:cli + domain:server (os build runtime module and artifact boot) · pm:queue; rationale: area:package (as filed) · Bug · an app that lists code plugins (plugins: [new XPlugin()]) builds and reports them, but when booted from its artifact on 18.6.0 none of them mount. The runtime module exports only functions and meta, and objectstack.json holds plain descriptors. Connectors, knowledge services and the app's own plugins vanish with no error. Reproduced on a real customer-style app evaluation (BrightRule on objectos-ee 18.6.0, filed by os-bob). A shipped capability that silently does nothing is p1 under the 2026-11-21 standard → p1 · size M.

  3. added
    pm:queue
    priority:p1
    on Nov 23, 2026
  4. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    Claim: PM loop round 7 · 2026-11-23T12:30Z
    Session: session_01JQwxbZeHNsF3RWcWpj7rGj
    Thread session: session_01JQwxba17kw1B3myaWtd4wP
    Account: os-warren
    Branch: the card thread's own branch, named at its first push; the seat amends this claim then
    Worktree: objectstack-issue-36647
    Domain: domain:server
    Seat: repo:objectstack#1
    Area: card thread #36647 (w7-B)
    Dispatch: p1, unclaimed, taken under the maintainer's ruling 2026-11-23T12:16Z 「所有区未认领的p1你都可以接」; deduped by the coordinator
    File surface: the artifact build/boot path that carries an app's code plugins (runtimeModule) and ships their dependencies, its tests, a changeset (stop on breach; the thread's first report states the real surface and the seat amends this line)
    Container & model: S, mode:thread, model: opus — default tier; the thread's first report states the served tier, effort: high
    Clause-②: no. A new route, contract, spec key or export is amended to yes before its code
    Metadata-protocol: none
    Responsibility: as the card body states
    Thread-read: none
    Premise: read from the card; the thread re-reads it on its base before code
    Serial constraints cleared: no open PR names the card(s), per the coordinator's dedupe

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 23, 2026
  6. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    Claim amendment · 2026-11-23T12:48Z: completes claim 7101211094.
    Branch: claude/project-thread-g4g7t8. Route: warn once at artifact-door boot when an artifact declares plugins it does not carry, rather than carrying them. This follows #15219 ruling A and ADR-0025 §3.10, so it is not a fork.
    Surface: packages/runtime/src/artifact-declared-plugins.ts (new) and its test, packages/runtime/src/app-plugin.ts, content/docs/deployment/self-hosting.mdx, a changeset, and one cli pin.
    Clause-②: no. Metadata-protocol: none.
    Follow-up noted: the cloud doc carrier apps/objectos-ee/deploy/artifact-pinned-boot.md gets a cloud-side follow-up, not this PR.

  7. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-warren · session_01JQwxba17kw1B3myaWtd4wP
    os-dev-report

    {
      "issue": 36647,
      "status": "done",
      "branch": "claude/project-thread-g4g7t8",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36708",
      "head_sha": "a5af61eea5991520e1f63a560cef781986cea291",
      "session": "session_01JQwxba17kw1B3myaWtd4wP",
      "premise_still_valid": true,
      "summary": "Measured on base 115d3878: os build writes a stack's plugins into objectstack.json as JSON descriptors (no init), mergeRuntimeModule reads functions only, nothing on the artifact path turns a descriptor back into a plugin, and the boot said nothing. Route (seat-accepted, follows #15219 ruling A and ADR-0025 3.10): the drop stays, the silence goes. AppPlugin.start() on the artifact door (securityMetadataRegistrar 'artifact-door', set only by createStandaloneStack and the os dev host-config artifact door) warns once, naming every listed plugin the kernel's own plugin table does not hold, with the remedy; fields {appId, plugins}. Judged per name, so a host that assembles them hears nothing about the ones it runs; package-specifier strings are not judged. No option, export or artifact field added. One self-hosting.mdx table row; runtime patch changeset.",
      "tests": "cli pin test/build-artifact-code-plugins-boot.test.ts (real os build in process + createStandaloneStack boot of what it wrote): 2/2; runtime src/artifact-declared-plugins.test.ts: 9/9. Ablation: door call off -> runtime 2 failed | 7 passed; runtime rebuilt -> cli 1 failed | 1 passed (premise test green); restored + rebuilt 9/9, 2/2. Neighbours runtime app-plugin*/standalone-stack*/default-host*: 41 files, 564 passed. cli vitest-tiers-partition 22/22.",
      "gates": "runtime + cli typecheck exit 0; eslint --no-inline-config on touched files exit 0; overlap-check exit 0 (clean vs main, #36311, #35129). dispatch-gates --commands (100) at 3676b4f987: 97 exit 0; check:test-source-alias exit 1 -> fixed at a5af61eea5 (two module-top imports), re-run exit 0; check:skill-examples and check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (need built output of packages not built here): NOT MEASURED, CI runs. CI at 3676b4f987 red only on Test-source alias gate (same finding); CI at a5af61eea5 in_progress. Results: /mnt/project-files/issue-36647/gate-results-3676b4f9.tsv",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP writes (reads only via gh api)",
      "api_writes": "2 relay writes: pr_create #36708 (draft, assignee os-warren), issue_patch #36708 body; + this report comment",
      "deviations": [
        "PR body ends with a signed trailer because the relay refuses an issue_patch without it",
        "no review request to os-warren at create: the seat requests at ACCEPT; no PR subscription taken, landing is the seat's",
        "an early WIP commit carried an AppPlugin option (artifactBoot); replaced before the PR by the existing artifact-door declaration, Clause-2 stays no"
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · apps/objectos-ee/deploy/artifact-pinned-boot.md says the app's own plugins come from the artifact; seat noting as a cloud follow-up",
        "noted, not filed: os build's 'Runtime: N plugins' row prints no note that the artifact does not carry them; a build-time note is a maintainer pick"
      ]
    }

    Generated by Claude Code

  8. removed
    pm:dispatched
    on Nov 26, 2026
  9. github-actions commented on Nov 26, 2026

    @github-actions
    Contributor

    os-closed-card-sweep — machine-findable marker for this generated comment.

    Removed the pm-loop state label(s) this closed card no longer claims: pm:dispatched.

    A state label claims work is in flight. This card is closed on a merged delivery, so the claim
    is stale; every other label is left exactly as it was found. Nothing here is a judgement about
    the card, and no verdict-bearing label is ever touched by this sweep.

    posted by half-state-patrol run 45733194792 · trigger workflow_dispatch

    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

area:packagebugdomain:clidomain:serverpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions