Skip to content

fix(cli): serve does not report a cloud capability the host mounted itself as unmounted - #39261

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-38972-serve-mounted-capabilities
Dec 3, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-38972-serve-mounted-capabilities

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38972

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:企业版主机用 objectstack serve 启动、并且自己挂上了 AI 席位和 AI 治理插件时,启动日志不再提示运维把这两项能力从 requires 里删掉;真正没人提供的能力照旧提示。
  • 为什么做:企业版组合部署的启动日志在误导运维删掉一个其实正常工作的能力,这是云端测量发现的问题。
  • 出错会怎样:只影响启动时的一行提示,启动本身不变;若判断有误,最坏是少一行或多一行提示,可直接撤回。
  • 要你做什么:无。

What changes

  • packages/cli/src/utils/capability-preflight.ts: new CLOUD_TIER_PROVIDER_IDENTITIES (token to the provider plugin's registered name and class name, for the four packageless cloud registry rows: ai-seat, governance, audit-compliance, access-policy-console) and hostMountsCloudTierProvider(token, plugins), an exact-identity match through providesCapability (@objectstack/core). A token with no row is never matched, so every other token is judged as before.
  • packages/cli/src/commands/serve.ts: the start-up filter unmountedKnownTokens drops a token whose provider the host's own plugins[] already holds, before the judgement runs. One conjunct inside the existing function, plus the import.
  • Why the filter and not the judgement: a cloud row with package: null has no package to resolve and no exports to match, so judgeDeclaredCapabilities cannot see a host-mounted provider at all. os verify and os validate are left as they are (see Acceptance notes).
  • The identities were read from the providers' source in @objectstack/security-enterprise (objectstack-ai/cloud at 072e0d10a): AiSeatPlugin is com.objectstack.security.ai-seat, AiGovernancePlugin is com.objectstack.security.ai-governance, AuditCompliancePlugin is com.objectstack.security.audit-compliance, AccessPolicyConsolePlugin is com.objectstack.security.access-policy-console. These are the same exports each cloud loader row names. The pattern follows serve's existing check for the closed AIStudioPlugin by name and class.
  • Changeset: @objectstack/cli patch.

Read first (by risk):

  1. packages/cli/src/commands/serve.ts, the unmountedKnownTokens filter. This is the one behaviour change in the boot path.
  2. packages/cli/src/utils/capability-preflight.ts, the identity table: exact names, no substring match.
  3. packages/cli/test/serve-host-mounted-cloud-capabilities.integration.test.ts, the real-boot pin and its in-boot control.

Tests

  • test/serve-host-mounted-cloud-capabilities.integration.test.ts (new, integration tier, one real os serve boot): the config mounts fixtures that carry the providers' names and class names, and declares requires: ['governance', 'ai-seat', 'audit-compliance']. Expected: no start-up line for governance or ai-seat. CONTROL in the same boot: audit-compliance, which nothing mounts, still gets the "provided only by a cloud runtime … Remove it from requires" line.
  • test/capability-preflight.test.ts, new describe in the existing harness file: every table key is a packageless cloud registry row; both measured tokens are matched when mounted, by name alone and by class name alone. Controls: an unmounted token, an empty or absent list, a consumer whose name contains the token, and tokens with no row are never matched.

Ablation was done once at 2b22eeaa6 with scripts/ablation-replace.mjs (the anchor hit, the restore matched the HEAD blob, and git diff HEAD was empty afterwards). Both suites run from src/ (bin/run-dev.js / direct ../src import), so no dist leg is involved.

  • Serve conjunct replaced by true: the boot pin went red, × governance and ai-seat, both mounted by the config: no start-up line, Tests 1 failed | 2 passed (3), VERDICT command-exit 1. The control and the ready-banner cases stayed green.
  • Predicate body replaced by return false;: Tests 2 failed | 54 passed (56). The two failures were the mounted cases. All controls stayed green.
Local runs (at 4622978 unless noted)
  • Build of @objectstack/cli^...: os-verify-lock: VERDICT command-exit 0.
  • pnpm --filter @objectstack/cli typecheck (tsc plus check:test-typecheck): VERDICT command-exit 0, check:test-typecheck: OK.
  • The targeted set: every cli test file that names the changed modules, plus the vocabulary pin. That is capability-preflight, normalized-call-sites, package-union-readers, serve-capability-vocabulary, capability-edition-advisory and the new boot pin: Test Files 6 passed (6), Tests 97 passed (97), VERDICT command-exit 0.
  • Full cli unit project: NOT MEASURED. The run exceeded the 10-minute foreground cap on a shared container and was stopped after 43 files passed and 0 failed. The full suite is left to CI.
Derived gates (`dispatch-gates.mjs --commands`, 76 families, at 4622978)
  • 72 exited 0.
  • 4 refused with their own PREREQUISITE NOT MET (exit 3), because this worktree built only the cli dependency closure: check:dual-build-cjs-loads, check:i18n, check:i18n-coverage and check:i18n-walk-parity. These are NOT MEASURED locally and left to CI.
  • dispatch-gates.mjs --ran: 76 derived famil(ies) accounted for — 72 run, 4 NOT-MEASURED.

Acceptance notes

  • os verify prints the same "no open-edition provider … Remove it from requires" advisory for a stack whose plugins[] carries one of these providers. It is left unchanged on purpose: its advisory records os validate's verdict (validate: 'error'), and os validate reads no plugins[] and still refuses such a stack. Making those two doors agree with a host-mounted provider is a separate question that this card does not ask.
  • Alternative not taken: lift the identities into the spec registry row (PlatformCapabilityProvider). That would change the shape of a published export, so the table stays CLI-local and is pinned to the registry rows instead.
  • The branch is 12 commits behind origin/main. None of them touch the changed files or the capability judgement (incoming cli paths: serve-host-config-metadata-door.pin.test.ts and metadata-file-name.ts), so no merge was taken before opening.

Verification

pnpm --filter @objectstack/cli exec vitest run test/serve-host-mounted-cloud-capabilities.integration.test.ts. Expect 3 passed: no start-up line for governance or ai-seat, and the line for audit-compliance.


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 Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: os serve (command, 53 pages)
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 256 client-bound route-ledger rows — the other 185 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 185: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 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 — 41 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 93e03541031a9b62f740c25afe0026bb07ed9190 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ec5b66d76ba8d15733695a9aa3fbaa8015122393 — the merge of head 46229786b69d868023688f6fda33dfbe9702fdb4 into base 93e03541031a9b62f740c25afe0026bb07ed9190, 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 ec5b66d76ba8d15733695a9aa3fbaa8015122393 && git checkout ec5b66d76ba8d15733695a9aa3fbaa8015122393
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 93e03541031a9b62f740c25afe0026bb07ed9190 46229786b69d868023688f6fda33dfbe9702fdb4 && git checkout -B drift-repro 93e03541031a9b62f740c25afe0026bb07ed9190 && git merge --no-ff 46229786b69d868023688f6fda33dfbe9702fdb4

node scripts/docs-audit/affected-docs.mjs --json 93e03541031a9b62f740c25afe0026bb07ed9190

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

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 3, 2026 04:52
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 3, 2026 04:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit a498ead Dec 3, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38972-serve-mounted-capabilities branch December 3, 2026 05:43
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.

cli serve: tells the operator to remove governance / ai-seat from requires while the EE host has mounted both

2 participants