Repository navigation
Description
repo:objectstack#3 · os-tesla · session_01L9qibzywxH36FPH6ayWMUe
Filing gate: ③ · Source: topic #37424 (ruling 7184753035, question 2 answered A, the maintainer's 「同意」 of 2026-11-26T06:44Z; ADR-0084 #amendment-2026-11-26-org, section from line 470, "A create with no package asks for one, and the kernel refuses it"; the writer census in #37453 comment 7184476778). Phase order as ruled: this kernel PR is last, in the same phase as the UI ask, with no flag. That the move door lands before it comes from the takeover plan (#37424 comment 7216856007). Sub-issue of #37424 (phase 4).
Grade: area:package · Feature · p2 · evidence: read on origin/main 815e882 and rechecked at 33a0d4f: of the cited files only mcp-authoring.ts moved (two comment edits), and its cited lines are corrected below. The rest are unchanged since 7e4df28. The kernel accepts a package-less create: #37453 measured it at a46efa8 as W1 (PUT /meta/flow, /meta/object and /meta/dataset all 200), and the code path is unchanged (lines below). The area is package, not the topic's ux, because every file this card edits is the package zone's server half: the save door and its refusals in packages/metadata-protocol, the automation definition doors in packages/runtime, os meta register in packages/cli, and a migration entry in packages/spec. #37468 was triaged area:package · domain:server for the same door family. No ui/ file changes here.
Reader: a seat card thread (seat repo:objectstack#3).
- Build tier: the default judgment tier.
- Review tier: one contract-review-tier review before the queue, because this card is a narrowing (
Clause-②: no (narrowing),Metadata-protocol: narrowed;scripts/pm/dispatch-gates.mjs:13270–13273). It also owes an ADR-0087 disposition. Its ADR marks (ADR-0070, and the ADR-0084:475 amendment the answers owe) are Tier H, so the maintainer merges. It carries decisions Q-a (A), Q-b (C), Q-d (A) and Q-g (C) as answered (see Ruled). Q-g C rests on a premise NOT MEASURED; What 3 measures it first, and if it fails the card stops and asks the maintainer before any write.
Blocked-by: App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149, App Studio 改版(4-2):散落项按勾选「移入软件包」——新入口逐项过保存检查、整批判引用;收编散落项接口和 Studio「组织的流程」同时下线(关 #37468) #38150
Dedupe: searched"package-less" create,writable_package_required,"os meta register" package,"sharing rules" ".custom",automation.create(issues, open and closed). Hits: - 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424, the topic;
- App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453, the census (closed);
- cli:
os meta deletedeclares no--package, so the reset door's409 RESOURCE_CONFLICTremedy (name one package) cannot be sent from the CLI, andos meta registercannot name the package a save writes into #23350,os meta register --package(closed); - cli: os meta register can save a draft, and os lint can judge one item #34777,
--mode draftneeds a package (closed); - metadata-protocol: while a package is disabled, the per-item publish and rollback doors still write a package-less row at a name only disabled packages hold #37608 and metadata-protocol: while every holder of a name is disabled, a write to its package-unbound customization still lands unseen — bare save, draft save, delete and draft discard must refuse with "enable the package first" #37499, package-less writes over disabled holders (closed);
- 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,os migratemoves package-less overlays into the pair (closed); - plugin-security: the permission-set projection and the position write-through delete metadata by name with no package — after #23165 a name two packages hold answers 409, and
storedRowPackageArg(#21861) is redundant #23292 and automation door: a flow name two packages hold answers409with "on the REST door add ?package=", but/automationreads no?package=, so a caller who follows the remedy gets the same409again #23501, the automation doors' no-package rule and its remedy (closed).
None closes the package-less create.
维护者速读
- 用户能看到什么变化:任何入口(接口、命令行、自动化接口)要新建一个不属于任何软件包的配置时,服务端直接拒绝,并列出可以写进去的软件包。已经存在的散落项照常可以原地保存。只有四类写入照旧:系统自带内容上的定制、外部数据源导入、迁移、平台自己的注册。
- 为什么:界面先问软件包、移入入口先上线,这张卡最后把服务端的口子关上,以后不再产生新的散落项。
- 需要你做的:开工前不需要你裁,你 11 月 28 日已经答了 Q-a、Q-b、Q-d、Q-g。Q-g 选的「下线自动化接口的新建」有个前提要先实测:通用的元数据接口存流程时,是否同样当场注册、立即能跑、报同样的错。实测不过,施工就停,先回来问你。Q-d 的答案要更正架构决定记录里你 11 月 26 日写的「共享规则等绑定到所属对象的定制包」那句,这条更正和其他标注都由你合并。这张卡是破坏性收紧,合并前要合约审查。
Ruled (not reopened)
- Ruling 7184753035, question 2 (A), verbatim: "When the kernel closes package-less creates (ADR-0070 D1), only four writers keep a named exemption: kernel-item overlays until the platform-pair whitelist (W3), the ruled external-datasource import (W4, server-stamped
writeFace: 'external-import'), binding-preserving migrations (W12) and platform registration (W13). Everything else closes,os meta registerincluded (it takes--packagelike every author door). The UI ask (create with no package asks to pick or create one) and the kernel close ship in the same phase, the kernel PR last, no flag." - Same record: "Sibling rulings carried with it: in-place saves of existing loose rows stay open; organization-authored sharing rules, queues and assignment rules in Setup bind to the owning object's
.custompackage, with no new exemption (their write path is to be traced when the card is cut)." - The maintainer in the project thread, verbatim: 「一、不开工作区定制包,「没地方放」的情形怎么处理,就按照你的方案」. The plan it approves sets decisions
Q-aA,Q-bC andQ-dA. The seat recorded it on 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424 (comment 7234139193). - The maintainer on the seat's Q-f / Q-g card, verbatim: 「两条都按建议」, so
Q-gC (retire the create half of the automation doors, on the premise above). Recorded on 专题:App Studio 改版(Studio 是开发软件包的入口:左右两栏、软件包切换和概览页、列表页按前端样式、专用色和新名字) #37424 (comment 7234518908). - The platform customization pair and the kernel whitelist raised under Q-b are held as 专题:平台定制包和内核白名单(系统应用里新建的共用视图、报表有处可放;「用户」「组织」可以加自定义字段、表单和布局)(暂停) #38172. Q-b C stands for this phase.
- ADR-0084
#amendment-2026-11-26-org(474: no default catch-all; 475: the exemptions): "Four writers keep a named exemption, and no other …os meta registeris closed with the rest. … Saving a loose row that already exists, in place, stays open." And: "ADR-0070 is not edited by this amendment. Where the ruling restates its D1 and D5, the phase-4 cards that carry the ruling out owe that record its marks." - ADR-0070 D1: "A runtime create … MUST resolve to a writable
package_id. The kernel write path is the enforcement point of last resort". And: "null/sys_metadata-scope ceases to be a write destination for new items."
Measured on main
The kernel's create path today
ProtocolSaveFacet.saveMetaItemUnaudited(packages/metadata-protocol/src/protocol-save.ts:345).- D1 (2108–2180) judges only a named package:
intent === 'runtime-only' && request.packageId != null && !host.isWritablePackage(...)(2171–2174). - The comment at 2129–2131: "A
nullpackageId is still accepted here (legacy org-overlay destination); ADR-0070 D5 retires it once the surfaces always resolve a base and the orphan migration has run."
- D1 (2108–2180) judges only a named package:
- What already tells a create from an in-place save.
namedNoPackage(813).packagelessAddress(815–820;protocol-environment-rows.ts:181–205returns{ packageId, candidates, unbound }).- The draft address with
followedBase(938–975). artifactBacked/intent(2102–2106).- So a create is: no package named, intent
runtime-only, no stored candidate, and no package-less row active or draft. Every other package-less save is in place, or it customizes a holder (ADR-0150 D4), and it is unchanged.
- Refusal text that still prescribes package-less.
protocol-package-scope.ts:113–115("…or with no package.") and 128–133 ("…or save the TYPE without naming a package.");packages/cli/src/commands/meta/register.ts:26–28("or omit --package …");- the docs page
content/docs/api/metadata-api.mdx, which teaches a package-less save.
- A precedent shape for the refusal. The MCP draft door refuses a save naming no package and names the writable packages:
packages/runtime/src/domains/mcp-authoring.ts:109, 934–935, andpackageRequiredMessageat 1459.
The four exemptions, as main carries them
- W3, kernel-item overlays.
packagelessOverlayWriteRefusal(protocol-save.ts:515–547). An overlay is intentoverride-artifact(2104–2106), so a create-only close never reaches it. Pin it with a control test. Decisions Q-b answered C: a create in a system app does not count, and is refused. - W4, external import.
packages/services/service-datasource/src/plugin.ts:321–334(writeFaceat 329). It is server-stated, and no wire body is read into it (packages/spec/src/api/protocol.zod.ts:1313). - W12, binding-preserving migrations.
source: 'migrate-stored':migrateStoredMetadata(protocol-save.ts:2591) andflow-credential-migration.ts:222–229.sourceis not on the wire (protocol.zod.ts:1182–1189). Both re-save stored rows. The close exemptsrequest.source !== undefinedby name. - W13, platform registration.
MetadataManager.register(…, { origin: 'platform' })(packages/metadata/src/metadata-manager.ts:1340) writes the metadata service's own store. The close does not reach it. The census in Acceptance checks the otherregister()callers.
Writers the close starts refusing (from #37453, re-read)
- W1:
/meta/:type/:namePUT, publish and draft, naming no package, for a new name. - W2: the automation definition doors.
registerAndSaveFlow(packages/runtime/src/domains/automation.ts:2779), called byPOST /api/v1/automation(4335; ledgerroute-ledger.ts:605,automation.create) andPUT /api/v1/automation/:name(5448; ledger 668). "No package, because no caller here holds one" (2737).flowWriteRefusalalready rewrites the protocol's remedy (automation door: a flow name two packages hold answers409with "on the REST door add ?package=", but/automationreads no?package=, so a caller who follows the remedy gets the same409again #23501, 2749–2756). Their consumers are tests and QA steps: 7 dogfood files, runtime door tests, 17 QA checklist items, 7 hotcrm test files, and 3 docs pages (decisions Q-g).automation.createhas callers in SDK tests only. No UI, CLI or skill uses either door. The clone (4738) lands in a package already (Flow clone door → "new similar": the copy lands in a writable target package, by default the paired <base>.custom, never package-less #28149). What these doors become is decisions Q-g. - W11:
os meta register. It already takes--package(register.ts:260–268, cli:os meta deletedeclares no--package, so the reset door's409 RESOURCE_CONFLICTremedy (name one package) cannot be sent from the CLI, andos meta registercannot name the package a save writes into #23350), required only for--mode draft(116–119; 38–40). A publish-mode run naming none sends no package (328). - W5–W10: the UI writers, closed in the UI by App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149. This card is their backstop.
- AI drafts (cloud). No card of this phase changes that interface. This close refuses them only once cloud runs a framework release that carries it.
Organization-authored sharing rules, queues and assignment rules (the write path traced; decisions Q-d)
- Code-only metadata types.
packages/spec/src/kernel/metadata-plugin.zod.ts:1324(sharing_rule), 1334 (queue) and 1341 (assignment_rule) are allallowRuntimeCreate: false, allowEnvironmentOverlay: false. The comment at 1325–1333 says "A runtimesys_metadataitem is neither, so the type is code-only." Migration18.sharing-rule-runtime-create-withdrawnrecords the shipped tightening. So no.custombinding is possible through the metadata door. - The organization's own are data rows (regime C: ADR-0131 D6 note at 549; ADR-0142 D1 270–283 and D5 469).
- Setup opens object pages (
sharing-plugin.ts:748, 750, 752). - Writes go through the data door with
rule-hooks.ts,queue-hooks.tsandassignment-rule-hooks.ts, throughPOST /api/v1/sharing/rules, and through the clone dialog (SharingRuleCloneDialog.tsx:121). sys_queuehas no owning object (sys-queue.object.ts:8–10).sys_assignment_rulehas no package column.sys_sharing_rule.package_idis "Nothing reads it yet and no writer stamps it" for an organization's own rule (291–292, the comment's claim).- So the close never meets these rows.
- Setup opens object pages (
What
- The close, in
saveMetaItemUnaudited, beside D1.- What it refuses. A save that names no package, has intent
runtime-only, finds no stored candidate and no package-less row (item 2), and is not exempt. It is refused before anything is written. - The answer.
422,code: 'WRITABLE_PACKAGE_REQUIRED'(D1's code; a sibling code only with a stated reason),docs: 'docs/adr/0070-package-first-authoring.md'. Its sentence names the type and name, and lists the writable packages it may name, capped, aspackageRequiredMessagedoes. - Exempt by name.
- W4:
writeFace === 'external-import'; - W12:
source !== undefined; - W3: intent
override-artifact.
- W4:
- No other exemption: Q-a was answered A and Q-b C, so neither adds a type or a case.
- W13 is off this path, and a comment says so. No flag and no environment switch.
- What it refuses. A save that names no package, has intent
- Refusal text. Rewrite
protocol-package-scope.ts:113–115and 128–133 so no sentence prescribes saving with no package. Rewrite the D1 comment atprotocol-save.ts:2129–2131. Rewrite the package-less passage ofcontent/docs/api/metadata-api.mdx. - Automation definition doors, per decisions Q-g (answered C).
-
First, before any write, measure the premise.
PUT /api/v1/meta/flow/NAME?package=PKGmust register the flow in the same boot, arm it at once, and give the same registration refusals asPOST /automation: graph, node config,startnode and notify channel.packaged-flow-write-door-parityandmanaged-content-sealedalready compare the doors on refusals. If the premise fails, stop with no PR and ask the maintainer through the seat (the decision named A as the better answer then). -
Retire
POST /api/v1/automation. Remove:- its ledger row (
route-ledger.ts:605) and its mount; - the SDK
automation.create(packages/client/src/index.ts:6409); - the spec contract entry
createFlow(packages/spec/src/api/automation-api.zod.ts:1011–1016) andCreateFlowRequestSchema/CreateFlowResponseSchema(127–146), then regenerate the five baselines (packages/spec/{api-surface,authorable-surface,export-origins,declaration-map,json-schema.manifest}/api.json); - the docs: the
CreateFlowRequestsection ofcontent/docs/references/api/automation-api.mdx(from 170),content/docs/api/plugin-endpoints.mdx:54, andcontent/docs/automation/flows.mdx(about 2814).
Every test that drives the route moves to
/metawith a package, or is replaced by name (AGENTS.md). - its ledger row (
-
PUT /automation/:nameupdates existing flows only. It takes overPOST's overwrite of a name the engine already holds (automation.ts:4330–4331). A new name is refused, relayingPUT /api/v1/meta/flow/NAME?package=PKGthroughflowWriteRefusal, and the engine registration is undone as for any refused save. -
Update the 2737 docblock.
-
os meta register. The flag stays optional, because in-place saves stay open.- The kernel's refusal is printed as sent.
- Rewrite the flag's description (
register.ts:263–268): required for a new item. - Rewrite the empty-value refusal (26–28).
- Add a test: a new item without
--packageexits non-zero with the server's sentence.
- Q-d (answered A). Add a note in
sys-sharing-rule.object.tsand the PR: the close does not reach these rows (items 14–15). - ADR-0084 amendment (Tier H). Add a dated note under
#amendment-2026-11-26-org(line 475), recording what the answers change:- Q-d A corrects "Sharing rules, queues and assignment rules … bind to the
.custompackage of the object that owns them" to: they are organization data rows the close does not reach (regime C). - Q-a A and Q-b C change no other ADR-0084 sentence. The Console: right after Add new view, the draft preview bar may read "no unpublished changes" while the new view's package-less draft is pending (measure first) #35624 record for Q-b C is posted (7234145174).
- This dated note is the "new ADR or amended status line" AGENTS.md Prime Directive 13 requires to reverse a recorded decision.
- Q-d A corrects "Sharing rules, queues and assignment rules … bind to the
- ADR-0070 marks (Tier H).
- D1: a dated note that the kernel refuses the package-less create, naming the four exemptions and the in-place rule (ruling 7184753035).
- Implementation status: D1 complete. D3's Kernel bullet: done.
- Not D5 (App Studio 改版(4-2):散落项按勾选「移入软件包」——新入口逐项过保存检查、整批判引用;收编散落项接口和 Studio「组织的流程」同时下线(关 #37468) #38150 marks it).
- Changeset and declarations.
- Packages:
@objectstack/metadata-protocol,@objectstack/runtime,@objectstack/cli,@objectstack/client,@objectstack/spec. minor,Clause-②: no (narrowing),Metadata-protocol: narrowed, the BREAKING banner and its ADR-0087 disposition.- A semantic migration entry in
packages/spec/src/migrations/entries/semantic/on the precedent of18.sharing-rule-runtime-create-withdrawn.ts:- FROM:
PUT /api/v1/meta/TYPE/NAMEnaming no package, for a name no package holds, answered200and stored a loose row (andPOST /automationcreated a package-less flow). - TO:
422 WRITABLE_PACKAGE_REQUIREDnaming the writable packages. Add?package=PKGor--package PKG, or in Studio choose a package. Existing loose rows save in place.
- FROM:
- The PR body carries the
Skills-docs:line (.claude/skills/pm-dispatch/SKILL.md:316) for the narrowing arm.
- Packages:
Test fixtures and follow-ups
- Creating a loose item in tests. After this card, no public door creates a loose item. Tests that need one insert the row 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 applies to this card's control tests, to App Studio 改版(4-2):散落项按勾选「移入软件包」——新入口逐项过保存检查、整批判引用;收编散落项接口和 Studio「组织的流程」同时下线(关 #37468) #38150's tests, and to the QA items that read_envaddresses (api-backend.json:3750, 3899). The insert is a test fixture, not a fifth exemption. A App Studio 改版(4-2):散落项按勾选「移入软件包」——新入口逐项过保存检查、整批判引用;收编散落项接口和 Studio「组织的流程」同时下线(关 #37468) #38150 test that creates through a public package-less door turns red here and is fixed in this PR. - QA checklist drift. 17 items in
docs/qa/platform-checklist/areascreate flows throughPOST /api/v1/automationprecisely because "no writable package needed" (for exampleapprovals.json:1117). After this card they need a package or the fixture. Other items still describe package-less saves. 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. - Follow-up card in hotcrm,
Blocked-by:this card. Q-g C makes it owed. At c9d500f, seven hotcrm test files (for exampletest/flow-record-change.test.ts:763) register throwaway flows throughPOST /automationwith no package, and the close refuses that. They move toPUT /meta/flow/NAME?package=PKG. The seat files the card per.claude/skills/pm-dispatch/references/cross-repo-coordination.md. The cloud repo was not measured.
Acceptance
- Census at the construction SHA. Re-run App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453's writer census: every caller of
saveMetaItem,client.meta.saveItemorMetadataManager.register, and every writer ofsys_metadata. Each is package-naming, one of the four exemptions (each pinned by a test that names it), in place, or refused here. New writers are listed on the PR. - Refusal tests, each answering
422and storing nothing, for a new name with no package:/metapublish and draft (flow,object,dataset,view);- the automation doors (
POST /automationanswers404,PUT /automation/NEWanswers422), with the premise measurement on the PR; os meta register.
- Control tests, unchanged answers:
- an in-place publish save, draft save, delete and per-item publish of an existing loose row;
- a package-less row bearing a package-held name (ADR-0150 D4);
- the disabled-holder cells of ADR-0150 D3's 2026-11-26 note;
- the W3 overlay close;
- the W4 import with a package-less datasource;
os migrate meta --storedand the flow-credential move over a loose row;- platform registration at boot;
PUT /automation/EXISTING.
- The 7 dogfood files and the runtime door tests that drive
POST /automationeach name, in the PR, what replaces them: the/metadoor with a package, or the fixture. - Each new refusal test has an ablation: remove the close, and it goes green-to-red.
- The dogfood battery for a
(narrowing)arm runs green. The five examples boot and seed with 0 refusals (App Studio 改版(摸底):散落项实测数量、合法的无包写入清单、移入软件包对 ADR-0150 寻址的影响——为 #37424 拍板 2、3 提供读数 #37453 measured 0 stored loose rows at boot). - Contract-tier L2 recorded. The ADR-0084 amendment and the ADR-0070 marks are merged by the maintainer. App Studio 改版(4-1):没有软件包的新建先问——选一个或新建一个;设置的权限集和岗位也先问;系统应用里的共享视图和报表拒绝并指路 #38149 and App Studio 改版(4-2):散落项按勾选「移入软件包」——新入口逐项过保存检查、整批判引用;收编散落项接口和 Studio「组织的流程」同时下线(关 #37468) #38150 have landed.
Activity
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Follow-up filed · 2026-11-28T05:16Z: objectstack-ai/hotcrm#2841 carries the HotCRM half of Q-g C (seven verify tests move from
POST /automationtoPUT /meta/flow/NAME?package=PKG),Blocked-by: objectstack-ai/objectstack#38174. What 3's measurement of the PUT door decides whether that card waits for a release or returns to its queue at once; please state the reading on this card when What 3 runs.