Skip to content

Commit cdfb7da

Browse files
docs(adr): ADR-0159 — forms are their own metadata type; amend ADR-0017 and ADR-0146 D2 (#36957)
Part of #36868 Clause-②: no Metadata-protocol: none This PR is the design text only. What it leaves on the card after it merges: the owning seat files implementation cards ② to ⑤ from the dev report, and posts the pointer comments on the paused public-forms card and its sibling. ## 维护者速读 - 用户能看到什么变化:用户无感。这是一份设计文档,把「表单从视图里拆出来、对外表单并入」的裁决写成可执行的方案,不改任何功能。 - 为什么做:给「表单独立成一种元数据」这件事定下做法和先后顺序,暂停中的对外表单开发要等它才能继续。 - 出错会怎样:文档本身不会影响线上;它管的是安全边界——已经关掉的对外表单,迁移时不能被重新打开。管理员做的定制里没有开关、却靠「盖住」应用自带的公开表单让地址保持关闭的,迁移时必须跟着一起搬走。几轮返工补上的是:同一张表单存了几份定制时,迁移只留现在真正生效的那一份,不会把一份没人读到的「开着」的定制搬到前面去。 - 要你做什么:审核通过后合并这份文档;其中有五处不是你裁决的原话、已在文中逐条标明并放在裁决段落之外,不同意可以逐条划掉:①表单文件的后缀跟着改名一起换;②已关掉但还留着地址的表单仍算占着这个地址;③读取旧开关的那段逻辑多留一个大版本;④迁移源码时,凡是声明了「覆盖应用自带表单」的定制一律搬进新类型,哪怕它盖的其实是一张记录表单(之后校验会报错要求作者删掉,不会长期留着);⑤「靠盖住来关闭公开地址」的那段读取逻辑在下个大版本之后也和旧开关的读取逻辑留得一样久,这超出了你点名豁免的范围;注意:你后来对「两类特殊的旧存储行」的裁决正是靠这一条才不会让已关闭的表单打开,划掉这一条等于把那个问题重新交回给你。 - 另外四件要你知道(前三件不是越过裁决,但会影响管理员;第四件是你已经裁决的):迁移时如果同一张表单有一份现在没人读到的「关闭」定制,迁移会把它带过去,这张表单迁移后变成关闭,报告会点名,管理员在 Setup 里再打开即可;从新类型上线起,管理员不能在应用自带表单的同名位置再存一个不属于任何应用的列表(单独存或夹在一组视图里存都一样),换个名字或存进自己的应用即可——这是「同名的列表和表单互不冲突」的一个例外,它会一直保留到「靠盖住来关闭公开地址」的那段读取逻辑被拿掉为止,不止到 19 大版本;其中少数存法今天是存得进去的(比如应用没有配套的定制包、或同名内容由几个应用同时提供时),所以第二张实施卡要按「收紧」而不是「纯新增」来声明;如果某个环境里有一张不属于任何应用的表单,今天就被自己应用里的同名列表挡着、没有任何入口读得到它,那么新类型上线后它照样不提供服务,迁移也不搬它;「两类特殊的旧存储行怎么处置」你已裁决为「不考虑」,文档已照此写定:这两类行(盖在应用公开表单上、自己却不带表单的旧行;被同名列表挡着、没人读到的无包表单)不做专门处置,迁移不搬它们,升级到 19 大版本也不为它们卡住,原样留着;只要上面第⑤条保留,今天关着的公开表单就不会因此打开(你已用「同意」确认过这个读法)。 ## What changes - **New record, ADR-0159** (Proposed): forms leave `view` for a `form` metadata type. It settles every bullet of the card's design step: - D1: the kind passes ADR-0088's admission test on three consumers that exist today (the anonymous form doors, an action of type `form`, Setup's public-forms list). A record create or edit form is not `form` content. - D2 and D3: the shape (`name`, `object`, the form body at the top level) and the name space (`OBJECT.KEY`, the name a form is served under today; one object binding, one rung). D2 also gives the `*.form.ts` file suffix to the new type and moves the 17 Studio metadata-form modules to `*.metadata-form.ts` in card ②. That step follows question 1 by the owning seat's routing, not by the ruling's words, and the record says so. - D4: `form` joins ADR-0146 D2's overridable types. The classification row lands with the registry row in card ②, which the pin in `packages/spec/src/kernel/customization-package.test.ts` forces. No code is edited here. - D5: adding the type is additive, with one write narrowed. One projection reads the three old shapes; `view` reads are unchanged until the major, and old-shape writes save as before with the one exception below. A `form` write removes form content only and never a list row of the same name. A stored old-shape row keeps replacing its base's form when the base moves its source to the new type: the `form` read resolves over both types in the one served-row order. A stored `view` row that carries no form at a form's name is read as written over the form only in three bindings (a declared override, a row bound to a read-only package, a package-less row). Two are closed by a write door that exists today. The third is closed by one refusal card ② adds, kept as long as rule 11's replacement check is kept: every package-less `view` write that would store a list at a name a read-only package authors as a `form` item, as an item or through a container's expansion, whatever the state of the base's pair. The trigger is a form the package authors, not one projected from an old shape. Some of the refused saves are admitted today, and the record says which. For the served `form` read the projection reads served rows only, so a package-less form that no layer reads today, behind a writable package's list of the same name, stays unserved. "Served" is asked at each package's address, in the `form` read's own resolution over both types, and never taken from the effective `view` list: a package-less row that stands over a read-only package's form stays the served body there, whatever a writable package holds at the name. A list saved in a package beside the form is a list and closes nothing. - D6: the anonymous doors and the withdrawal judgement read both types, so a form switched off in either type stays closed. Identity is the served name and, inside one name, the whole item. Rule 11 (added in an earlier patch round): a stored row that closes an address by replacing its base's body (no withdrawal of its own) keeps closing it across the two types. Eight pins, each with an ablation that can turn red, are owed by card ②. - D7: the old shapes are tombstoned only in protocol major 19, with an ADR-0087 conversion and `os migrate meta` for sources and a ceremony for stored rows, `.custom` overrides included. A form that declares a public link is never an internal record form, switched on or off: it moves with its switch (D7-a). A stored row over a base form that declares a link is classed by its base and never by its own body: it moves with the base and no report or precheck offers its removal (D7-b). Several stored rows of one form fold into one: the body kept is the one the served-row order serves today, whichever binding it has, and every other row carries over a withdrawal and nothing else (D7-d). The served row is found among every stored row at the address, form or not: where it carries no form, no row of that name is moved; by the later ruling these rows stay as stored and none of them holds the upgrade. A row bound to a read-only base has the pair as its destination. A stored row whose customization pair cannot be ensured holds the upgrade, and the precheck names the row and the action for its cause, including the causes only the App's author can remove (D7-c). A table names, for every way a stored row keeps an address closed, the rule that carries it through dual-read, conversion, ceremony, precheck and after the major. Security pins are named for card ⑤, each with its ablation. - D8: a `forms` translation family; the form tails under an object's view translations are the fallback until the major. The `label` and `description` keys there are shared with lists and are neither moved nor read as a fallback. - D9: Setup's page kept and re-pointed; the paused designer re-hosted as the `form` editor; the Studio Developer page retired; what the generic metadata surface covers and what stays dedicated. - Execution plan: cards ① to ⑤ with `Metadata-protocol:` per step (`none`, `narrowed`, `none`, `none`, `narrowed`). Card ② adds the type and narrows one write: its refusal of a package-less list at a form's name refuses some saves that are admitted today. Card ④ now runs after card ③, not beside it. - Five merge questions where the first ruling is silent, each with options on the four fixed axes. **All five are ruled, option A** (ruling record [7131569242](#36868 (comment)), the maintainer's words 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」). Each question keeps its options and table, and ends with its ruling, what it asks of the cards and a `Ruling-ref:` line: - Q1: `defineForm` is the `form` type's factory; the Studio helper is renamed `defineMetadataForm`, both in card ②. Card ② measures outside use first; if any is found, the fallback (a new factory name, never a dual-meaning overload) returns to the maintainer. The rename's scope is counted from the tree (41 code files), not from the table as put. - Q2: a form keeps the `OBJECT.KEY` name. No rename. - Q3: the `form` write door, `os validate` and publish refuse a form whose open public address another form holds. New type only. Outside the ruled block, the record reads "holds" as fail-closed: a switched-off form that keeps its link still holds its address. It says what that refuses that is served today (a retired form that keeps its link beside its successor on the same address) and the way out. - Q4: the reader of old-shape withdrawals is exempt from ADR-0087's kit age-out. It leaves only by a release whose upgrade precheck refuses a deployment still holding an old-shape form row; major 19's upgrade carries that precheck. Outside the ruled block, the record adds its own narrowing: card ⑤ keeps the reader through major 19. - Q5: `name`, `object` and the form body keys at the top level. - Status stays **Proposed**: the record's own Status line says it becomes Accepted by an authorized approval or the maintainer's merge of this PR. - **ADR-0017** amended: a dated pointer on the Status line and a note at the item bullet. `viewKind` is list-only from major 19. Nothing about lists changes. - **ADR-0146** amended: a dated pointer on the Status line and two sentences in D2's "Which types" (`form` is on the list from the change that adds the type; a `view` override of a form stored before that change is the same override, moved by ADR-0159 D7's ceremony). - **`docs/adr/README.md`** regenerated by `node scripts/adr-index.mjs` (one row, the counts). Read first, by risk: 1. ADR-0159 D7: the bullets marked D7-a and D7-b, the table "What keeps a public address closed today, and the rule that carries it", and the list "Security pins card ⑤ owes". Risk hunk: the test that decides whether a stored form is moved or offered for removal. It is the public link of the form and of the base it stands over, not the on/off switch and not the row's own body alone; the wrong test removes the row that keeps a public address closed. 2. ADR-0159 D6 rule 11 with D5's bullet "A stored old-shape row keeps replacing its base's form", on the anonymous doors. Then rule 6 and the fourth pin: identity is the served name; the slug match decides no case in this layer. 3. The five places that go past the ruling's words, each marked and outside every ruled block, listed in TL;DR 10: - D2's file suffix (the seat's routing on question 1); - the paragraph after question 3's `Ruling-ref:` line (the reading of "holds"); - the first paragraph after question 4's `Ruling-ref:` line (the reader kept through major 19); - D7-b's source-conversion bullet: an item that declares `overrides` is moved to `forms[]` whatever its body, past ruling item 3. `os validate` refuses the one whose base ships no form of that name. The alternative not taken is named there; - D7, the paragraph after "After the major", with the second paragraph after question 4's `Ruling-ref:` line: rule 11's replacement check keeps the withdrawal reader's lifetime, past the "this one reader" scope of question 4. The alternative not taken (ADR-0087's clock) is named there. Four more things are named in TL;DR 10 beside them. Three touch no ruled word: D7-d's fold closes a form that is open today where a row no layer reads withdraws it; from card ②, and for as long as rule 11's replacement check is kept, a package-less list is refused at a name a read-only package authors as a form, and some of those saves are admitted today (card ② is `narrowed`); a package-less form that no layer reads today stays unserved and is not moved. The fourth is a later ruling, quoted in the last paragraph after question 4: the two kinds of stored row the migration cannot place get no disposition of their own. 4. ADR-0159 D7-d, D5's bullets "served rows only" and on a stored `view` row that carries no form, and the last paragraph after question 4 (the later ruling, 「两类特殊的旧存储行怎么处置。不考虑」, confirmed 「同意」): the text of the last patch rounds. ## Tests None: the diff is four files under `docs/adr/`. No behaviour changed, so nothing was ablated. ## Acceptance notes - Every position the card cites (read at `14f4d8f8`) was read again on `main` at `62692b7f8b`. The record's "Readings" table lists each one as holds or moved. Three corrections to the card's premises: - The Form-tab switch in the Studio design surface is not on `main`. It exists only in the paused draft PR, so its disposition is "not landed", not "retired". - The sibling card for the field-layout tab is closed (merged as `5c2d5cf2c4`), so its public-forms item needs no new card. - The Setup data module has six type arguments and the page one list read, not about ten. - `defineForm` is already a published export with another meaning (schema-bound Studio metadata forms, 17 modules under `packages/spec/src`). The card does not mention it. It is merge question 1, ruled A. - No server door refuses a second form on a public address another form holds; the first in list order is served. It is merge question 3, ruled A. - The stored-row conversion pass cannot move a row between types, which is why the stored migration is a ceremony. - HotCRM was not re-read. The record repeats the card's count for it and says so. - Not filed, by rule: implementation cards ② to ⑤. Their texts are in the dev reports on the card; this round's report carries the changes to cards ②, ④ and ⑤. - **Patch round on the two review records of head `352579004f9`** (contract review 7132189584, seat record 7132202077). A merge of `origin/main` (`689e5695b98`, clean, no `docs/adr` path moved on main) and two commits on top, no rebase. They edit ADR-0159 only (53 insertions, 19 deletions). No ruled decision changes. What moved: - Must-fix from the contract review: D7 defined internal record forms by the lint rule's "is it switched on" test, so a switched-off public form in a default or create slot would have been deleted with its withdrawal. D7 now defines the set by D1's test (no public link) and names the pin card ⑤ owes for it. - D6's fourth pin asked for a match that rules 4 and 6 exclude. Rule 6 now says the slug match decides no case in the two-type layer, and the pin is replaced by one that can turn red (a same-name withdrawal with another slug). - Card ④ is blocked by card ③ as well as card ②: before card ③ the shipped console reads forms from `view`. - D7 gives the deployment whose customization pair cannot be ensured a remedy: the precheck's message and the administrator's action per cause. One case has no action in this version (a kernel package's form). It is measured empty at `689e5695b98` (no package that ships metadata authors a form in any of the three shapes), card ⑤ measures again, and a hit goes to the maintainer. - The file suffix (above), and card ②'s rename scope counted from the tree with its categories. - Nits: question 4's narrowing is moved out of the ruled block and marked as the record's own; the list-row edge of D5; the shared translation keys of D8; what "holds" means in question 3; what stays of the projection after the major; card ⑤'s pins named; this body's ADR-0146 bullet. - `docs/adr/README.md` was regenerated and came out unchanged. - **Patch round on the two review records of head `9336492ee13`** (delta contract review 7132974909, PASS with S3 open; seat record 7132988092, REWORK on S3). `origin/main` had not moved (`57445a69981`), so no merge. Two commits on top, no rebase, ADR-0159 only. No ruled decision changes: the ten `Ruled: A` and `Ruling-ref:` lines are byte-identical to the last head (same md5 over the extracted lines). What moved: - S3, the permission boundary. A stored override or package-less row with no public link of its own, over a base whose form declares an open one, is what keeps that address closed today: the override replaces its slot and the doors read the effective list only. D7 classed such a row as internal and had the precheck name its removal, while another bullet moved it. Now one rule (D7-b): a row over a base form that declares a link is classed by its base, moves with it by the conversion and by the ceremony, and is never offered for deletion or reset (D7-e). "Removing one is safe" is replaced by the exact set it holds for. Card ⑤'s first pin gains its twin (ablate the base half of the internal test; the pin turns red). - The break, tried again by the author across dual-read, conversion, ceremony, precheck and after major 19. Two more paths were found and closed in the text: (a) in dual-read, a package that moves its source to the new type would leave a stored old-shape row over nothing, because the overlay merge runs inside one type — D5 and D6 rule 11 now resolve a package's form over both types; (b) a package-less row that withdraws a form, beside an open override in the pair, closes the form today through the per-package layer and would be lost when both land on one destination — D7-d folds them, narrowing only. One class is parked with a fail-closed rule and no invented mechanism: a stored row that carries no form at a name its base ships as a linked form. Card ② measures whether any write door admits it; if one does, its disposition goes to the maintainer before major 19. - Nits: the full list of who spells the file suffix, with the text that must be re-worded and not re-pointed (emitted lint text, a pinned docblock, one docs page), the self-test's suffix assertion, the `../DIR/NAME.form` importer and the comments of the i18n bundle check; the pair-refusal causes only the App's author can remove; question 3's reading of "holds" moved outside the ruled block as question 4's was, with the arrangement it refuses. - Readings of today's layers that were read from the code and not run are marked so in D7-d; card ⑤'s fold pin runs the first before the ceremony relies on it. - **Patch round on the two review records of head `be1c0cbd4da`** (delta contract review 7134054404, PASS with S4 and S5 open; seat record 7134079524, REWORK on S1 and S2). A merge of `origin/main` (`305fe60e6e9`, clean, no `docs/adr` path moved on main) and one commit on top, `c74ae94fe1a`, no rebase, ADR-0159 only (55 insertions, 14 deletions). No ruled decision changes: the ten `Ruled: A` and `Ruling-ref:` lines are byte-identical to the last head (md5 `ce1a37ec97b8231d621ca355872475d9` over the extracted lines, before and after). What moved: - Contract S4. D7-d named two pairs of rows and missed a third: a row bound to a read-only base beside a package-less row. The served-row order was read again at this head (the pair's override, then the row bound to the package, then the package-less row). The bound row now has its destination (the pair), and the fold keeps the body the read serves today, whichever binding it has. Card ⑤'s fold pin gains that fixture and the writable-base twin. - Contract S5 with seat S1(a). D7-b's source-conversion sentence is marked as the record's own reading past ruling item 3, listed in TL;DR 10, with the alternative not taken. The grade is stated: `os validate` refuses an override of a form its base ships in neither type, the grade the override write gate gives today to a declaration of an item its base does not ship. - Seat S1(b). Rule 11's replacement check kept after major 19 is marked as the record's own reading past question 4's ruled scope, with its lifetime (the withdrawal reader's: it leaves in the same release, by the same precheck) and the alternative (ADR-0087's clock). The table no longer cites the ruled exemption for it. - Seat S2. The reading "the row was written over the form" contradicted D3 for a list saved after the package moved its form. It was bounded to three bindings. (That round's text said each was closed by a write door that exists today; the next round corrects it: two are, and the third is closed by a refusal card ② adds.) A list saved in a package beside the form is a list. One limit is stated as fail-closed: a package-less row that held the name before the package shipped anything under it. The disposition of a row of this class at major 19 is owed to the maintainer before major 19 opens. - Nits: Consequences name the fold's closing of an open form; "may close" is "closes"; card ②'s two pins for the row that carries no form and the fifth class in card ⑤'s precheck pin; the third string pin on the suffix in D2. - **Patch round on the delta contract review of head `c74ae94fe1a`** (7135096933, PASS with S6 and S7 open; the seat record at that head, 7134976464, is ACCEPT with nothing open). A merge of `origin/main` (`d25d912d108`, clean, no `docs/adr` path moved on main) and one commit on top, `737f6f288c4`, no rebase, ADR-0159 only (23 insertions, 12 deletions). No ruled decision changes: the ten `Ruled: A` and `Ruling-ref:` lines are byte-identical (md5 `ce1a37ec97b8231d621ca355872475d9`, before and after). The count of points past the ruling's words stays five. What moved: - S6. The last round said the package-less binding was closed by ADR-0146 D11's write close, kept across the two types. That close is narrower than the text said: by its contract it refuses only where its ceremony would move the row. The record now says card ② adds one refusal of its own, which covers every package-less `view` write that would store a list at a form's name: an item and a container's expansion, a save and a draft's publish, whatever the state of the base's pair. It answers with the envelope of the container name-collision refusal it sits beside (`VALIDATION_ERROR`, `400`), and its remedy works without a pair (another key, or an app of the environment's own). An expansion's list is on the same side as an item's: read closed when stored package-less before the refusal, a list beside the form when in a package. The sentence on the bound binding is corrected. Pin (a) gains the container fixture. - S7. D7-d did not say what the ceremony does when the served row carries no form and a form row stands behind it; moved alone, that form row would become the pair's override and the address would answer. Now the served row is found among every stored row at the address, and where it carries no form no row of the name is moved. Card ⑤'s fold pin gains the fixture. - Nits: TL;DR 10 says "several stored rows" and names the temporary refusal and the decision owed before major 19. - **Patch round on the delta contract review of head `737f6f288c4`** (7136181190, PASS; S6 and S7 closed, S8 and S9 open). A merge of `origin/main` (`a73edb3cd78`, clean, no `docs/adr` path moved on main) and one commit on top, `102c857d0e9`, no rebase, ADR-0159 only (24 insertions, 12 deletions). No ruled decision changes: the ten `Ruled: A` and `Ruling-ref:` lines are byte-identical (md5 `ce1a37ec97b8231d621ca355872475d9`, before and after). The count of points past the ruling's words stays five. What moved: - S8. Card ②'s refusal refuses saves that are admitted today (several packages ship the name; the base has no pair; a re-save of a row its pair already holds; a container that overlays the package's own). The record now says so in D5, in the execution plan, in TL;DR 10 and in Consequences, with the door that remains. Card ② is `Metadata-protocol: narrowed`, by the rule that a value refused is `narrowed` and that several kinds take `narrowed` over `added`; that rule lets a narrowing ship in a minor with its banner and disposition, so the plan's shape does not change. The `Clause-②:` arm is left to the seat at claim. The ② and ⑤ bullets are reworded to match. - S9. No rule said what the `form` read or the ceremony does with a package-less row that carries an open form behind a writable package's list of the same name. D5 now says the projection reads served rows only, so that form stays unserved, as it is today. D7-d says the ceremony moves no row of the name and that the package-less row holds the upgrade, its disposition being part of the decision owed before major 19. Card ② gains a pin and card ⑤ a fold fixture, each with an ablation. - Nits: the refusal covers a rollback and does not judge a delete; its trigger is a form a package authors. - **Patch round on the delta contract review of head `102c857d0e9`** (7136878154, PASS with S10 open) **and on the maintainer's ruling on the card** (record 7136809727: 「两类特殊的旧存储行怎么处置。不考虑」). `origin/main` had not moved (`a73edb3cd78`), so no merge. One commit on top, `a9b2da75f7a`, no rebase, ADR-0159 only (36 insertions, 27 deletions). The ten `Ruled: A` and `Ruling-ref:` lines are byte-identical (md5 `ce1a37ec97b8231d621ca355872475d9`, before and after); the later ruling is quoted in a marked paragraph after question 4, outside the ruled blocks, with no new `Ruled:` line. The count of points past the ruling's words stays five. What moved: - The ruling. The decision the record left owed before major 19 is answered as the seat reads it in that record: the two kinds of row (a row that carries no form over a linked base, in a binding D5 bounds; a package-less form row no layer reads behind a list) get no disposition of their own. The ceremony does not move them, the precheck does not hold major 19 for them, and they stay as stored. Every "owed" and every "holds the upgrade" for these two kinds is replaced. Two things follow, and the record marks them as its own: rule 11's kept replacement check now covers the row that carries no form (it is what keeps that address closed after the major), and D5's bounded reading and card ②'s refusal last as long as that check, past major 19. Card ⑤'s pins drop the holds-the-upgrade assertions for the two kinds and keep the address-stays-closed ones. - S10. "Served rows only" did not say at which address the order is asked. It is asked per package address, in the `form` read's own resolution, never from the effective `view` list. The consequence sentence is scoped: a list saved into a writable package closes a package-less old-shape form only where no read-only package's address serves that row. D7-d says the same for the ceremony. Card ② gains the fixture the review names. - Nits: under `narrowed` the `Clause-②:` line carries the `(narrowing)` arm, and card ②'s one disposition marker is a registered entry or a category resting on a checked fact; TL;DR 3 and D5's heading carry the exception; "whichever withdrawal layer reads it today". - **Patch round on the delta contract review of head `a9b2da75f7a`** (7137988978, PASS with S11 open). A merge of `origin/main` (`b01d8f97e97`, clean, no `docs/adr` path moved on main) and one commit on top, `d9a00e5acf5`, no rebase, ADR-0159 only (15 insertions, 14 deletions). The ten `Ruled: A` and `Ruling-ref:` lines are byte-identical (md5 `ce1a37ec97b8231d621ca355872475d9`, before and after). The count of points past the ruling's words stays five. What moved: - S11. Three sentences still stated what the later ruling removed: that no deployment reaches the major holding such a row, that card ⑤ simply builds the alternative if the fifth point is struck, and that D7 gives the no-form row a disposition. Each is replaced by the review's own sentence; D5's list lead says two things in it last past the major. - Nits: the paragraph after question 4 cites the maintainer's confirmation (record 7137033870, 「同意」) beside the ruling record and no longer calls the reading open to correction; it says which rows the ruling names and which this record reads in, and what a later release owes; TL;DR 5 and Consequences say a row may be left as stored; striking the fifth point is said, where it is offered, to return the later ruling to the maintainer. ## Verification Head `d9a00e5acf5`. Local, the 21 families `node scripts/pm/dispatch-gates.mjs --commands` derives for this diff, all exit 0 on that head; `--ran` reconciled 21 derived, 21 run, 0 NOT-MEASURED, every line with its exit code. `check:doc-formula-expressions` was run after building the lint package and its dependencies under the shared lock. CI on this head when read: check-runs at this head when the seat landed it: 48, all completed, 26 success, 22 skipped, none failed (`pr-state.mjs --pr 36957`). <details><summary>Exit codes, captured before any pipe</summary> ```text 0 node scripts/check-adr-links.mjs --self-test 0 node scripts/check-adr-links.mjs 0 node scripts/check-closing-keyword-parity.mjs --self-test 0 node scripts/check-closing-keyword-parity.mjs 0 node scripts/check-comment-mask-corpus.mjs 0 node scripts/ci/plan-test-core-shards.mjs --self-test 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions 0 pnpm check:adr-anchors 0 pnpm check:adr-index 0 pnpm check:adr-symbol-anchors 0 pnpm check:ci-filter-parity 0 pnpm check:closed-ceremony-text 0 pnpm check:cross-package-test-inputs 0 pnpm check:doc-authoring 0 pnpm check:driver-memory-census 0 pnpm check:gitlink-declared 0 pnpm check:nul-bytes 0 pnpm check:pm-governed-merges 0 pnpm check:pm-prior-rulings 0 pnpm check:refd-timer-probe 0 pnpm check:watch-hint-literal ``` </details> Two-minute check: run `node scripts/check-adr-symbol-anchors.mjs` on the branch. Expected: exit 0, and no line naming the 0159 record. Every source position the new record cites is a symbol anchor the gate resolved against the tree. Governed surface: `docs/adr/**` is Tier H. This PR stays draft; landing waits for an authorized approval or the maintainer's merge. `skip-changeset`: the diff publishes nothing from any package. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4db6fd7 commit cdfb7da

4 files changed

Lines changed: 602 additions & 5 deletions

‎docs/adr/0017-object-has-many-view.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-0017: Object has-many View (Independent View Entities)
22

3-
**Status**: Accepted · Implemented Phases 1–4 (2026-05-30) · Phase 5 (Studio designer) deferred · **Amended** (2026-09-04, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D13 — §3.4's `sys_view_definition` store and §3.6's objectui repointing are **retired as inert**: verified on 2026-09-04 that no framework writer or reader of its rows exists, that `objectui` never referenced the object in its history (its runtime-view CRUD writes the ADR-0005 `view` overlay via `client.meta.saveItem`), and that a per-user view scope is a parked v18 direction. Runtime-authored views are environment metadata; §3.5's `GET /meta/view?object=` filter stands)
3+
**Status**: Accepted · Implemented Phases 1–4 (2026-05-30) · Phase 5 (Studio designer) deferred · **Amended** (2026-09-04, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D13 — §3.4's `sys_view_definition` store and §3.6's objectui repointing are **retired as inert**: verified on 2026-09-04 that no framework writer or reader of its rows exists, that `objectui` never referenced the object in its history (its runtime-view CRUD writes the ADR-0005 `view` overlay via `client.meta.saveItem`), and that a per-user view scope is a parked v18 direction. Runtime-authored views are environment metadata; §3.5's `GET /meta/view?object=` filter stands) · **Amended** (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D7 and D10, on the maintainer's ruling 「拆成 form 类型,对外表单并入」, ruling record [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354) — **a view is a list**: a form is an item of the `form` metadata type, not a view item. `viewKind`'s `form` value, the `form` arm of the item and the container's `form` and `formViews` members keep loading until protocol major 19, read through ADR-0159 D5's projection, and are tombstoned in that major with the ADR-0087 conversion and the stored-row ceremony ADR-0159 D7 names. The container, the item identity and the switcher query are unchanged for lists. The note at §2's ViewItem bullet governs how §2, §3.1 and §3.2 are read. It lands by an authorized approval or the maintainer's merge of the PR cut from #36868)
44
**Deciders**: ObjectStack Protocol Architects
55
**Builds on**: [ADR-0003](./0003-package-as-first-class-citizen.md) (package as first-class citizen), [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type, org overlay), [ADR-0010](./0010-metadata-protection-model.md) (L1/L2/L3 protection)
66
**Consumers**: `@objectstack/spec`, `@objectstack/metadata`, `@objectstack/objectql`, `@objectstack/rest`, `@objectstack/platform-objects`, `../objectui` (runtime switcher + Studio designer)
@@ -64,6 +64,17 @@ has-many ViewItem.**
6464
- **`ViewItem`** — name `<object>.<viewKey>` (qualified, globally
6565
unique), an `object` foreign key, a `viewKind` (`list` | `form`), a
6666
`scope`, and the existing `ListView`/`FormView` payload under `config`.
67+
68+
> **Note (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md), ruling record `7123091354` on
69+
> [#36444](https://github.com/objectstack-ai/objectstack/issues/36444), 「拆成 form 类型,对外表单并入」) — a form is a `form`
70+
> item, and `viewKind` is list-only.** The `form` kind this bullet, §3.1's `ViewKindSchema` and `ViewItemSchema`, and §3.2's
71+
> per-`formViews` expansion describe is carved out of `view` into its own metadata type. Until protocol major 19 the three
72+
> shapes that carry a form in a view (the container's `form`, a `formViews` entry, a `viewKind: 'form'` item) keep loading
73+
> and are read as `form` items through one projection (ADR-0159 D5); in major 19 they are tombstoned, `ViewKindSchema` is
74+
> `list` alone, and the migration is ADR-0159 D7's. Everything this record says about lists stands as written: the
75+
> container as authoring sugar, the qualified `OBJECT.KEY` identity, `getViewsByObject()` and the `?object=` filter. A
76+
> form keeps the name it was served under. The bullet and the sections stay as written, and this note governs how they
77+
> are read.
6778
- **Three scopes** (a layer axis, *distinct* from ADR-0010 `_provenance`):
6879
- `package` — ships from `*.view.ts` source; immutable at runtime
6980
(not deletable / hideable / overridable in the switcher).

‎docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ It lands by the maintainer's hand-merge of the PR cut from #30881.
2727
· **Amended in place** (2026-11-06, ruling record [`6691022506`](https://github.com/objectstack-ai/objectstack/issues/29594#issuecomment-6691022506) on [#29594](https://github.com/objectstack-ai/objectstack/issues/29594), maintainer, verbatim: 「① 定制单位 = App;同意」, and the second ruling record [`6691217245`](https://github.com/objectstack-ai/objectstack/issues/29594#issuecomment-6691217245) there, verbatim: 「内核白名单,可以下一版本再处理,首批名单建议:Users、Organizations;其他同意。」): the customization unit is the App, so there is one pair per App, `<app id>.custom`, shared by every package its artifact delivers and never one per module; the kernel is one platform suite with one platform pair, `com.objectstack.kernel.custom`, whose range is the platform version; no kernel object is customizable in this version, and the kernel whitelist (Users, Organizations) belongs to the next one ([D3](#d3), [D11](#d11), Q4, [Consequences](#consequences), merge questions 8 to 12); the App of a package is read from the declarations the registry holds, a package that declares no App is its own unit, and a pair created under the old per-package unit is re-identified as, or moved into, its App's pair by the migration ceremony (merge questions 11 and 12). It lands by the maintainer's hand-merge of the PR cut from #31014.
2828
· **Amended in place** (2026-11-17, card [#34724](https://github.com/objectstack-ai/objectstack/issues/34724) of epic [#34571](https://github.com/objectstack-ai/objectstack/issues/34571), maintainer, verbatim: 「打包动作不是应该在 studio 对应的软件包中自定义吗」, and on platform actions getting no switch, 「同意,立卡」; ruling record [`6944409840`](https://github.com/objectstack-ai/objectstack/issues/34724#issuecomment-6944409840), verbatim: 「保持原状并写明恢复方法」): the action's ledger switch moves onto the action in Studio and Setup › Packaged Actions retires, so the line above that says D4 "keeps the ledger switch" now reads as the switch living in Studio; the platform's own actions carry no switch in the console, a row that already switches one off stays in force, and the activation door is the way to turn it on again ([D4](#d4), [D9](#d9)). It lands by the hand-merge or authorized approval of the PR cut from #34724.
2929
· **Amended in place** (2026-11-24, card [#36891](https://github.com/objectstack-ai/objectstack/issues/36891) of epic [#36890](https://github.com/objectstack-ai/objectstack/issues/36890), maintainer, verbatim: 「元数据列表如果全部改成点击之后弹出全屏的详情页呢?是不是对象流程这些可以用同一种风格,顶部的导航也不需要了。」, 「我们说的弹出窗口全屏,应该是右侧全屏对吧,左侧菜单和前端一样可以折叠。」, and on the epic's fifteen numbered decisions, twice, 「全部按建议」): the "All metadata" area is Studio's only entry and the four pillars are no longer places — an item opens on its metadata address and fills the content pane beside one collapsible left menu, the object, the flow and the permission set opening their designers there and no longer a pillar; the menu's six groups and its type-to-group table are [ADR-0084](./0084-application-builder-information-architecture.md)'s as amended the same day; the item's address, its ‹ › order, its leave guard, and where a dashboard or a report opens (an app's own edit state) and is created are fixed in [D1](#d1), and the pillar and landing wording of [D2](#d2), [D3](#d3), [D4](#d4), [D8](#d8), [D11](#d11) and the [Consequences](#consequences) is read through it (merge questions 13 to 15). It lands by the hand-merge or authorized approval of the PR cut from #36891.
30+
· **Amended in place** (2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D4, on the maintainer's ruling 「拆成 form 类型,对外表单并入」, ruling record [`7123091354`](https://github.com/objectstack-ai/objectstack/issues/36444#issuecomment-7123091354)): `form`, the metadata type forms are carved into, joins [D2](#d2)'s "Which types" list as overridable by declaration, with no conditions; its classification row lands in the same change as its registry row, which the pin in `packages/spec/src/kernel/customization-package.test.ts` requires. It lands by an authorized approval or the maintainer's merge of the PR cut from #36868.
3031
**Decided by**: the maintainer, 2026-10-30, in the desktop session that re-planned the epic, verbatim and
3132
untranslated as epic #28236 records them — the direction 「方向定为包级覆盖:代码和 Studio 用同一机制,定制都进 .custom。」; the suffix 「同意 后缀改成 .custom」; the eight questions 「等我拍板的 8 个问题,全部同意」; the extension
3233
fields 「扩展字段用 __c 后缀,只有 .custom 包能用。」; the item toolbar 「同意新增 2h「Studio 项工具栏」并放在 2a 之前」;
@@ -378,7 +379,7 @@ reads, never a judgement the gate makes. Three types are excluded whatever the r
378379
catalog holds one name per deployment for: **permission sets, positions and capabilities are not overridable**
379380
([D6](#d6); ADR-0048's 2026-10-08 addendum, ADR-0131 D3). `object` is **extended**, never replaced ([D10](#d10));
380381
`field` rides with its object. The types ADR-0126 §3 assigns outside the regimes as code (`hook`, `job`, `api`,
381-
`agent`, …) stay outside: customization of those is a new version of the package.
382+
`agent`, …) stay outside: customization of those is a new version of the package. **`form`** (amended 2026-11-24, [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D4) is on the list from the change that adds the type to the registry: a declared override of a base's form in the paired `.custom` replaces that form whole, and it is what Setup's public-form switch writes. A `view` override of a form stored before that change is the same override; ADR-0159 D7's ceremony moves it to `form` with its `overrides` declaration and its `basedOn` unchanged, and until it is moved the anonymous form doors keep reading its withdrawal (ADR-0159 D6).
382383
383384
**What this lifts from ADR-0126 §9 and ADR-0131 D6.** §9's first bullet deferred it: "The ServiceNow-style overlay layer
384385
(badge / customization list / diff-vs-base / revert / upgrade skip-report) — recorded as the mature direction **if**

0 commit comments

Comments
 (0)