Repository navigation
fix(cloud-connection): uninstalling a composed app through install-local uninstalls every package body it installed - #34418
Conversation
…runnable command The first pass of codemod-split-engine.mjs, copied with its host parameterised (registry.ts, SchemaRegistry, registry-*, #33949) and an exports-equality proof added beside its byte-identity proof. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… (move-only) Generated by node scripts/codemod-split-registry.mjs --write on a branch cut from origin/main; never hand-edited. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…plit moved Six READERS rows named registry.ts sites that the split moved, unedited, into registry-top-level.ts and registry-platform-global.ts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…y split's changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…ons in registry.ts Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…rea-E1-33949-registry
node scripts/codemod-split-registry.mjs --write on registry.ts at 86350e1, after the open PR that touched it merged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…its two path readers look, and regenerates Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…e the split now keeps it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…h main Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… split on it registry.ts took a 73-line change on main; the split is regenerated from main's registry.ts with node scripts/codemod-split-registry.mjs --write. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… split on it registry.ts changed on main; the split is regenerated from main's registry.ts with node scripts/codemod-split-registry.mjs --write. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…ed at the regeneration commit plus the margin Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…script lives in branch history only Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… reasons cite the split's PR instead of a script path Comments and text only; no code moves. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… artifact (red) Claude-Session: https://claude.ai/code/session_01FEkQ5pHNFS9mn8hS13iGyL Co-Authored-By: Claude <noreply@anthropic.com>
…fact withdraws every package body it installed, extending modules first Claude-Session: https://claude.ai/code/session_01FEkQ5pHNFS9mn8hS13iGyL Co-Authored-By: Claude <noreply@anthropic.com>
…nstall's own warnings Claude-Session: https://claude.ai/code/session_01FEkQ5pHNFS9mn8hS13iGyL Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 7 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 0c83f8f17a96656ce55ef1e605d51b2a20fe6c8b && git checkout 0c83f8f17a96656ce55ef1e605d51b2a20fe6c8b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin fa9d695522925152815106605e5a612e331d2773 c965590cfc76df116ed986cb4401a52668d88125 && git checkout -B drift-repro fa9d695522925152815106605e5a612e331d2773 && git merge --no-ff c965590cfc76df116ed986cb4401a52668d88125
node scripts/docs-audit/affected-docs.mjs --json fa9d695522925152815106605e5a612e331d2773
|
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL Request: review · PR #34418 · area o1-B · Fixes #34396 · head
|
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5kcNtBBExhz4DZqYbi 席位核对 · ACCEPT (L1, first read) · Head-sha: c965590 · 2026-11-16T16:08ZL1 thread L1-a for area o1-B, reading the final head declared in 6921783819. I read card #34396, dev report 6921083519, the PR body with its Acceptance notes, and the PR's own diff against the main it merged (
Notes (not blocking)
Landing: not Tier H. Area o1-B lands it. If #34403 lands first, re-check that the merge is still clean on the landing head. |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL Verdict: ACCEPT at 2026-11-16T16:09Z, and the landing rides this stroke. ACCEPT → PR #34418 comment 6921833020.
State: ready plus auto-merge through the merge queue. On MERGED, |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5pHNFS9mn8hS13iGyL Re-queue · 2026-11-16T16:46Z: PR #34418 left the merge queue on CI_FAILURE. The only red is the |
Fixes #34396
Clause-②: no
Metadata-protocol: none
维护者速读
type: app包加若干type: module包,ADR-0130 D4)时,按"安装时的同一个单元"卸载:安装登记的每个子包都会被撤下,扩展了其他子包对象的模块先撤,被扩展的应用后撤。objectExtensions扩展了应用自己的对象时,卸载应用返回 409 要求"先卸载模块",但模块没有自己的安装记录(404),包接口又把它当只读(422),结果什么都删不掉,只能去主机上删缓存文件再重启。packages/cloud-connection/src/marketplace-install-local-plugin.ts的planUnitWithdrawal与handleUninstall中逐成员撤下的那段;marketplace-install-local-composed-uninstall.test.ts。pnpm --filter @objectstack/cloud-connection exec vitest run src/marketplace-install-local-composed-uninstall.test.ts,预期 8 条全过;把插件文件换回 main 版本再跑,预期 4 条以 409 RESOURCE_CONFLICT 失败。What changes
DELETE /api/v1/marketplace/install-local/:manifestIdnow uninstalls the unit the install entry installed.packages[]artifact yields every member id, in the reverse of the install's dependency order (orderHydrationBatch). A single-package entry yields its own id alone, so that path is unchanged.assertPackageUninstallable, is asked of every member while the whole unit is still registered. A new pure helper,planUnitWithdrawal, reads each refusal'sextendersandcustomizationPackageId:409 RESOURCE_CONFLICTsentence, as before. That includes a package of a different install and a pair this install did not deliver. So does a refusal that carries no readable causes, and a cycle of members that extend each other.awaitafter the ledger removal. Then it withdraws each withdrawn member's object copies, restores the copies its extensions rewrote, and runs each member's uninstall cleanups under its own package id. Artifact handlers are unbound once, under the entry's id, which is where the install bound them. Themetadata:reloadedre-sync is announced once, and only when at least one member was withdrawn. Thepackage_uninstallledger row is written once for the entry.runUninstallGuards) are asked of every member, not only the entry's id.cleanupsholds the outcomes of every member, in order.No
packages/objectqlfile changed: the registry's predicate and its refusal fields are read as they are. The claim's file surface allowed the split registry modules, and none needed an edit.Tests
New
packages/cloud-connection/src/marketplace-install-local-composed-uninstall.test.tsruns on a realObjectKernelwithObjectQLPlugin. It installs through the door, then uninstalls.DELETEanswers404 RESOURCE_NOT_FOUND, andisWritablePackageanswers false for it. That predicate is the one behind the package door's422 WRITABLE_PACKAGE_REQUIRED. Both stay true after the fix, by design.409 RESOURCE_CONFLICTnaming that package, and nothing of the unit moves. The control: after that install is uninstalled, the unit's uninstall answers 200.Red leg (plugin at the merged main parent cfcba53) and green leg, HEAD c965590
Tests 4 failed | 4 passed (8). Each failure is the reporter's refusal:{"code":"RESOURCE_CONFLICT","message":"Uninstall the package that extends an object of \"com.probe.suite\" first (com.probe.suite.carbon), then uninstall \"com.probe.suite\" again: ... (objectExtensions, ADR-0029). ..."}: expected 409 to be 200.cfcba53920:+ path, andplanUnitWithdrawaloccurred 0 times. The restore went throughgit checkout HEAD --, was proven by an emptygit diff HEAD, and the hash matched the HEAD blob.Test Files 1 passed (1) · Tests 8 passed (8).pnpm --filter @objectstack/cloud-connection test:Test Files 84 passed (84) · Tests 1235 passed (1235). This includes the existingmarketplace-install-local-uninstall-withdrawal.test.tspins of the single-package order and the 409.pnpm --filter @objectstack/cloud-connection typecheck: exit 0.tsconfig.test.jsonlists the new test file.Acceptance notes
objectExtensions, is read by an active validation rule of another member of the same artifact. The runtime's dependent-rule guard would then refuse that member's uninstall. Not measured on a real artifact. The reporter's shape (a module adding fields to the app's objects) does not hit it.notespeaks of "the package". The operator log names the members that were withdrawn.git merge-treeran against the open PRs that touchmarketplace-install-local-plugin.ts: fix(cloud-connection): install-local seeds a composed bundle's package datasets on install, reseed, upgrade and restart #34403 (claude/issue-34336-composed-bundle-seeds) and fix(cloud-connection)!: install-local parses manifest.namespace through its declaration #34316 (claude/area-A5-33922). Both merged with no conflict.Verification
Local subset, at HEAD c965590. The CI-owned farm is read from this PR's check-runs.
pnpm --filter '@objectstack/cloud-connection^...' build(the dependency closure) ran underos-verify-lock.shand ended withVERDICT command-exit 0.dispatch-gates.mjs --commandsderived for this diff: 71 derived, 70 run at exit 0, and--ranreconciles71 derived, 70 run, 0 NOT-MEASURED, 1 UNRUN.pnpm check:dual-build-cjs-loads, NOT MEASURED locally:PREREQUISITE NOT MET — this gate reads built output, and some package has no dist/(39 packages unbuilt in this worktree). CI'sLint & Repo Gatesruns it.check-platform-checklist --changed-fromis not owed.!and no(narrowing)arm.Generated by Claude Code