Repository navigation
feat(runtime)!: retire POST /packages/:id/adopt-orphans and its two console entries (#38150 PR-B1) - #38364
feat(runtime)!: retire POST /packages/:id/adopt-orphans and its two console entries (#38150 PR-B1)#38364objectstack-fleet[bot] wants to merge 4 commits into
Conversation
…le entries (#38150 PR-B1) The all-at-once adoption of every loose item retires with every surface that reached it: the route and its ledger row, the protocol method `reassignOrphanedMetadata` (and `releaseAdoptedObjectOwner`, which only it used), the client's `packages.adoptOrphans`, the spec's `ReassignOrphanedMetadataResponseSchema` (registered as a retired def), the `packages_orphan_adoption_unsupported` message, and the console's "Adopt loose items" button and Studio menu item with their i18n keys. The move door (`POST /packages/:id/move-in`) takes its place in every route table pin, and the old door's own tests go with it. Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
…nd a valid dogfood package id after the retirement (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
…ted route tests, and no tracker id in the semantic entry's guidance (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 4 package(s): 31 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 14 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 187 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 014f68a6b729a0d0534723e2d956cc041939b6b9 && git checkout 014f68a6b729a0d0534723e2d956cc041939b6b9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ad3d04f020303056224651c052109c61c18db13d 1852bb89833fada33631c7219a6d203b7b4c295e && git checkout -B drift-repro ad3d04f020303056224651c052109c61c18db13d && git merge --no-ff 1852bb89833fada33631c7219a6d203b7b4c295e
node scripts/docs-audit/affected-docs.mjs --json ad3d04f020303056224651c052109c61c18db13d
|
|
Parked for ordering, by the seat's branch ruling for #38150: PR-B1 lands no earlier than PR-A2, so A2 takes the branch PR-B1's head here is Generated by Claude Code |
Requested by Tesla · project thread
Part of #38150. This is PR-B1, by the seat's ruling (b) on the PR-B split and claim amendment 4 (comment 7239673373): the server retirement of
adopt-orphansand the two console entries that called it. PR-A1 (#38185, the move door) is merged. This PR lands after PR-A2, whose move-in confirm step is the console's replacement door, so no prerelease ships a console with no way to move loose items. PR-B2 (Studio~org, the redirects to?source=loose, the Q-f E classifier #38061, the ADR marks) follows A2.Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill under
skills/**or.claude/skills/**namesadopt-orphans,adoptOrphansor "Adopt loose items" (searched at this head)Size: 3,123 lines (additions + deletions, generated files included: 358 added, 2,765 deleted, 75 files;
git diff --numstat c091d28c8 1852bb898). This PR alone passes 3,000, and with A1's 1,947 the card stands at 5,070 (#38280's per-card line), so this PR is Tier H.Metadata-protocol reading, measured. Removing
ReassignOrphanedMetadataResponseSchemamoves theapiauthorable-surface shard (packages/spec/authorable-surface/api.jsonloses its fourapi/ReassignOrphanedMetadataResponse:*keys), so the line is notnone. The closed vocabulary has noremoved; a removed key readsnarrowed(AGENTS.md Post-Task Checklist step 3), which is what this PR declares.authorable-surface.base.jsonkeeps the four lines: it mirrors the upstream anchor and is rewritten only bygen:authorable-surface-basefrom the git-resolved baseline.维护者速读
POST /packages/:id/adopt-orphans改答 404。散落项改由上一个合并请求做好的「移入软件包」接口按勾选移入,控制台入口在 PR-A2。What changes
Runtime. The
POST /packages/:id/adopt-orphansblock leavespackages/runtime/src/domains/packages.ts, with its mount indispatcher-plugin.ts, its row inroute-ledger.ts, andreassignOrphanedMetadataon the protocol handle type. The doc lists that named the door namemove-innow. The route answers 404 (pinned on a booted stack, below).Protocol.
ObjectStackProtocolImplementation#reassignOrphanedMetadataand its facet body inprotocol-package-commits.tsare removed, and so isreleaseAdoptedObjectOwner(its only caller was the adoption): the class member, the host entry inprotocol-host.ts, and the body inprotocol-object-owner.ts. Three imports that only the removed code read go with them. Comments inprotocol-registry-hydration.ts,protocol-extension-field-suffix.tsandprotocol-package-move-in.tsthat named the old door now name the move door, or say it retired.SDK.
client.packages.adoptOrphansis removed from@objectstack/client.Spec.
ReassignOrphanedMetadataResponseSchemaand its two types leavepackage-lifecycle.zod.ts. The def is registered inRETIRED_DEFS_BY_MAJOR(packages/spec/src/migrations/entries/retired-defs/19.api__ReassignOrphanedMetadataResponse.ts), as the manifest deletion gate requires, and its manifest line and shard keys are removed;api-surface,declaration-map,export-originsand the reference docs are regenerated.packages_orphan_adoption_unsupportedleavesoperation-message.ts(four locales). The ADR-0087 disposition is a registered semantic entry,19.packages-adopt-orphans-door-retired.ts(surface, replacement, reason, acceptance).Console. The Packages page's development face loses the "Adopt loose items" button, its dialog, handler and state (
PackagesPage.tsx). Studio's 「⋯」 menu loses itsadoptitem (STUDIO_PACKAGE_MENU_ITEMSis five items).packageActions.tsxlosesadoptLooseItems,adoptedTextandAdoptLooseItemsDialog, and@object-ui/i18n's studio namespace loses the sixengine.packages.detail.adopt*keys in en and zh (no other locale carried them). Neither entry is repointed: the seat ruled no interim pointer, and A2 brings the replacement.Docs.
content/docs/api/metadata-api.mdx,protocol/knowledge.mdxand the system-context register's row 55b namemove-inwhere they listedadopt-orphans(the move door asks the same wall and knowledge-source gates). Left as history, per the seat: the three spec18.*semantic entries,content/docs/releases/v18/*, the consumed.changeset/pre/*entries, and the historical sentence inhttp-dispatcher.tsabout the vetted org source.Changeset.
38150-adopt-orphans-door-retired.md,!, BREAKING with the FROM → TO table and the one-line fix:@objectstack/specmajor (the seat's level; pre mode admits it), metadata-protocol, runtime, client,@object-ui/app-shelland@object-ui/i18npatch.Each removed assertion, and what pins its rule now
Deleted files (the old door's own tests):
metadata-protocol/…/protocol.adopt-orphans-owner-judges.test.tspackage-move-in.dogfood.test.ts: "the object owner: … refused with the save door's mismatch" and "the permission-set owner: …" (the move runs the save door itself)metadata-protocol/…/protocol.adopt-orphans-platform-record.test.tsprotocol-package-move-in.test.ts: "the platform's own record is not loose: refused NOT_LOOSE …", with its controlmetadata-protocol/…/protocol.reassign-orphans-durability.test.tsprotocol-package-move-in.test.tspins the fault (500, nothing moved) and the failed undo (500 naming what did not go back)objectql/…/protocol-adopt-orphans-draft-view-registry.test.tsobjectql/…/protocol-adopt-orphans-object-registry.test.tspackage-move-in.dogfood.test.tsA3 and "whole or nothing" (an object moved and put back is served at once), andpackage-first-authoring.dogfood.test.ts's D5 case, now driven throughmoveIntoPackageruntime/…/packages-adopt-orphans-readonly.test.tsmove-inrows that replaceadopt-orphansin the runtime route tables (capability gate, read-only remedy, walled refusal, knowledge-source gate, closed query, vetted org source, partial-host 501 and its message key)ui/…/PackagesPage.adoptLooseItems-13339.test.tsxEdited files:
protocol.extension-field-suffix.test.ts: section 4b (the adopt door's__cjudge) removed;package-move-in.dogfood.test.ts"__c: …" pins it on the move door.protocol.object-registry-write-through-spelling.test.ts: caller 6 removed from the trace, the call-site count goes 10 → 9, and its stored-plural case is removed.protocol.view-expansion-reconcile-call-sites.test.ts: thereassignOrphanedMetadataroute row removed.protocol.view-container-reset-expansions.test.ts: readings A, B and control D (the adoption left overlays of packaged views where they were) removed, as the move door refuses thoseNOT_LOOSE; "the rebind moves the row's record" is kept and drives the rebind on the write-through directly, since the move door's undo rebinds the same way.protocol.platform-store-system-opt-in.test.ts: the adoption's opt-in check becomes the move door's phase-0 read (a dry run:find, noupdate).protocol-package-move-in.test.ts: two new cases, the platform record above and the three package-less spellings (null,'',sys_metadata) from the removed objectql lifecycle describe.protocol-package-lifecycle.test.ts(the adoption describe removed),protocol-packageless-overlay-migration.test.ts(cli + metadata-protocol:os migratemoves package-less overlay rows into <base>.custom as declared overrides — the migration ceremony only (the close is N-16b) #28413 now a move-door dry run: the shipped nameNOT_LOOSE, the environment rowwould_move), two comments.adopt-orphansrow amove-inrow with a body the strict schema admits.packages-write-actor-session.test.tsdrops its row with no replacement: the move body is strict, so anactorkey is refused 400 rather than ignored.package-duplicate-adopt-org-scope.integration.test.tskeeps its duplicate half and the measurement that a package-less save writes an env-wide row.adoptOrphansrows ofpackages-lifecycle.test.tsandreturn-type-precision.test.ts;unwrap-misfire.pin.test.tspinsMoveIntoPackageResponseSchemain place of the retired schema.package-lifecycle.test.ts.wall-environment-metadata-refusalandwall-package-doors-refusal(refusals and operator / single controls onmove-in, the controls as dry runs),authz-conformance.matrix.ts,package-first-authoring, and one new case inpackage-move-in.dogfood.test.ts: "the retired all-at-once door is gone: POST …/adopt-orphans answers 404 and moves nothing".scripts/engine-double-contract.pinned.json: the deleted owner-judges file's two rows.StudioPackageMenu-37139.test.tsx(five items, no adopt case, the shared-action list),PackagesPage.moduleDisable-28118,.readOnlyActions-13157,.installedAppsUpdates-34722.Verification
Local, on this branch, after a declaration build of
./packages/**and dogfood's dependencies:@objectstack/metadata-protocol@objectstack/objectql@objectstack/runtime@objectstack/client@objectstack/spec47bb4d28f, and the 128 tests of those files then passedapp.dogfood_adopt, which the id rule refuses). Fixed toapp.dogfood-adopt, andpackage-first-authoringthen passed 5 of 5pnpm --dir ui exec vitest run)check:generatedgen:strictness-ledger) in47bb4d28fDerived gates.
node scripts/pm/dispatch-gates.mjs --commandsderives 149 families for this tree. At47bb4d28f, 146 passed and 3 failed:migrate-meta-engine-guidance: the semantic entry's reason named a tracker id. It is gone (1852bb898), the registry was regenerated and spec and cli rebuilt, and the test passes 3 of 3.check:route-ledger-census: the ledger's generated census line said 158 rows. It says 157 now (--fix), and the check passes.check:test-source-alias: four converted tests reached a dynamic source import inside a case. Each has a module-top side-effect import now, and the check passes. The three runtime files pass 150 of 150 tests and the UI file passes 8 of 8.dispatch-gates --ran: 149 derived, 149 run, 0 NOT-MEASURED, 0 UNRUN.The metadata-protocol line, measured. The diff of
packages/spec/authorable-surface/api.jsonremoves exactly the fourapi/ReassignOrphanedMetadataResponse:*keys (reassigned,reassignedCount,success,targetPackageId) and adds nothing.check-adr-0087-registration.mjs --base origin/mainpasses with the changeset's marker naming the registered entry.Owed before landing
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz