Repository navigation
fix(cli): os deploy takes --confirm-global-uniques on a self-hosted runtime - #31369
Conversation
…untime The use-runtime path runs os package install with `os deploy` as its retry command, so the installation-wide uniques stop printed `os deploy --confirm-global-uniques`, a flag os deploy did not declare. Declare it and pass it through to the install beside the two upgrade confirmations, through one seam; refuse it on an ObjectOS Cloud target as the other two are refused. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5o7rUkfGZf2hPcQqZJ
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract reviewServed-tier: Inputs read: card #31338 with triage 6716400526 and the seat claim 6716849304 (route: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
…-mxv070 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5o7rUkfGZf2hPcQqZJ
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ Contract reviewServed-tier: Delta round on the review of record for ① Derived judgments
② Semver levelUnchanged: ③ Boundary flagsNone new. The skills-lane line stays routed through the coordinator, as in the previous round. The head's check-runs are the gate verdicts, and the seat gates landing on them. Implemented-by: VERDICT: PASS Generated by Claude Code |
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 35 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 64fa50aab0e48b80d15f7c8061608f1469bd6f9a && git checkout 64fa50aab0e48b80d15f7c8061608f1469bd6f9a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 44a030bfc8b1a3e1b5b6a4518e89831858b9c452 08d94661253f6f3b813d636c75203a26a579f9d0 && git checkout -B drift-repro 44a030bfc8b1a3e1b5b6a4518e89831858b9c452 && git merge --no-ff 08d94661253f6f3b813d636c75203a26a579f9d0
node scripts/docs-audit/affected-docs.mjs --json 44a030bfc8b1a3e1b5b6a4518e89831858b9c452
|
|
domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ 席位意见:接受。以自托管运行时为目标的 席位核对 — ACCEPT ·
|
Requested by Leehom · project thread
Fixes #31338
Clause-②: yes —
os deploygains an accepted flag (--confirm-global-uniques), widening a published CLI command's accept set; the seat's own review of the declaration is owed before landingMetadata-protocol: none
维护者速读
os deploy新增--confirm-global-uniques开关,在自托管运行时(os environments use-runtime)路径上和已有的两个升级确认(--confirm-access-upgrade、--confirm-upgrade)走同一处转交给内嵌的os package install;目标是 ObjectOS Cloud 时照两个升级确认的做法,在构建和发送前拒绝。文档cli.mdx补了这一行。UNIQUE_SCOPE_CONFIRMATION_REQUIRED)时,CLI 打印的重试命令是os deploy --confirm-global-uniques,但os deploy不认这个参数,照抄(尤其是 agent 照抄)会被当未知参数拒绝,部署路径也无法传这个确认。os package install和两个升级确认不变;@objectstack/clipatch;回滚即 revert。packages/cli/src/commands/deploy.ts的CONFIRMATION_FLAGS/confirmationArgv(唯一转交处)和 Cloud 拒绝循环;packages/cli/test/deploy.test.ts新增三条用例。pnpm --filter @objectstack/cli exec vitest run --project unit test/deploy.test.ts,预期 34/34 通过;其中「declares every confirmation flag the embedded install prints」一条在os package install将来新增确认开关而os deploy没跟上时会变红。What changes
On a self-hosted runtime target,
os deployrunsos package installin-process withretryCommand = 'os deploy', so every stop that install prints namesos deployas the retry. The installation-wide uniques stop (UNIQUE_SCOPE_CONFIRMATION_REQUIRED, ADR-0120 D5e) printedos deploy --confirm-global-uniques, a flagos deploydid not declare: oclif refused it as an unknown flag (exit 2), and the deploy path had no way to pass the confirmation.packages/cli/src/commands/deploy.ts. Declares--confirm-global-uniques(a boolean, help text namingos package install --confirm-global-uniques, as the two upgrade confirmations name theirs). The three confirmations are now one list,CONFIRMATION_FLAGS, and one function,confirmationArgv, turns the given ones into install argv.deployToRuntimetakes that argv instead of two token parameters, so there is one forwarding seam and no second copy of the install command's handling. As before, the confirmations go to the install only; the dry run sends none (install-local answersdryRunbefore its uniques gate,marketplace-install-local-plugin.tsanswerUpgradeDryRunprecedes theGLOBAL_UNIQUE_CONFIRMATION_REQUIREDstop).--confirm-access-upgradeand--confirm-upgradealready are (same loop, same sentence, exit 1).content/docs/deployment/cli.mdx. Theos deployflag table gains the--confirm-global-uniquesrow; § To a self-hosted runtime step 3 names the three confirmations passed through, the uniques stop, and that the printed retry namesos deploy..changeset/31338-deploy-confirm-global-uniques.md:@objectstack/clipatch.install.tsis untouched: the seam did not need sharing.Tests
packages/cli/test/deploy.test.ts, in the use-runtime block, three new cases:os deploy --confirm-global-uniques, andos deploy --confirm-global-uniquesreaches the install withconfirmGlobalUniques: true(and the dry run without it).confirm-*flagos package installdeclares is declared byos deploy(the class guard: a future install confirmation thatos deploydoes not take reds here).--confirm-global-uniquesis refused on an ObjectOS Cloud target before anything is built or sent.CONTROL: the existing access-upgrade and schema-upgrade cases and their Cloud refusals pass unchanged;
test/package-install-dry-run.test.tspasses unchanged.Red on main (cases added, source at origin/main e735425)
Exit 2 is oclif's unknown-flag refusal: the printed retry was refused.
Ablations (scripts/ablation-replace.mjs, restore proven blob == HEAD 2b59a9ce9b7f and git diff HEAD empty)
The test imports
../src/commands/deploy.jsdirectly, so no dist leg applies.A. Cloud refusal skips the new flag (
|| flag === 'confirm-global-uniques'in the refusal loop'scontinue):B. The forwarding drops the new flag (
|| flag === 'confirm-global-uniques'inconfirmationArgv's empty return):Acceptance notes
os deploy's accept set grows by one flag; nothing it accepted before is refused, and with the flag absent the install body is byte-identical to before.cli.mdx. docs: teach os mcp connect and the use-runtime deploy target in the remaining pages #31335 (skills lane, open) editscli.mdx§os dev(around L169-L174) only; this PR edits §os deploy's flag table and § To a self-hosted runtime step 3 (around L3245, L3267). No overlapping hunk, so the doc line stays in this PR; whichever lands second merges cleanly.skills/objectstack-platform/references/operations.md, added by docs: teach os mcp connect and the use-runtime deploy target in the remaining pages #31335) is the skills lane's; the line it needs is in the report'sout_of_scope_findings. Theos deployflag table still has no--confirm-upgraderow (docs: teach os mcp connect and the use-runtime deploy target in the remaining pages #31335's "Other sites found" already names it); left alone.Verification
All local readings are on head
7e77a2ba(the merge oforigin/maind0512c2finto fix commitcecb4075; the merge brought nopackages/clichange).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 96 commands against merge basee73542555(4 paths, +83/-18). All 96 ran after a fullturbo run build --filter='./packages/**'(81/81 tasks): 96 × exit 0.--ranreconciliation: "96 derived, 96 run, 0 NOT-MEASURED, 0 UNRUN", exit 0. Per-command record: project filepm-orders/server/31338-gates-ran.txt.pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2under the verify lock:VERDICT command-exit 0, Test Files 401 passed (401), Tests 5671 passed (5671). Started oncecb4075;packages/cliis byte-identical on7e77a2ba. The integration tier is declared to CI (the diff touches no integration test,bin/or spawn helper).NODE_OPTIONS=--max-old-space-size=6144 pnpm --filter @objectstack/cli typecheck(tsc --noEmit && check:test-typecheck):VERDICT command-exit 0, test layer OK.packages/cli/src/commands/deploy.tsandpackages/cli/test/deploy.test.ts: exit 0.node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: exit 0.pnpm lint,test:repoand the other CI-owned families: CI on this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5o7rUkfGZf2hPcQqZJ