Repository navigation
Description
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Filing gate: ③ · Source: topic #37424 — parent decision 11 says 「The ADR-0150 addressing risk of moving an item into a package is verified first」; the maintainer picked 「按推荐启动」 on the phase plan (2026-11-26 05:57Z), which starts this investigation today. Sub-issue of #37424 (phase 4, first step).
Grade: area:ux · Task (investigation, no product change) · p2 (takes the parent's grade) · evidence: the area evaluation's reading that the kernel still accepts package-less saves.
Reader: area ux-37424 (seat repo:objectstack#5), an os-dev subagent; its report feeds questions 2 and 3 on #37424 (a fable analysis, then the maintainer).
维护者速读
- 做什么:只读摸底,不改产品。回答三件事:① 示例应用和种子环境里有多少「散落项」(不属于任何软件包的元数据);② 今天哪些写入合法地不带软件包(逐个点名,将来内核收口时作为例外);③ 把一个散落项移进软件包,对 ADR-0150 的按包寻址有没有风险。
- 为什么:你要拍板「内核是否禁止无包新建」(问题 2)和「散落项怎么清」(问题 3),这两件都要先有实测数字,不能凭感觉。
- 需要你做的:无,结果出来我先让 fable 分析再找你。
Questions to answer, each with a reading
- Loose items: count package-less metadata rows per type in each
examples/*app boot and in a fresh seeded environment (the~orgentry's source), and how the existing adopt door (packages/runtime/src/domains/packages.ts~3718, ⋯ menu 「收编散落项」) handles them. - Package-less writers: every path that writes metadata with no package today — the protocol door (
packages/metadata-protocol/src/protocol-package-scope.ts~113–133 still offers "save … without naming a package"), the front end's silent fall-back (ui/packages/app-shell/src/views/runtime-metadata-persistence.ts, see 应用里「新建报表」保存时不带软件包,而新建视图会带上应用的包:两条路径对同一操作做法不一致 #37261), AI / MCP tools, seeds, migrations, imports. Name each and say whether it is legitimate (would need a named exemption) or should be closed. - ADR-0150: does moving a loose item into a package change how behavioural metadata is addressed (literal prefixes, references by name) — what breaks, with a reproduction or a code reading per case.
Acceptance
- A report (
premise_still_valid, readings with file:line, no PR, or a test-only probe PR if a measurement needs one) posted on this card. ⛔ No product code change.
Governing text: docs/adr/0070-package-first-authoring.md (D1, D3, D5, D6), docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md.
Activity
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Claim: PM loop round 1
Session:
session_01Utp6CbL6Nn3scsU8yvLyU4Account:
os-billBranch:
claude/issue-37453-package-less-census(only if a test-only probe needs a PR; the default deliverable is a report with no PR)Worktree:
objectstack-issue-37453Domain:
domain:serverSeat:
repo:objectstack#5Area: ux-37424
File surface: read-only across
packages/**,ui/packages/**,examples/**; a probe test file only if a measurement needs one, no product code (stop on breach; explain in the report)Container & model:
S,mode:subagent,model: default tier (dispatch-gates --tier: no path-derived mandate; default because the readings feed a maintainer decision),effort: high (reason: an investigation whose readings feed a maintainer decision; S size by lines, not by judgement)Clause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: none
Premise: holds — read at origin/main 7d50dc8 2026-11-26T06:12Z:
protocol-package-scope.tsstill offers a package-less save in its refusal text; the adopt door exists inpackages/runtime/src/domains/packages.ts.Serial constraints cleared: none — read-only; no open PR touches
protocol-package-scope.ts(all open PRs' file lists scanned, 0 hits).Pre-claim lane:
domain:server— the readings centre onpackages/metadata-protocolandpackages/runtime.Pre-claim deps: none — no
Blocked-by:.Prior rulings read: ADR-0070 D1/D3/D5/D6 (package-first authoring, no catch-all package, loose-item migration UI), ADR-0146 D3/D11 (paired
.custom, package-less overlay close), ADR-0150 (addressing); the dev reads those decisions before reporting.objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ux · domain:server · Task · priority:p2 ·
pm:dispatched· size M; rationale: a read-only investigation for topic #37424 (package-less items, legal package-less writes, ADR-0150 addressing risk) that feeds the maintainer's decisions 2 and 3. Grade follows the parent; already dispatched.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
os-dev-report
维护者速读
~org入口里的流程也是 0。散落项全部来自运行期的写入。os meta register命令。_env/名字这种地址重启后失效,AI 看到的工具名会变。只移一部分时,包里的项读不到留在外面的项。Premise
Holds, at
origin/maina46efa8c. The kernel accepts a package-less create, the front end falls back to package-less, and the adopt door is atpackages/runtime/src/domains/packages.ts:3721. The refusal text atpackages/metadata-protocol/src/protocol-package-scope.ts:112-133still prescribes "save … without naming a package" and "or with no package".How it was measured: a local probe (
vitest, not committed, no PR) that boots each example through@objectstack/verify'sbootStack, which composes whatobjectstack servecomposes and loads seeds. The showcase boot loggedSeed loading complete {"inserted":141,…}. The probe drove the HTTP doors as the dev admin and readsys_metadatawith the system context.1. Loose items: counts, and how the adopt door handles them
Stored package-less rows after a fresh seeded boot. A row counts when
package_idis null,''orsys_metadata.sys_metadatarows (all)_packageIddatasource/default(1 of 2)datasource/default(1 of 3)datasource/default(1 of 1)datasource/default(1 of 1)datasource/default(1 of 1)sys_metadatarow at all, so no row has a_provenance: 'platform'mark either. The probe walked 34 to 38 listed types per boot withGET /meta/:type. The only served item with no package was the host'sdefaultdatasource, which is registered at boot and is not a stored row. Thepackagelist's own entries carry no_packageIdand are excluded.~orgentry is 0 on every example. It lists flows only, filtered?source=runtime(ui/packages/app-shell/src/views/studio-design/studioScope.ts:111,isPackageLessItem). Note that the generic list'sclassifyProvenance(ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx:189-198) also files a.custompair item and a servedoverlaysource asruntime. So the "new / modified" filter is not the same set as "package-less".sys_metadata(carrier: cloud, or an operator).The adopt door (
POST /api/v1/packages/:id/adopt-orphans,packages/runtime/src/domains/packages.ts:3721-3750, bodypackages/metadata-protocol/src/protocol-package-commits.ts:872-1060). Studio's ⋯ menu entry 「收编散落项」 isui/packages/app-shell/src/views/studio-design/StudioPackageMenu.tsx:237-242, and Setup's isPackagesPage.tsx:1107.:896), except an overlay of an artifact item (isArtifactBacked) and a legacy organization-scoped row. No door moves one item, so the epic's "sort one by one, each with a suggested home" has no server door today. The confirmation text says as much: 「本系统中所有无软件包(散落)的元数据项都会移入此基座」.__creservation (:907-953).viewandobjectonly (:998). Every other type is rebound in storage and keeps its environment address until the next boot (finding A3).com.probe.zeta(namespacezeta) and the call answered200,reassignedCount: 4.2. Package-less writers today
Verdict key: close = should require a package (ADR-0070 D1/D3, epic decision 11). exempt = legitimate, so a kernel closure would need it named.
/metasave door, publish or draft, no?package, for a name no package holdspackages/metadata-protocol/src/protocol-save.ts:2088-2139(D1 only judges a non-nullpackageId: "AnullpackageId is still accepted here")PUT /meta/flow,/meta/object,/meta/datasetall answer200, "Saved dataset 'probe_env_ds' (env-wide, state=active)"POST /api/v1/automation,PUT /api/v1/automation/:namepackages/runtime/src/domains/automation.ts:2725-2760(registerAndSaveFlow: "No package, because no caller here holds one")~orgprotocol-save.ts:513-547(packagelessOverlayWriteRefusal); ADR-0146 D11 (merge question 10)persistObjectpackages/services/service-datasource/src/plugin.ts:321-334(ruling B, record 6660988968)_packageIdui/packages/app-shell/src/views/metadata-admin/datasource/DatasourceResourcePage.tsx:818createRuntimeMetadata/saveAndPublishRuntimeMetadata)ui/packages/app-shell/src/views/runtime-metadata-persistence.ts:206-221, 474, 631; callersObjectDataPage.tsx:810,objectViewViewCrud.tsx:220,271,objectViewViewSharing.ts:86,setup/publicForms.ts:334onSavedOutsideApp); outside an app the fallback is silent. Any non-view type passed in never resolves a package (const app = type === 'view' ? …)ui/packages/app-shell/src/views/ReportNewPage.tsx:151-163(#37261 landed)create-app(the "no apps configured" CTA)ui/packages/plugin-designer/src/pages/CreateAppPage.tsx:62, routedui/packages/app-shell/src/console/AppContent.tsx:199,1533,1726appsaved with no package. An app is a package's container (ADR-0048 §3.1)newAppDoor.ts:66creates the package first)MetadataService.putMetadataItem/saveObject, plugin-designer object pagesui/packages/app-shell/src/services/MetadataService.ts:688,830;ui/packages/plugin-designer/src/MetadataObjectsPage.tsx:324,MetadataFieldsPage.tsx:981ui/packages/data-objectstack/src/index.ts:6845(view),:7472(dashboard)os meta registerwithout--packagepackages/cli/src/commands/meta/register.ts:328--package), or exempt as an operator tool, by rulingos migrate meta --storedpackages/services/service-automation/src/flow-credential-migration.ts:222(keeps the row's own binding, null included);protocol-save.ts:2505(migrateStoredMetadata)MetadataManager.register(…, { origin: 'platform' })packages/metadata/src/metadata-manager.ts:1442; ADR-0150 note of 2026-11-24sys)create_object,add_fieldare platform tool names (packages/spec/src/system/constants/platform-tool-names.ts:94-98) implemented in cloudservice-ai-studiostageDraftNot writers:
seed-loader.tshas nosys_metadatawrite, and the seeded boots measured 0 rows.importUnmanagedPackage,duplicatePackageand the flow clone (Flow clone door → "new similar": the copy lands in a writable target package, by default the paired <base>.custom, never package-less #28149,packages/runtime/src/flow-clone.ts:13-18) all land in a package.Package-less AI drafts against the #36510 rule. That rule keeps draft plus whole-package publish for AI only. Whole-package publish is
POST /packages/:id/publish-drafts(packages/runtime/src/domains/packages.ts:3009), so a draft bound to no package has no whole-package publish. Two doors remain:POST /meta/:type/:name/publish;~orgscope, which reviews package-less flow drafts only (studioScope.ts:130-132,isOrgScopeDraft).So a package-less AI draft of any other type is listed in the drafts feed, but no surface publishes it as a batch. This is a code reading only; the AI side is carrier: cloud.
3. ADR-0150 addressing when a loose item moves into a package
Measured on the showcase through the adopt door into
com.probe.zeta(namespacezeta), then a restart on one database file (BootOptions.databaseFile)._envaddressGET /automation/_env/probe_loose_flow_envsegment; a package item does not. Any stored or shared_env/NAMEURL (automation,/meta/:type/_env/NAME,/actions/_env/…) stops resolving at the next bootGET /automation/zeta/probe_loose_flowGET /automation/probe_loose_flowand bare trigger409once a second package holds the nameGET /meta/dataset/probe_env_ds?callerPackage=com.probe.zeta_env/zeta/ bareprobe_env_ds2?callerPackage=…)probe_widget?package=or bare, answers 422 NAMESPACE_PREFIX (A2). A prefixed object (zeta_gadget) re-saves 200. The data door keeps serving (GET /data/probe_widget200)NAMEzeta-NAMEpackages/spec/src/ai/face-name.ts:86-91(code reading). An MCP client or prompt holding the old face name loses itstatusboth before and after; the ledger (R4) is untouchedsys_user_permission_set, R1)permission_set_packagepackages/core/src/security/stale-grant-beside-bound.ts:1-27): a null column resolves caller-less, environment item first, else the one holder. A set moved into P keeps its grants while P is the only holder of the name; a second holder makes it ambiguousWhat breaks, in summary:
_envURLs stop resolving at the next boot.Bare names, stored grants and the activation ledger are unaffected.
Defects found in passing (for the seat to file; not fixed here)
POST /api/v1/packages/com.probe.ghost/adopt-orphansanswers200,reassignedCount: 1, and the flow row now haspackage_id = com.probe.ghost.GET /packages/com.probe.ghostanswers404, and a later barePUT /meta/flow/probe_ghost_flowanswers422 WRITABLE_PACKAGE_REQUIRED(its stored rows are bound to a package that is not installed).uninstalledNamedBaseRefusal,protocol-package-scope.ts:102-139). The door's comment atpackages.ts:3733-3736admits an uninstalled id on purpose.422 NAMESPACE_PREFIX(repro above).viewandobjectonly (protocol-package-commits.ts:998)./automation/zeta/NAMEanswers 404 and?callerPackage=Panswers 409 right after a200adoption (repro above).Seam:
spec: ADR-0070 D5 adoption → runtime: protocol-package-commits.ts#reassignOrphanedMetadata(A1–A3).Dedupe words:
adopt-orphans uninstalled package,reassignOrphanedMetadata NAMESPACE_PREFIX,adopt-orphans registry write-through flow,package-less writer census.Report
{ "issue": 37453, "status": "done", "branch": "claude/issue-37453-package-less-census", "pr": null, "session": "session_01Utp6CbL6Nn3scsU8yvLyU4", "premise_still_valid": true, "summary": "Read-only census at origin/main a46efa8c; no PR, no commit, no product change. Q1: a fresh seeded boot of all five examples (showcase, crm, multi-package, todo, starter) stores 0 sys_metadata rows, so 0 package-less rows. The only item served with no package is the host's 'default' datasource, and the ~org entry lists 0 flows. The adopt door moves every package-less row of the environment at once, with no per-item door. Q2: 14 writer rows. 4 are exempt: the ruled external-datasource import, kernel-item overlays pending the platform-pair whitelist, binding-preserving migrations, and platform registration. The rest should close: the kernel /meta save with no package, the automation definition doors, the front-end view/report fallbacks, the Setup datasource sync, console create-app, MetadataService/plugin-designer object saves, the data-adapter upserts, and os meta register. AI is carrier: cloud, and a package-less AI draft has no whole-package publish. Q3, measured: after the next boot every _env address answers 409 while bare names keep resolving; AI face names change to NS-NAME; a partial move is refused across the boundary (D3 (a), measured on the dataset caller arm); an unprefixed object becomes unsaveable (422 NAMESPACE_PREFIX). Stored grants and the activation ledger are unaffected. Three adopt-door defects A1-A3 are reported for the seat to file.", "tests": "Local probe, uncommitted (packages/qa/dogfood/test/zz-probe-37453-loose-census.dogfood.test.ts, copy kept at the scratchpad probe.test.ts.txt), run under the verify lock: `pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=1 test/zz-probe-37453-loose-census.dogfood.test.ts` → 'Test Files 1 passed (1) / Tests 7 passed (7)', VERDICT command-exit 0. The restart leg (`-t restart`) → 'Tests 1 passed | 7 skipped (8)', VERDICT command-exit 0. Readings (probe.json): every census:* totalRows 0, looseRows {}, servedNoPackage datasource/default only. adr0150:showcase: adoptZeta [200, reassignedCount 4]; after: flowZeta 404 'Flow probe_loose_flow not found in namespace zeta', flowEnv 200, datasetCallerPackageZeta 409 RESOURCE_CONFLICT, resaveUnprefixedObjectInPkg and resaveUnprefixedObjectBare 422 NAMESPACE_PREFIX, resavePrefixedObjectInPkg 200. adopt:ghost: adoptGhost [200, 1], rowsBoundToGhost [flow/probe_ghost_flow/active], ghostPackageRead 404, resaveFlowBare 422 WRITABLE_PACKAGE_REQUIRED. adopt:restart afterRestart: flowEnv 409, flowZeta 200, flowBare 200, datasetCallerPackageZeta 200, datasetEnv 409, leftBehindDatasetCallerPackageZeta 409 RESOURCE_CONFLICT; the env-flow toggle answers 409 'authored in this deployment', and no ledger row exists before or after. Build closure: `turbo run build --concurrency=2 --filter=@objectstack/dogfood^... (+example-todo, example-starter closures)` → 'Tasks: 76 successful, 76 total', VERDICT command-exit 0. No ablation: no tested behaviour changed.", "gates": "n/a: no diff, no commit, no PR. dispatch-gates was not derived (empty change set), and no CI check-runs exist.", "dogfood_battery": "n/a: no PR, no `!` title, no (narrowing) arm", "mcp_calls": "0", "api_writes": "1: POST repos/objectstack-ai/objectstack/issues/37453/comments (the report comment, via scripts/pm/post-stamped.mjs). Reads used gh api GET on issues 37453 (and its comments), 37424, 37261, 36510.", "open_questions": [ { "question": "When the kernel closes the package-less create (W1), which writers get a named exemption?", "options": [ "A: exempt W3 (kernel-item overlays until the whitelist), W4 (ruled datasource import), W12 (binding-preserving migrations) and W13 (platform registration), and close everything else including W11 os meta register", "B: as A, and also exempt W11 as an operator tool" ], "recommendation": "A, because os meta register can take --package like every other author door, and an exempt CLI door would recreate the orphan pile ADR-0070 D6 rejects. This is a maintainer decision for #37424 question 2; the seat forwards it." }, { "question": "Should adopt-orphans keep its all-or-nothing shape, now that decision 11 plans per-item sorting?", "options": [ "A: add a per-item move door that runs the save door's judges (installed base, NAMESPACE_PREFIX, child K, D3 (a) report of references left behind), and retire the all-or-nothing door", "B: keep the all-or-nothing door and only fix A1-A3" ], "recommendation": "A, because the measured D3 (a) refusal and the object prefix rule make a partial move need judging per item. Feeds #37424 question 3." } ], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: public HTTP door POST /api/v1/packages/com.probe.ghost/adopt-orphans answered 200 reassignedCount 1, the row is bound to a package GET /packages/com.probe.ghost answers 404, and the next bare PUT /meta/flow answers 422 WRITABLE_PACKAGE_REQUIRED · evidence: packages/runtime/src/domains/packages.ts:3733-3737 admits an uninstalled id; packages/metadata-protocol/src/protocol-package-commits.ts:872-1060 has no installed check; the save door's named-base rule is protocol-package-scope.ts:102-139 · Seam: spec:ADR-0070 D5 adoption → runtime:protocol-package-commits.ts#reassignOrphanedMetadata · dedupe words: adopt-orphans uninstalled package, reassignOrphanedMetadata named base, WRITABLE_PACKAGE_REQUIRED inherited binding", "class: a · reach: public HTTP door; adopting a package-less object probe_widget into namespace zeta answered 200, then PUT /meta/object/probe_widget, with ?package= or bare, answered 422 NAMESPACE_PREFIX · evidence: reassignOrphanedMetadata judges the owner, the permission set and __c but not objectNamespacePrefixViolation (protocol-save-door-refusals.ts:967) or child K · same family as the finding above (adopt skips the save door's judges): one guard closes both · dedupe words: adopt-orphans NAMESPACE_PREFIX, adopted object unsaveable", "class: a · reach: public HTTP door; right after a 200 adoption, GET /automation/zeta/probe_loose_flow answered 404 and GET /meta/dataset/probe_env_ds?callerPackage=com.probe.zeta answered 409, until a restart · evidence: protocol-package-commits.ts:998 registers only view and object · dedupe words: adopt-orphans registry write-through flow, adopted flow address stale until restart", "carrier: cloud · noted, not filed: the AI path (service-ai-studio create_object/add_field/stageDraft) and the loose-item count of a real deployed environment, which the examples cannot measure" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Close-out (2026-11-26T06:32Z): delivered. The investigation's readings are comment 7184476778 (area L1 read: premise holds, no PR, no product change, the three questions answered with file:line and measured probe readings; the adopt-door spot checks at
packages/runtime/src/domains/packages.ts~3725–3737 andprotocol-package-commits.ts~990–998 match).