Repository navigation
Description
repo:objectstack#3 · os-tesla · session_01L9qibzywxH36FPH6ayWMUe
Filing gate: ③ · Source: topic #37424 (ruling 7184753035, question 3 answered C, the maintainer's 「同意」 of 2026-11-26T06:44Z; ADR-0084 #amendment-2026-11-26-org, "Loose items stay where they are, and one door moves them"); #37468's fix shape, ruled in comment 7184767608. Phase order: the ruling fixes only "UI ask and kernel close in the same phase, kernel last". This card's middle slot, after #38149 and before the kernel-close card (filed after decisions Q-g is answered), comes from the takeover plan (#37424 comment 7216856007), not from a ruling. Sub-issue of #37424 (phase 4). Closes #37468, with PR-B: the ruling's "three regression tests, the old route and both menu entries removed" is complete only there. When this card is cut, the seat rewrites #37468's Blocked-by: line to name it (#37468 comment 7213077829).
Grade: area:ux · Feature · p2 · evidence: read on origin/main 815e882 and rechecked at 581ae76: none of the cited files moved between them, and they are unchanged since 7e4df28. The door, its judges, both UI entries and the ~org scope were read in code. #37468's three defects were measured by the #37453 probe at a46efa8, and the code they rest on is unchanged.
Reader: a seat card thread (seat repo:objectstack#3, zone o3-studio, with the package zone's files: packages/runtime, packages/metadata-protocol, packages/spec, packages/client).
- Build tier: the default judgment tier, for both PRs.
- Review tier: the contract-review tier, owed by surface (
scripts/pm/dispatch-gates.mjs:13260–13275). - PR-A widens the public surface: a new route, its request and response schemas, a dry-run form and an SDK method. By that rule, PR-A is spec-lane work "whichever seat found it". The seat hands PR-A to the spec lane, or records on the card why it builds PR-A itself. PR-A declares
Clause-②: yes (widening)and is reviewed at the contract-review tier, because it adds published schemas. - PR-B narrows the surface: it removes
POST /api/v1/packages/:id/adopt-orphans, the SDK methodpackages.adoptOrphans, and the published spec exportReassignOrphanedMetadataResponseSchema. PR-B is BREAKING and declaresClause-②: no (narrowing)with an ADR-0087 disposition. It owes one contract-review-tier review before the queue. - Declaration lines. The claim comment carries one
Clause-②:line (.claude/skills/pm-dispatch/SKILL.md:315), so each PR body carries its own line. The cleaner alternative is two cards: 4-2a (the widening) and 4-2b (the narrowing,Blocked-by4-2a), with the kernel-close card blocked by 4-2b. The seat picks one. - PR-A needs no maintainer word and can start now. PR-B waits for decisions Q-f, which the seat put back to the maintainer on 2026-11-28: if answered E, What 7 joins PR-B; otherwise What 7 drops and review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061 follows its own answer.
Dedupe: searched"move into package",adopt-orphans,reassignOrphanedMetadata,"loose items"(issues, open and closed). Hits: - packages: adopt-orphans skips the save door's judges — it adopts into an uninstalled package id, leaves an unprefixed object unsaveable (422 NAMESPACE_PREFIX), and moves flows and datasets only after a restart #37468, closed by this card;
- App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453, the census;
- packages: POST /packages/:id/adopt-orphans skips requireWritablePackage, so it can bind loose items into a read-only package #24813, metadata-protocol: the adopt-orphans door asks neither the namespace-prefix nor the owner judge (measure reach, then rule) #28776, metadata-protocol: the adopt-orphans door rebinds a package-less
x__cfield into a plain package without the__cjudge (#28564 follow-up) #28735, metadata-protocol: an adopt-orphans into a package rebinds a runtime object's row in storage, but the registry keeps the sys_metadata owner and the old definition until a restart (ADR-0070 D5) #23646, 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 and metadata platform record: follow-ups after #37130 (rollback-by-package edge, adoptOrphans, contract-review nits) #37604: earlier adopt-orphans patches, all closed; - Studio 重构后续:退役「软件包」开发视图(无 face 参数的 PackagesPage),动作只留在 Studio「⋯」菜单与「设置 > 软件包」 #37401 and App Studio 改版(2-2):完整版软件包概览页——「导出」成按钮、发布历史页签带还原、配对包按裁决、打开软件包统一落在概览(并入 #37687) #37958 (open): they touch the same Setup → Packages and overview ⋯ surfaces;
- review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061 (open): the cross-package Source badge, coupled to
~org(decisions Q-f).
None is a selection move door.
维护者速读
- 用户能看到什么变化:跨软件包的列表里多一个「散落项」筛选,可以勾选一个、几个或全部散落项,点「移入软件包」,选好软件包后一次移进去。移不进去的会逐条说明原因,例如对象名没有那个软件包的前缀。原来「一次全收」的「收编散落项」按钮,和 Studio 菜单里「组织的流程」入口,同时下线。设置的「软件包」页上会显示「有 N 个散落项」,点进去就能找到它们。
- 为什么:你裁定散落项原地保留,由一个按勾选来移动的入口负责移入;每一项都要过保存时的检查,整批一起判断引用关系。旧接口实测有三个缺陷:能收编进没安装的软件包;收编后对象存不了;流程和数据集要重启才换地址。这张卡用回归测试把它们关掉。
- 需要你做的:第一步(新入口)现在就开工,不需要你裁。第二步(删掉旧接口和「组织的流程」入口)要等你回答决策稿的 Q-f:选 E,这一步顺带把来源标签改对。这张卡同时新增一个公开接口、删掉一个旧接口(删接口属于破坏性变更),合并前两半都要合约审查;架构决定记录上的标注由你合并。
Ruled (not reopened)
- Ruling 7184753035, question 3 (C), verbatim: "Existing loose items stay where they are (ADR-0150 D1 bucket 4: environment-authored rows belong to the implicit environment package, no rename, no migration). One new "move into package" door takes a selection (one, several or all) and runs each item through the save door's judges, judging the selection as a set for the ADR-0150 D3 (a) cross-boundary rule; it reuses the existing list page.
adopt-orphansand the Studio~orgentry retire at once when it ships. This supersedes the parent's per-item sorting page (task 10) and the earlier one-shot-migration recommendation." - Same record: "packages: adopt-orphans skips the save door's judges — it adopts into an uninstalled package id, leaves an unprefixed object unsaveable (422 NAMESPACE_PREFIX), and moves flows and datasets only after a restart #37468's three defects close with that door (each a regression test);
reassignOrphanedMetadatais not patched." - packages: adopt-orphans skips the save door's judges — it adopts into an uninstalled package id, leaves an unprefixed object unsaveable (422 NAMESPACE_PREFIX), and moves flows and datasets only after a restart #37468 comment 7184767608: "This card closes with that door's PR (the three cases as regression tests, the old route and both menu entries removed); ⛔ do not patch
reassignOrphanedMetadatain place." - ADR-0084
#amendment-2026-11-26-org: "Where the new door is opened from is its card's to say." and "The ⋯ menu keeps "adopt loose items" until then, and loses it then." - 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424 task 10 and decision 12's sorting page are superseded by the ruling above. Not built.
Measured on main
The door that retires: adopt-orphans
- Route.
packages/runtime/src/domains/packages.ts:4026–4067.- Gates:
requireManageMetadata, the walled refusal, the knowledge-source gate, the no-query refusal,requireWritablePackage(4051). - The comment at 4042–4050 says it on purpose: "An id nothing installed is writable by the predicate's own rule, so it still reaches the protocol" (packages: adopt-orphans skips the save door's judges — it adopts into an uninstalled package id, leaves an unprefixed object unsaveable (422 NAMESPACE_PREFIX), and moves flows and datasets only after a restart #37468 A1).
- Mount:
dispatcher-plugin.ts:1704. Ledger:route-ledger.ts:590(disposition: 'sdk',packages.adoptOrphans). SDK:packages/client/src/index.ts:3621. - Spec:
ReassignOrphanedMetadataResponseSchema,packages/spec/src/api/package-lifecycle.zod.ts:370–378. It is a published export, listed inpackages/spec/{api-surface,json-schema.manifest,authorable-surface,declaration-map,export-origins}/api.json. - Protocol method:
protocol.ts:10687–10697.
- Gates:
- Body.
ProtocolPackageCommitsFacet.reassignOrphanedMetadata,protocol-package-commits.ts:917–1110.- It takes every package-less row, of every type, active and draft. Excluded: artifact overlays, the platform record, legacy organization-scoped rows (941–954).
- It judges the object owner, the permission-set owner (959–985) and
__c(990–1004). - It does not judge that the target is installed (A1), the namespace prefix (A2), or child K.
- It rebinds by a bare
engine.update(1030–1036). Write-through runs forviewandobjectonly (1049, A3).
- UI entries.
StudioPackageMenu.tsx:240–246.PackagesPage.tsx:1118–1132, 1363–1368 and 1580.packageActions.tsx:136–155and 195–232.- i18n
engine.packages.detail.adopt*(studio/en.ts:2155–2160,zh.ts:1949–1955). packages/qa/dogfood/test/authz-conformance.matrix.ts:281.
- Everything else that names the old door (grep
adopt-orphans|adoptOrphans|reassignOrphanedMetadata|packages_orphan_adoption, CHANGELOGs excluded):- the spec message key
packages_orphan_adoption_unsupported,packages/spec/src/system/operation-message.ts:511, 627, 759, 904(four locales; dead once the route goes); - docs:
content/docs/api/metadata-api.mdx(177),content/docs/permissions/system-context.mdx,content/docs/protocol/knowledge.mdx; scripts/engine-double-contract.pinned.json:440, 445;- about 35 test files, among them:
packages/client/src/{packages-lifecycle,return-type-precision}.test.ts;packages/metadata-protocol/src/protocol.adopt-orphans-*.test.tsand…reassign-orphans-durability…;packages/objectql/src/protocol-adopt-orphans-*.test.ts;packages/runtime/src/domains/packages-*.test.ts(adopt-orphans-readonly, capability-gate, …) andpackage-duplicate-adopt-org-scope.integration.test.ts;packages/spec/src/api/package-lifecycle.test.ts;- dogfood
package-first-authoring,wall-environment-metadata-refusal,wall-package-doors-refusal; - UI
PackagesPage.adoptLooseItems-13339,installedAppsUpdates-34722,moduleDisable-28118,readOnlyActions-13157,StudioPackageMenu-37139.
- the spec message key
The ~org entry that retires
- Scope module.
studio-design/studioScope.ts:STUDIO_ORG_SCOPE_SOURCE,isStudioOrgScope,studioOrgScopePath,isPackageLessItem,isPackageLessDraft,isOrgScopeDraft. The segment is atstudioAddress.ts:57. - Where it is drawn.
- Menu row:
studioMenuModel.ts:220, with 167 and 315. - Area:
StudioMetadataArea.tsx:444. - Redirects:
metadataArea.ts:249and 286–311,automationsPillarRedirect.ts:51,studioPillarRedirectModel.ts:89,studioSurfaceScope.ts:55,ObjectActionsPanel.tsx:256. - Changes row:
StudioTopLeft.tsx:84. Batch publish:studioSurfacePublish.ts:149,StudioSurfaceFrame.tsx:248. - ADR-0084 names it at lines 234, 298, 414, 420, 456, 476, 505 and 507.
- Menu row:
- What it lists is not exactly "package-less".
allLegis true there (ResourceListPage.tsx:301). It is filtered?source=runtime, which its redirect forces.classifyProvenance(ResourceListPage.tsx:194–203) also files a.custompair item and a served overlay asruntime.- Through
studioListSource, that same classification is the Studio list's Source badge (review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061: a classifier change moves authored packages' flows into~org, measured in comment 7231630549). - The exact predicate is
isPackageLessItem.
- Where the cross-package list is reached today.
- The cross-package directory left the Studio menu (
studioMenuModel.ts:36–38, App Studio 改版(3-2):「全部软件包」目录 ~all 搬到设置的访问分组,Studio 不再有这个入口 #37565). - Setup's directory lists the access types only (
metadataAreaHost.ts:80). - So once
~orggoes, a flow's loose list is reached only from this card's Setup → Packages banner, or by address.
- The cross-package directory left the Studio menu (
The save door's judges
-
All of them are reached from
saveMetaItemUnaudited(protocol-save.ts:345):uninstalledNamedBaseRefusal(protocol-package-scope.ts:102,422 WRITABLE_PACKAGE_REQUIRED);isWritablePackageand the D1 block (protocol-save.ts:2108–2180);objectNamespacePrefixViolation(protocol-save-door-refusals.ts:967,422 NAMESPACE_PREFIX) andobjectNamespaceObjectNameClash(987, child K);classifyObjectContribution/overlayPackageMismatchError;permissionSetOwnerBindingRefusal(protocol-authoring-refusals.ts:203);judgeExtensionFieldSuffix,overrideWriteVerdictandpermissionSetNameCollisionRefusal;applyRegistryWriteThrough(protocol-save.ts:2409).
Whether one call can run them with no write is unverified. Today they run inline in the save.
-
ADR-0150 D3 (a), the set rule. A package caller never resolves a bare name to an environment item. App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453 §3 measured that after a partial move, a loose dataset answered
409 RESOURCE_CONFLICTto?callerPackage=of the moved package. Candidate readers:packages/lint/src/reference-integrity-suite.tsandpackages/cli/src/utils/stored-package-references.ts. Whether either runs over stored rows for one selection is unverified. -
What a move changes in addresses, as measured on the OLD door (App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453 §3):
_env/NAMEanswered409from the next boot, because the old door wrote through for view and object only;- the AI face name becomes
NS-NAME(packages/spec/src/ai/face-name.ts:86–91); - an unprefixed object can never move into a namespaced package and stays a legal loose item.
On the new door, which writes through for every type (What 3), the
_envaddress likely fails at once. This must be re-measured. -
No selection on the list page.
metadataListState.ts:52: the source filter isall | artifact | runtime. The cross-package leg lists every package's rows of a type (scopeListRows, 273–281).
Readings this card takes (no ruling needed, said so the reviewer can object)
-
Where the door is opened from (ADR-0084 gives this to the card).
- (1) On the cross-package list of any type: a new "Loose" source value, row checkboxes, select-all, and a selection bar "Move into package…".
- (2) A Setup → Packages banner, "N loose items", shown while N is above 0. It opens the cross-package directory with a loose count per type. It is decision 12's placement, kept for the door. With the directory off the Studio menu (item 8), this banner is the menu path to loose items.
- Not in the package ⋯ menu.
-
"All" means all loose items of one type: the filtered list's select-all. The server door takes a selection across types, so a flow and the dataset it reads can move together. A set refused under D3 (a) names the loose items it references, and the UI offers to add them. There is no one-click whole-environment move.
-
The package picker is App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149's ask: writable packages only, plus "create a new one".
-
The
~orgChanges row and its batch publish retire with the entry. ADR-0084:420 says the row "is drawn on~orgalone", and "No ruling gives this home: it was built first". Package-less drafts keep two publish paths:- Home's Publish all publishes every pending draft, package-less ones by reference (
ui/packages/app-shell/src/preview/usePublishAllDrafts.ts:14–18, "Package-less drafts fall back to by-reference publish … so they never dead-end"; 97–98; 144–165;HomePage.tsx:406, 428); - each item page's publish and discard (
ResourceEditPage.tsx:3317–3345).
(An earlier draft asked this as Q-c on a wrong premise. It is not a question.)
- Home's Publish all publishes every pending draft, package-less ones by reference (
What
Two PRs, merged back to back in one release, unless the seat rules one PR or two cards. Declarations allow at most one arm per PR.
Reading (not a ruling): the ruling retires the old door "at once when it ships". With two PRs, both doors exist on main between the merges, so PR-A must not ship in a release without PR-B.
PR-A, the new door (Clause-②: yes (widening), spec lane).
- Server door.
POST /api/v1/packages/:id/move-in. The spelling is the card's, and the route ledger, spec schemas and SDK method follow it. Body:{ items: [{ type, name, member? }] }.- Gates as
adopt-orphanshas them. - The target must be installed and writable, judged by the save door's own predicates (A1:
422 WRITABLE_PACKAGE_REQUIRED). - Only package-less items are movable, with today's exclusions. Any other item is refused per item.
- Gates as
- Judge, then write, all or nothing.
- Phase one runs the save door's judges (item 9) for PKG, never a copy of them. If they cannot answer without writing, factor them into one callable shared by both doors.
- Then the D3 (a) set rule: every bare-name reference resolves from PKG plus the selection.
- Any refusal refuses the whole call, with per-item codes, and nothing is written.
- Write. Rebind active and draft rows, then the save door's write-through for every type (A3). Record a package commit (unverified that
recordPackageCommittakes a move). - Answer and confirm. The answer lists the moved items, and per item what changed: the
_envaddress and the AI face name. The confirm step reads them from a judge-only call (?dryRun=trueor equivalent). Re-measure the_envwording on this door (item 11). Do not copy the old door's "stops resolving at the next boot". - UI.
- The "Loose" source value, filtered by
isPackageLessItemexactly, neverclassifyProvenance. - A checkbox column under that filter on the cross-package leg.
- The selection bar, the picker, the confirm, and per-item refusals.
- The Setup → Packages banner with per-type counts (a new read, or one list read per type; the card measures the cost).
- The "Loose" source value, filtered by
PR-B, the retirement (BREAKING, Clause-②: no (narrowing), ADR-0087 disposition).
6. Remove.
- The route, its mount and its ledger row.
packages.adoptOrphans,ReassignOrphanedMetadataResponseSchema(regenerate the five spec baselines in item 1), and the protocol method and facet body.- Both UI entries, the dialog and the i18n keys.
- The
packages_orphan_adoption_unsupportedmessage key, the three docs pages and the pinned-contract lines (item 4). - The
~orgscope: menu row, area mode, Changes row,isOrgScopeDraftpublish and redirects. Old/studio/~org/…URLs redirect to/studio/~all/metadata/flow?source=loose(the value's spelling is the card's).
- Source badge, if decisions Q-f is answered E (review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061). After the
~orgremoval above, change the Studio list's classification (studioKindOf,ResourceListPage.tsx:763–765) so an item of a writable authored package readsnew, using the listed manifests'writableflag.- This is the classifier change, not a badge-only change. The badge, the source filter (
sourceOf, 766–768) and prev/next (useListOrderedNames.ts:187) move together. - Setup's non-Studio list, which reads
row.source, is left alone. - Premise check: no non-test
source=runtimeaddress remains. Today all of them belong to~org:studioAddressTable.ts:108, 115,studioScope.ts:16–17, 42,metadataArea.ts:273,index.ts:635. - review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061 closes with PR-B.
- This is the classifier change, not a badge-only change. The badge, the source filter (
- Tests. Each removed assertion of item 4's test files names, in the PR, the test on the new door that pins the same assertion at the same or a closer layer (AGENTS.md). Assertions about the old door's own defects are replaced by the three regression tests.
- ADR marks (Tier H, so the maintainer merges).
- ADR-0084's lines that name
~org(item 6) lose it. - ADR-0070: a dated note that TL;DR item 5's "move these loose items into a base" (line 33) and D5's
offers "move into a base"(line 87) are this door. D5's "small migration … bulk-assign legacy orphans to a default base" is superseded by ruling 7184753035, and rows never moved stay legal (ADR-0150 D1 bucket 4).
- ADR-0084's lines that name
- Changeset. BREAKING, with FROM → TO:
packages.adoptOrphans(id)andReassignOrphanedMetadataResponseSchemabecome the move door with an explicit selection, plus its ADR-0087 disposition.Metadata-protocol: none.
Test fixtures and follow-ups
- Creating a loose item in tests. After the kernel-close card, no public door creates one. Tests that need a loose row, such as this card's regression and set tests, insert it directly through the engine with the system context, as
packages/qa/dogfood/test/flow-shipped-name-layered-read.dogfood.test.ts:204does (store.insert('sys_metadata', …, { context: SYSTEM_CTX })). This is a test fixture, not a fifth exemption. A test written against a public package-less create would go red when the kernel-close card lands, so write them on the fixture from the start. - QA checklist drift.
docs/qa/platform-checklist/areasstill describes~org, "Organization flows" and package-less saves:studio-authoring.jsonin 16 places, plusautomation.json,access-security.jsonand others. Drift does not block a PR (docs/qa/platform-checklist/README.md:15), so the PR records one follow-up indocs/qa/platform-checklist/FOLLOW-UPS.md, or files a checklist-accuracy card.
Acceptance
- (PR-A) packages: adopt-orphans skips the save door's judges — it adopts into an uninstalled package id, leaves an unprefixed object unsaveable (422 NAMESPACE_PREFIX), and moves flows and datasets only after a restart #37468's three cases are regression tests through the new door, red on main's shape and green here:
- A1: a move into
com.probe.ghostanswers422 WRITABLE_PACKAGE_REQUIREDand stores nothing; - A2: a move of
probe_widgetinto namespacezetaanswers422 NAMESPACE_PREFIXand stores nothing; - A3: right after a move,
GET /automation/zeta/probe_loose_flowandGET /meta/dataset/probe_env_ds?callerPackage=com.probe.zetaanswer200, with no restart.
- A1: a move into
- (PR-A) A set test: a flow alone, when it reads a loose dataset, is refused naming the dataset. Both together succeed.
- (PR-A) One judge test per item-9 judge (child K, owner, permission-set owner,
__c), each refused with the save door's code. - (PR-A) A
.custompair item and a served overlay are not under "Loose", and the door refuses them. - (PR-A) The
_envaddress after a move is measured on the new door, and the confirm text says what was measured. - (PR-A, rechecked in PR-B) From the Setup → Packages banner, a person reaches a flow's Loose list in the UI, with no typed address. A package-less flow draft is published from Home's Publish all and from its item page.
- (PR-B, under Q-f E) On
/studio/~all/metadata/flow, the authored package's flow reads 新建 and a code-shipped flow still reads 系统自带. The Studio filter and prev/next agree with the badge. The test includes an ablation. - (PR-B)
adopt-orphansanswers404. The SDK method, the spec export and the protocol method are gone. These are green:pnpm check:api-surfacewith regenerated baselines, the route-ledger check, andType Check UI./studio/~org/…redirects. Every removed test assertion names its replacement. - (PR-A) A console walkthrough: filter, select, move, refusal, banner. Screenshots on the PR.
- A contract-review-tier review is recorded for PR-A (widening) and for PR-B (narrowing) before each merges.
- Sequencing: PR-A's server door, schemas and SDK method can be built while App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149 is open; PR-A's UI merges after App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149 (its picker is reused). Studio 重构后续:退役「软件包」开发视图(无 face 参数的 PackagesPage),动作只留在 Studio「⋯」菜单与「设置 > 软件包」 #37401, App Studio 改版(2-2):完整版软件包概览页——「导出」成按钮、发布历史页签带还原、配对包按裁决、打开软件包统一落在概览(并入 #37687) #37958 and task 8 also edit
PackagesPage.tsxandStudioPackageMenu.tsx, so merge main after whichever lands first.
Activity
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibyHmxFV4bTFZ5BKnUzAccount:
os-teslaBranch:
claude/project-thread-j4n4b0Worktree:
objectstack-issue-38150Domain:
runtimeArea:
o3-studio(area:ux p2, a seat card thread; topic #37424 phase 4, card 4-2). Seat 3 builds it: the card's "PR-A goes to the spec lane" wording is a script leftover (execution-duties.md:104), and no card moves.Seat:
repo:objectstack#3Seat rulings on the pre-claim report (
/mnt/project-files/card-38150/pre-claim-report-581ae76a.md, main 581ae76):publishPackageDraftsdoes (ADR-0067 D2). Each item goes through the save door into the target package, then the loose row is deleted, all in oneengine.transaction()with the undo path where the engine cannot roll back. The set rule runs first. A dry run takes the same path and always rolls back. The 2250-line save method is not split.collectReferenceHits(protocol-reference-hits.ts) walked in reverse, plusreference-sites.ts. Names resolve throughresolvePackageScopedNameoverPACKAGE_SCOPED_READ_TYPES.operation: 'apply', with the message naming the move. No new operation value.Blocked-by:already names this card (body patched, state 7234131457).File surface (PR-A1):
POST /api/v1/packages/:id/move-inwith body{ items: [{ type, name, member? }], dryRun?: boolean }. It keeps theadopt-orphansdoor's gates (requireManageMetadata, the wall refusal, the knowledge-source gate, no query params,requireWritablePackage) and adds the installed-target check throughuninstalledNamedBaseRefusal(422 WRITABLE_PACKAGE_REQUIRED).protocol-package-commits.ts(or its own facet file), the mount, a route-ledger row, request and answer schemas inpackages/spec/src/api/package-lifecycle.zod.ts, SDKpackages.moveIn, and the five regenerated spec baselines.__c);.custompair items and published overlays are refused as not loose; the_envaddress measured on the new door. Loose rows are inserted through the system context, asflow-shipped-name-layered-read.dogfood.test.ts:204does..changeset/*.md(patch).overlap-check.mjsbefore the first push. Studio 重构后续:退役「软件包」开发视图(无 face 参数的 PackagesPage),动作只留在 Studio「⋯」菜单与「设置 > 软件包」 #37401 and App Studio 改版(2-2):完整版软件包概览页——「导出」成按钮、发布历史页签带还原、配对包按裁决、打开软件包统一落在概览(并入 #37687) #37958 touch PR-A2's files only.Stop on breach and explain in the report.
Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate" (package-lifecycle.zod.ts reads Clause ② SUSPECT),effort: high, reason: the thread session serves effort highWrites: the PR only through the relay
pr_create; comments, labels and bodies only through the relay write tools; report both numbers.Clause-②: yes (widening)
Metadata-protocol: none
Responsibility: an admin moves loose metadata into an installed writable package through one door that runs the save door's own checks. The move is all-or-nothing, writes history, and is readable at once without a restart. A dry run shows the same answer without writing. PR-A1 owes a contract-review L2 (packages/spec/src/api).
Thread-read: none
Premise: holds, spot-checked on origin/main 581ae76; the two "not verified" items are measured in the report
Serial constraints cleared:
#38149 (zone, claim 7234141707) touches PR-A2's files only; PR-A1 does not overlap itwip(runtime): POST /packages/:id/move-in, its ledger row and SDK meth…
wip(metadata-protocol): objects move outside the transaction with an …
wip: spec baselines, schema and SDK tests, changeset (#38150)
fix(metadata-protocol): keep protocol.ts at its line ceiling; route-l…
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment (protocol declaration and changeset grade), for claim 7234216673, PR-A1 #38185.
Metadata-protocol: nonebecomesMetadata-protocol: added: the five MoveIntoPackage* request/response schemas enter thepackages/spec/authorable-surface/api.jsonshard, andcheck-changeset-no-majorrefusesnonewhen an authorable-surface shard moves. No metadata key an author writes is added. The changeset grades@objectstack/specminor(the others staypatch). Precedent:.changeset/pre/35928-record-update-starts-read.md(new@objectstack/spec/apiroute schemas,added, spec minor).Clause-②: yes (widening)is unchanged; the contract-review L2 owed before the queue reads this line.fix(spec): register the move-in door's three codes in the error-code …
test(spec): the domain-501 sentence census counts packages_move_in_un…
2 remaining items
fix(metadata-protocol): record the move-in door's saveMetaItem among …
fix(metadata-protocol): no tracker id in the registry-question row's …
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyHmxFV4bTFZ5BKnUz
os-dev-report
{ "issue": 38150, "status": "done", "branch": "claude/project-thread-j4n4b0", "pr": "https://github.com/objectstack-ai/objectstack/pull/38185", "session": "session_01L9qibyHmxFV4bTFZ5BKnUz", "premise_still_valid": true, "summary": "PR-A1 of the claim (7234216673): POST /api/v1/packages/:id/move-in moves a selection of loose items into one package. Phase 0 judges every item with the save door's own predicates (uninstalled target, writable package, namespace prefix, namespace clash, object owner, __c) and the ADR-0150 D3 (a) set rule (REFERENCE_LEFT_BEHIND), writing nothing. Objects then move outside the transaction (SQLite DDL deadlocks inside one, measured) with an undo, and every other item and the package commit (operation: 'apply') run in one engine.transaction(). A refusal answers 422 with the first code in error.code and the whole answer in error.details; dryRun answers would_move. New: five MoveIntoPackage* spec schemas, client.packages.moveIn, message key packages_move_in_unsupported, three ledger codes (NOT_LOOSE, REFERENCE_LEFT_BEHIND, MOVE_FAILED). Changeset per the claim amendment Tesla confirmed 06:53Z: Metadata-protocol: added, @objectstack/spec minor, others patch. adopt-orphans is untouched (PR-B).", "tests": "packages/qa/dogfood/test/package-move-in.dogfood.test.ts (new): 14 passed at 650b2b0d (the later commits touch only a registry-question row). metadata-protocol full suite at 650b2b0d: Test Files 372 passed | 9 skipped, Tests 23605 passed. runtime test:repo at 0d9ab261: 4 files, 1519 passed. spec package-lifecycle.test.ts 68 passed; spec operation-message.test.ts 99 passed. client packages-lifecycle + return-type-precision 16 passed. Ablations via scripts/ablation-replace.mjs, each restored to blob == HEAD: set rule off -> 3 failed; ensureOverlayIndex before the transaction removed -> 6 failed (60 s timeouts, the measured deadlock); route 422 branch off -> 9 failed.", "gates": "dispatch-gates --ran at 3777fbcf: 124 derived, 124 run, 0 NOT-MEASURED, every one exit 0 (after a package build closure and fetching the teardown-shape pinned commit, which cleared three exit-3 prerequisite gates on an earlier pass). Earlier CI reds, each fixed on the branch: route-ledger census (a976ac35), facade line ceiling 11705 (a976ac35), dispatcher error-code vocabulary (56df8b47), Check Changeset Metadata-protocol line (5ea8aadd), spec operation-message census 37->38 (4965c0c3), metadata-protocol write censuses (650b2b0d), runtime registry-question producers (0d9ab261), doc-authoring tracker id in prose (3777fbcf). Type Check · workspace on 650b2b0d was a runner shutdown (comment 7236097520). PR CI at 3777fbcf: 60 success, 10 skipped, 0 failed; mergeable clean (26 behind main, no conflict).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "read-only only — GitHub MCP actions_get, get_job_logs and issue_read (exact count not kept across a context compaction); no write tool", "api_writes": "0 direct REST writes (gh api used for GETs only). Relay writes: pr_create (#38185), issue_patch of the PR body x2, PR comments 7235332508 and 7236097520, and this os-dev-report comment via post-stamped", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }Generated by Claude Code
fix(metadata-protocol,runtime): the move-in door judges each item's t…
test(metadata-protocol): the projector and signal censuses count the …
docs(permissions),test(metadata-protocol): the move-in door's system-…
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 2 (file surface) for PR-A1 #38185, after amendment 1 (7235221791). These paths come from the rework round 1 head
0d0078fc, which answers L2 FAIL 7236830081 (M1, M2, S1–S4). Each one is forced by a census gate:content/docs/permissions/system-context.mdx(~46, ~55), which names the move-in door. The registry it feeds is regenerated, because the route adds threeisSystemreads.import '@objectstack/lint', whichcheck:test-source-aliasrequires.f19350b4: one conflict. Main moved the knowledge-service lookup intoresolveKnowledgeServiceForSave, so the move-in admission now uses it too.Clause-② and Metadata-protocol stand as amended in amendment 1. The L2 delta at
CONTRACT_REVIEW_TIERand the L1-b delta are owed at0d0078fc.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwsYQqi3TBx2SFE978
L1-b (zone o3-studio) · 2026-11-28T11:49Z
ACCEPT → PR #38185 comment 7238803353 (L1-b delta, head
0d0078fc; L2 delta PASS 7238780160). The seat owes its word on the dry-run ruling (phase 0 only) before landing.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 3 (seat re-ruling) to claim 7234216673, PR-A1 #38185 head
0d0078fc. The claim ruled that "a dry run takes the same path and always rolls back". The rework round answered M2 with the other fix shape the first L2 record offered: a dry run is phase 0 only and calls no gate. Its published text says so (L2 delta PASS 7238780160, L1-b delta ACCEPT 7238803353).Re-ruled: phase 0 only is accepted. A dry run that writes nothing cannot leave a half-moved state behind, which is the risk the original ruling guarded against.
Accepted cost (N7): a dry run does not ask the permission-set owner judge, so it can answer
would_movefor a set that the real move then refuses, cleanly and whole. This is carried by a follow-up card, which will have the dry run ask that judge read-only, so PR-A1 does not change again.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment 4 (PR-B split and PR-B1 surface) to claim 7234216673. PR-A1 #38185 merged at 12:59Z.
~org, the?source=looseredirects, the Q-f E classifier (review follow-ups of PR #37949: App Studio 跨软件包列表里,自建软件包自己建的项显示成「系统自带」 #38061) and the ADR marks. PR-A2 waits on App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149./mnt/project-files/card-38150/pr-b1-file-surface.md(base main c091d28, branchclaude/project-thread-j4n4b0). That covers the eight old-door test files, the route/mount/ledger row, the protocol method and facet body (releaseAdoptedObjectOwneronly if nothing else uses it),packages.adoptOrphans,ReassignOrphanedMetadataResponseSchema, the message key in four locales, the baselines and generated docs, the census/gate tests that name the door, the engine-double rows, three hand docs, the console entries with their dialog, helpers, i18n keys and four UI tests, and one new dogfood pin that adopt-orphans answers 404. Anything else is a breach to report.18.*migration entries and the release-owned v18 pages.POST /packages/:id/move-in).!breaking,Clause-②: no (narrowing), which owes one CONTRACT_REVIEW_TIER review before the queue. ADR-0087 disposition entries are required.@objectstack/specmajor in pre mode.Metadata-protocolisremovedif Check Changeset reads the api authorable-surface shard as moved (the schema leaves it), otherwisenone. Measure it before the first push and say which in the PR. A dogfood battery opening with the landing head is owed.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T20:47Z · Progress record, in answer to triage#1's progress request (mailbox #37784, 7245529471).
Part of #38150) and reports to the seat. After A2 merges, B1 re-opens as a new PR, as amended.feat(app-shell): select loose items on Studio's cross-package list an…
fix(app-shell): the move's confirm names the package by its name, and…
test(app-shell): the new loose-move tests pay the source's dynamic li…
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-29T04:11Z · PR #38389 (A2) hand-off stopped; the seat reports to the maintainer.
be8e0d5dc2168c88a975d9760787db6489fdbb85, with Contract review PASS 7250482456 (TIER_DEFAULT) and L1-a ACCEPT 7250478433 at the same head.label-write.mjs --issue 38389 --handoffrefused:check-governed-merges --prreads the PR alone as NOT governed, so "nobody is owed a hand-off". Nothing was written.pm:awaiting-mergewith a separate label write. The session's permission classifier denied that. Nothing was written.