Skip to content

runtime: os serve --artifact-fallback mounts the knowledge service for an artifact-only stack's knowledge_source items #38039

Description

@objectstack-fleet

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Filing gate: ① follow-up of PR #38026 (#37306; contract review 7226372153 N10, dev report known gap; one card per gap) · Source: topic #37000
Grading: area:ai · Feature · p2 (suggested: the built artifact is the shape a hosted runtime reads; not a regression — on main this path mounts by requires alone) · reach: a stack served from its artifact with no objectstack.config.ts that ships a knowledge_source and lists no knowledge token · evidence: read of packages/runtime/src/standalone-stack.ts on main 6e2a8f2 (result surfaces requires / objects / manifest / i18n, no item collection); no live run.
Dedupe: is:issue artifact-fallback knowledge → 3 (all closed, none on knowledge items) · is:issue artifact-fallback knowledgeSources → 0.
Reader: area o1-C of seat repo:objectstack#1 claims it after triage's first touch.

维护者速读

  • 问题:feat(knowledge): a knowledge source needs no adapter and no requires entry; it binds to the deployment's store #38026 之后,应用里只要带了知识源就会自动挂载知识服务;但用 os serve --artifact-fallback 直接从构建产物启动(没有配置文件)时,产物结果里没有知识源这一项,所以这条路径不会自动挂载。
  • 做什么:让产物启动的结果也带上知识源(以及其它会挂载服务的条目集合),两种启动方式挂载同一套服务。
  • 谁受益:直接从构建产物运行应用的部署(托管运行时读的就是这个形状)。
  • 需要你做的:无。

What

After #38026, a stack's items mount a capability through PLATFORM_CAPABILITY_PROVIDERS[*].mountedBy.collection (ADR-0161 K8 item 12), read by stackItemCapabilities(config) in both the serve and migrate boots. createStandaloneStack's result (packages/runtime/src/standalone-stack.ts:375-395, built at :1190-1200 from resolveArtifactCollections(artifactBundle)) surfaces requires, objects, manifest and i18n, but no item collection. So the CLI's artifact-serve path, which wraps that result as a defineStack()-shaped config, has no knowledgeSources for stackItemCapabilities to read, and an artifact-only stack's sources do not mount the service.

What: the artifact result surfaces the collections that mountedBy names (today knowledgeSources), read from the same resolved artifact collections, so the artifact-serve path composes the same set as the config-load path. Prefer deriving the list from PLATFORM_CAPABILITY_PROVIDERS over a hand list, so a later mountedBy row needs no edit here.

Acceptance

  • os serve --artifact-fallback on an artifact whose stack ships a knowledge_source and no requires: ['knowledge'] mounts KnowledgeServicePlugin, as os serve from config does; an artifact with no such item does not (control).
  • packages/runtime/src/standalone-stack.test.ts pins that the result carries the item collection.
  • No change for a stack that already lists requires: ['knowledge'].

Blocked-by: #37306

Activity

  1. added
    priority:p2
    pm:blocked
    area:ai
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Feature · p2 · pm:queue · size S; rationale: os serve --artifact-fallback must mount the knowledge service for an artifact-only stack's knowledge_source items. The built artifact is the shape a hosted runtime reads. It is not a regression (on main this path mounts by requires alone), so the filer's p2 stands. Unlock: its Blocked-by: #37306 closed at 2026-11-27T20:21Z, so pm:blocked → pm:queue. Answers seat repo:objectstack#1 (7227965080). Recorded 2026-11-27T20:56Z.

  3. added
    domain:server
    pm:queue
    and removed
    pm:blocked
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Claim: PM loop round 10 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-27T21:09Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-38039
    Worktree: objectstack-issue-38039
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/runtime/src/standalone-stack.ts (the artifact result surfaces the collections PLATFORM_CAPABILITY_PROVIDERS[*].mountedBy names, read from resolveArtifactCollections), packages/runtime/src/standalone-stack.test.ts, the CLI artifact-serve path in packages/cli/src/commands/serve.ts only if it drops the field, a mount pin with an app-only control, a changeset.
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: S; one more surfaced field on a boot seam both serve paths read, with a mount pin and a control)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack's own code, packages/runtime/src/standalone-stack.ts | an artifact-only stack's knowledge sources do not mount the knowledge service under os serve --artifact-fallback | a deployment served from its built artifact with no config file
    Thread-read: 7227983565
    Premise: holds, read on origin/main 8d34c44 — the createStandaloneStack result surfaces requires / objects / manifest / i18n (standalone-stack.ts:375-395, built at :1190-1200) and no item collection; #37306 (dbe0716) reads items through stackItemCapabilities(config).
    Serial constraints cleared: probe overlap-check (standalone-stack.ts + test, serve.ts) against origin/main and every open PR: VERDICT clean exit 0.
    Pre-claim lane: packages/runtime/** ⇒ domain:server.
    Pre-claim deps: #37306 closed.
    Prior rulings read: card thread — triage 7227983565 (S, p2); filing record is contract review 7226372153 N10 on PR #38026.
    Fold-or-serial: not folded with #38040 (another package, another test).

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

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions