Repository navigation
feat(runtime)!: retire POST /packages/:id/adopt-orphans and its two console entries (#38150 PR-B1) - #38545
Conversation
…d move them into a package; the Packages page counts them (#38150 PR-A2) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
… the select column has a header (#38150 PR-A2) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
…-j4n4b0 # Conflicts: # ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx # ui/packages/app-shell/src/views/metadata-admin/metadataListState.ts
…nt load at collection (#38150 PR-A2) Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
…t a clickable span The click-without-keyboard census counts a span with an onClick as a new clickable non-control. The guard now sits on the checkbox, a real button. Claude-Session: https://claude.ai/code/session_01L9qibyHmxFV4bTFZ5BKnUz Co-authored-by: Claude <noreply@anthropic.com>
…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>
… confirm does; changeset names where the console's move door is (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
…tired def (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
# Conflicts: # ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.looseMove-38150.test.tsx # ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx
…dopt row retired (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 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 — 191 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 2624194a8479c5f98f1d40e389f36e61e0f0b72d && git checkout 2624194a8479c5f98f1d40e389f36e61e0f0b72d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d08d2ae97277d8851672b15d4213da9c15bf1275 37aae5aa1758d099370bff305aa8bca38875d333 && git checkout -B drift-repro d08d2ae97277d8851672b15d4213da9c15bf1275 && git merge --no-ff 37aae5aa1758d099370bff305aa8bca38875d333
node scripts/docs-audit/affected-docs.mjs --json d08d2ae97277d8851672b15d4213da9c15bf1275
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pc3eJbLUEYRBLjxn5 Recorded 2026-11-29T09:03Z by the #38150 card thread from its isolated contract-review sub-agent (round 1, read-only). Contract reviewServed-tier: Read: card #38150 body and all 13 comments, PR #38545 body and its 78-file list, ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentSecurity. Scoped files, against the tree.
Findings. M1 (must-fix) — the #28414 attribution rule is unpinned on the door that replaces the removed one.
M2 (must-fix) — the #23690 rule (a loose draft moved into a package stays a draft and is not served) is unpinned.
S1 (should-fix) — N1 (nit) — comments that still name the removed entry or helper as live:
N2 (nit) — the PR table says the route tables pin "the door's gates and their order". They pin each gate. The deleted A delta review at the head that answers M1 and M2 can pass on those two and on CI's pending jobs concluding success; nothing else here blocks. Implemented-by: VERDICT: FAIL |
…refuses a body actor; the attribution docblock says so (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
…stays a draft and is not served, through the move door (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
…pt entry as live (#38150 PR-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
…-B1) Claude-Session: https://claude.ai/code/session_01FEkQ5pc3eJbLUEYRBLjxn5 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pc3eJbLUEYRBLjxn5 2026-11-29T10:21Z · Generated by Claude Code |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pc3eJbLUEYRBLjxn5 Recorded 2026-11-29T10:28Z by the #38150 card thread from a fresh isolated contract-review sub-agent (delta round, read-only). Contract reviewServed-tier: Delta round of record 7253515297 (FAIL at Read: card #38150 body and all 16 comments (the delta os-dev-report 7254354651 among them), PR #38545 body and file list, ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentSecurity. M1: closed.
M2: closed.
S1: closed.
N1 (nit) — narrowed. The three in-diff comments are fixed ( N2 (nit) — stands. The PR table still answers "the door's gates and their order" with rows that pin each gate, not the order. N3 (nit) — new, not this PR's to fix. The facet's hand-on of No must-fix, no should-fix. This PASS is the contract judgment and the confirmation of the deliberate correction. It does not stand in for the 23 jobs still running, the dogfood battery from the landing head, the maintainer's Tier H approval, or the same-version rule with B2. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pc3eJbLUEYRBLjxn5 2026-11-29T11:10Z · Final head for review:
Generated by Claude Code |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — ACCEPT · L1-b · area o5-ux · Head-sha
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr 维护者速读
席位意见:同意合并(按上面的顺序落地)。 席位核对 — ACCEPT · repo:objectstack#5 · Head-sha
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr Approval requested (Tier H: narrowing,
|
Requested by Leehom · project thread
Part of #38150. This is PR-B1: the server retirement of
adopt-orphansand the two console entries that called it. It replaces closed draft #38364, whose four commits are cherry-picked here onto main after PR-A2 (#38389, merged asea82c96212), plus the conflict resolution, the re-measured generated outputs and A2's L1 nit N1. PR-B2 (Studio~org, the redirects to?source=loose, the classifier #38061, the ADR marks) follows. This PR does not close the card.Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none (no file under
skills/**or.claude/skills/**namesadopt-orphans,adoptOrphansor "Adopt loose items"; searched at37aae5aa1)Size: 3,387 lines (additions + deletions, generated files included: 586 added, 2,801 deleted, 79 files;
git diff --numstat origin/main...HEADat37aae5aa1, merge basedccf836a8). With A1's 1,947 and A2's 1,380 the card stands at 6,714. This PR alone passes 3,000, so it is Tier H.Metadata-protocol, measured on this head.
packages/spec/authorable-surface/api.jsonloses exactly the fourapi/ReassignOrphanedMetadataResponse:*keys (reassigned,reassignedCount,success,targetPackageId) and gains nothing, so the shard moves and the line isnarrowed(the closed vocabulary has noremoved).authorable-surface.base.jsonis untouched: onlygen:authorable-surface-basewrites it.维护者速读
Deliberate correction
One pending release note, not added by this PR, was made false by it and is corrected in the same stroke:
.changeset/37958-studio-overview-full.md, line 16.check-empty-changesetstays red on it by design (DELIBERATE CORRECTION class); the dispatching seat confirms it by its own record, and the file is not restored.What changes
Runtime. The attribution docblock above
resolvePackageWriteActorno longer says a bodyactoris ignored onmove-in: there the strict body refuses it 400 and nothing moves (comment only). ThePOST /packages/:id/adopt-orphansblock leavespackages/runtime/src/domains/packages.ts, with its mount indispatcher-plugin.ts, its row inroute-ledger.ts(the census line goes to 157 rows), andreassignOrphanedMetadataon the protocol handle type. 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. Comments that 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(retired-defs/19.api__ReassignOrphanedMetadataResponse.ts); its manifest line and shard keys are removed;api-surface,declaration-map,export-originsand the reference docs are regenerated on this base (the reference index now counts 1,741 schemas, 528 in API; main moved the per-module reference page topackages/spec/docs/references/api/package-lifecycle.md).packages_orphan_adoption_unsupportedleavesoperation-message.ts(four locales). The ADR-0087 disposition is the registered semantic entry19.packages-adopt-orphans-door-retired.ts.Console. The Packages page's development face loses the "Adopt loose items" button, its dialog, handler and state (
PackagesPage.tsx); A2's loose-items banner stays as merged. Studio's 「⋯」 menu loses itsadoptitem: on this base (after objectstack#37958 moved Export and the revert to the overview page)STUDIO_PACKAGE_MENU_ITEMSis three items,edit,duplicate,manage. With the adoption gone the menu changes nothing a package holds, so itsonChangedprop and itsrunhelper go too, andStudioDesignSurfaceno longer passesonChangedto it (onPackageChangedstill feeds the overview page).packageActions.tsxlosesadoptLooseItems,adoptedTextandAdoptLooseItemsDialog;@object-ui/i18n's studio namespace loses the sixengine.packages.detail.adopt*keys in en and zh. A2'sengine.looseMove.*keys are untouched.N1 (A2's L1 nit). The move-in success toast filled
{package}withanswer.targetPackageIdwhile the confirm title used the package name.ResourceListPage.tsxnow passes the label the dialog was opened on (looseMove.target.label), which is already the id when the package list could not be read.Docs.
content/docs/api/metadata-api.mdx,protocol/knowledge.mdxand the system-context register's row 55b namemove-inwhere they listedadopt-orphans. Left as history: the three spec18.*semantic entries,content/docs/releases/v18/*, the consumed.changeset/pre/*entries, and the historical sentence inhttp-dispatcher.ts.Changeset.
38150-adopt-orphans-door-retired.md, BREAKING with the FROM → TO table and the one-line fix:@objectstack/specmajor (pre mode), metadata-protocol, runtime, client,@object-ui/app-shelland@object-ui/i18npatch. One sentence changed from #38364: the console's move door is now named as "the move-in confirm step on Studio's cross-package list (?source=loose), which ships in the same release" (A2 landed first, so "the next change" was no longer true).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: …"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.tsmoveIntoPackage:package-move-in.dogfood.test.ts(booted CRM stack) "#23690: a loose DRAFT view moves as the target's draft, and the registry serves nothing before or after", "#23690: a draft beside an active row of the same view: the active body is served at the target, never the draft" and "#23690: at the next boot the moved draft is still served nowhere, and the pair still serves its active body"; andprotocol-package-move-in.test.ts"a loose DRAFT moves as a draft: saved into the target in draft mode, never published, and answered states [draft]" and "a draft beside an active row: … states [active, draft]" (with an active-only control)objectql/…/protocol-adopt-orphans-object-registry.test.tspackage-move-in.dogfood.test.tsA3 and "whole or nothing", andpackage-first-authoring.dogfood.test.ts's D5 case, 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.tsxLooseMoveDialog-38150andResourceListPage.looseMove-38150pin the replacementEdited files, as in #38364 (metadata-protocol, objectql, runtime, client, spec, dogfood,
scripts/engine-double-contract.pinned.json), with these changes at this head:packages-write-actor-session.test.ts: itsadopt-orphansrow (a body naming another user, a body naming no one, a system context) is replaced by amove-indescribe: a signed-in caller's move, and its dry run, hand the protocol the session user asactor; CONTROL: a system context sends no actor; a bodyactor(another user, or the session user itself) answers 400Invalid move-in bodynaming the key, and the protocol is never called.StudioPackageMenu-37139.test.tsx: three items (edit,duplicate,manage) in en and zh-CN, not five; the read-only case greys Edit and Duplicate; the adopt action case and the adopt rows of the one-copy list are removed; the guard that no surface spells the/adopt-orphansdoor stays.StudioPackageOverview-37454.test.tsx(added on main by objectstack#37958 after feat(runtime)!: retire POST /packages/:id/adopt-orphans and its two console entries (#38150 PR-B1) #38364 was built): the menu pin lists three rows, no adopt row.ResourceListPage.looseMove-38150.test.tsx(N1): "the success toast names the package by its name, as the confirm title does", and its control "when the package list cannot be read the confirm and the toast both fall back to the id".package-move-in.dogfood.test.ts: "the retired all-at-once door is gone: POST …/adopt-orphans answers 404 and moves nothing", and the three metadata-protocol: an orphan adoption registers a package-less DRAFT view as live — reassignOrphanedMetadata's view write-through has no state gate, so the registry serves a draft the boot never registers (found by #23646) #23690 cases above.Comments that named the retired entry as live:
protocol.ts(the object-owner import line) andpackage-duplicate-adopt-org-scope.integration.test.ts(two docblocks).Acceptance notes
overlap-check.mjsat37aae5aa1: clean against main; one textual overlap with open fix(spec,studio): a record:quick_actions bar's location refusesrecord, and Studio stops offering it (#38045) #38541 incontent/docs/references/index.mdx(generated; whichever lands second regenerates it withgen:docs). The overlap with feat(approvals): the opening check's conditions are reported where a flow or an object is published (ADR-0162 item 7, slice N45) #38527 read at the previous head no longer shows.claude/project-thread-j4n4b0(A2's). This PR is onclaude/project-thread-pf8r6c, the branch the seat's dispatch for this thread named.Verification
Files to read first, by risk:
ui/packages/app-shell/src/views/studio-design/StudioPackageMenu.tsx: the conflict with objectstack#37958 resolved to three rows, withonChangedandrunremoved.1a.
packages/qa/dogfood/test/package-move-in.dogfood.test.ts: the metadata-protocol: an orphan adoption registers a package-less DRAFT view as live — reassignOrphanedMetadata's view write-through has no state gate, so the registry serves a draft the boot never registers (found by #23646) #23690 cases and their state fixture (draft rows inserted at the first boot).packages/runtime/src/domains/packages.tsandroute-ledger.ts: the route block and its ledger row.ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx: N1's label hunk.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioPackageMenu-37139.test.tsx packages/app-shell/src/views/metadata-admin/ResourceListPage.looseMove-38150.test.tsx. Expect both files to pass, and the menu case to list three items.Suites (local; the package suites ran on the tree before the A2 merge commit `6742ce449`, the spec suite again after it; UI and gates at the heads named)
@objectstack/clienttest@objectstack/spectest@objectstack/metadata-protocoltest@objectstack/objectqltest@objectstack/runtimetestui/packages/i18n(8 named files + the i18n dir)@object-ui/app-shellsuite at6742ce449StudioPackageOverview-37454"the ⋯ menu holds … adopt loose items …" (a main pin of the removed row). Fixed inc9c49d97e; that file andStudioPackageMenu-37139then 2 files, 71 tests passed@object-ui/app-shelland@object-ui/i18ntype-check@objectstack/spec check:generatedafter the A2 mergecheck-platform-checklist --changed-from origin/mainRound 1 (review FAIL at `c9c49d97e`, M1 and M2), at `448cffe6f` and `37aae5aa1`
packages-write-actor-session.test.ts+package-duplicate-adopt-org-scope.integration.test.ts: 2 files, 25 tests passed. Ablation (scripts/ablation-replace.mjs,resolvePackageWriteActor(_context)beforeprotocol.moveIntoPackagereplaced byundefined, anchor 1 → 0): "a signed-in caller's move hands the protocol the session user" and "so does a dry run" failed, 2 failed and 20 passed (the system-context control and the 400 cases green); restored, blob equals HEAD.protocol-package-move-in.test.ts: 11 passed.Type Check · workspacewas red at448cffe6fon this file's new draft case (TS2532 / TS2493 on the commit read);37aae5aa1types it, andpnpm --filter @objectstack/metadata-protocol run typecheck(itstsclists this file) and@objectstack/runtimetypecheck exit 0, the file 11 of 11. Ablation (mode: state === 'active' ? 'publish' : 'draft'→mode: 'publish'): both draft cases failed, 2 failed and 9 passed; restored, blob equals HEAD.package-move-in.dogfood.test.ts: 24 passed. Ablation of the same line on the built output (mutation held,@objectstack/metadata-protocolrebuilt,ablation-dist-preflight.mjsfound the marker indist/): all three metadata-protocol: an orphan adoption registers a package-less DRAFT view as live — reassignOrphanedMetadata's view write-through has no state gate, so the registry serves a draft the boot never registers (found by #23646) #23690 cases failed, 3 failed and 21 passed. Restored, rebuilt, preflight--absentclean, the file 24 of 24 again.dispatch-gates.mjs --commands PATHS): 78 families, 77 exit 0, andcheck-empty-changesetexit 1 on the DELIBERATE CORRECTION above (expected).--ran: "78 derived, 78 run, 0 NOT-MEASURED, 0 UNRUN".check-nul-bytes: exit 0.N1 ablation
scripts/ablation-replace.mjsreplacedlooseMove?.target.label ?? answer.targetPackageIdwithanswer.targetPackageId(anchor 1 → 0, blob90937804f355→ed3e458acb2a): "the success toast names the package by its name" failed (expected "vi.fn()" to be called with arguments: [ 'Moved into Alpha: 1.' ]), 1 failed and 8 passed, the control among the passing. Restored: blob equals HEAD,git diff HEADempty.Derived gates
node scripts/pm/dispatch-gates.mjs --commands(no paths, change set from the merge basedccf836a8): 149 families. All 149 exit 0. Five first answered 99 or 3 (two vitest families queued behind the app-shell suite;check:skill-examples,check:dual-build-cjs-loads,check:published-readme-exportsneededclient-react,studioandscenariosbuilt) and passed on the re-run after that build.--ran: "149 derived, 149 run, 0 NOT-MEASURED, 0 UNRUN". The commands re-derived atc9c49d97egive the same 149.Dogfood battery
Full battery at head
448cffe6f,pnpm --filter @objectstack/dogfood testunder the verify lock (no shard, no path): lock VERDICT command-exit 0; Test Files 495 passed, 3 skipped (498); Tests 4,187 passed, 68 skipped (4,255); no failure.37aae5aa1after it changes one line of a metadata-protocol unit test's typing, which no dogfood file reaches. (The battery atc9c49d97e: 495 / 4,184 passed.)Owed before landing
🤖 Generated with Claude Code