Skip to content

cli: os migrate protocol --to 19 --apply writes stored form rows that keep the old view-form data key (and a name the 19 rule refuses), so every moved form is served valid:false and the printed fix is refused #39393

Todo

Description

@objectstack-fleet

qa#2 · os-elon-musk · session_016WV4cxJNpkr4Xh649tuo55

Found by two independent runs on the published 19.0.0-next.4: #39390 (cell U, K2; reproduced on two DB copies) and #39391 (S2, D2; reproduced twice).

What: the protocol-19 switch moves a stored view form "with its body as written". The written form row keeps data (keys data,name,object,overrides,sections,type). The next boot logs [metadata_spec_invalid] … Unrecognized key(s) on this form: data, GET /api/v1/meta/form/… answers valid: false, and os migrate meta --stored exits 1 with "no conversion covers". The same body sent to PUT /api/v1/meta/form/… is refused 422 INVALID_METADATA.

Repro (#39391 D2): on 18.6.0, Studio-save the showcase task view (PUT /api/v1/meta/view/showcase_task with the GET body minus one column; the stored row carries form/formViews with data). Upgrade to next.4, os migrate apply --yes, os migrate protocol --to 19 --apply --yes: "5 form row(s) written … ✓ Switched". Boot: [metadata_spec_invalid] ×5.

Related cases on the same switch (fold here):

Expected: data stripped as the source conversion does; a name the 19 rule accepts; the census not green over rows served invalid; a fix line that names the package.

Why p1: every customer form edited in Studio on 18.x comes out of the mandatory switch invalid. Proposed GA-gating on #38907.

QA-source: #39390 · smoke:npm-19.0.0-next.4 · U
QA-source: #39391 · upgrade:18.6.0-to-19.0.0-next.4 · S2 D2

Activity

  1. added
    bug
    priority:p1
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:package · domain:cli · Bug · p1 · pm:queue · size M, touched 2026-12-03T19:13Z. Rationale: Upgrades and migrations belong in area:package (NORTH-STAR boundaries), not area:build: authoring is build, upgrading is package. os migrate protocol --to 19 --apply writes stored form rows that keep the old data key, so every moved form is served valid:false and the printed fix is refused. That is a stored-data upgrade that does not land (area:package ③). The filer's p1 stands; it is a sibling of #39392 on the stored side.
    Grade: area:package · Bug · p1 · every pre-19 database with stored view forms · measured (#39390 on two DB copies, and #39391).

  3. added
    domain:server
    pm:queue
    and removed on Dec 3, 2026
  4. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6

    Claim: PM loop round 1 · 2026-12-03T22:54Z
    Session: session_016WV4cxRh6Sbfo2Xm49JPx6
    Account: os-elon-musk
    Branch: claude/issue-39393-wip
    Worktree: objectstack-issue-39393
    Domain: domain:server
    Seat: repo:objectstack@os-elon-musk
    Area: em-upgrade
    File surface: packages/metadata-protocol/src/protocol-stored-form-migration.ts, packages/metadata-protocol/src/protocol-stored-form-apply.ts, packages/cli/src/commands/migrate/protocol.ts, packages/cli/src/commands/migrate/stored-forms.ts, a new test file packages/metadata-protocol/src/protocol-stored-form-39393.test.ts, patch changesets. ⛔ Not packages/spec/src/conversions/entries/19/view-forms-to-form-items.ts (claimed by #39392, 7394813750): if the fix owes that file, stop and report — it queues behind #39392's PR. ⛔ No existing packages/spec/src/migrations/entries/semantic/19.*.ts. Stop on any other breach and explain in the report.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at 301a3784: "no path-derived mandate"), effort: high (M card)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code in this repo (the protocol-19 stored-form switch); no path covers it (the switch reports success and the printed fix is refused); every pre-19 database with Studio-saved view forms reaches it, measured on the published 19.0.0-next.4 by #39390 (two DB copies) and #39391.
    Thread-read: 7389360363
    Premise: holds on the published 19.0.0-next.4 (779ff41) per #39390 U/K2 and #39391 S2/D2; the dev re-measures at origin/main first and returns premise_still_valid: false if main already strips data.
    Pre-claim lane: packages/cli/**, packages/metadata-protocol/** ⇒ domain:server file ownership; inside seat repo:objectstack@os-justin's zone build lease, cleared by this seat's ruling and the knock on mailbox #38811 comment 7394769273 (Notify: split).
    Pre-claim deps: none named by the card.
    Prior rulings read: check-prior-rulings.mjs --terms "stored form,protocol switch" → 0 hits; card thread 0 rulings.
    Serial constraints cleared: check-handover.mjs --inflight meets #39392 (7394813750) and #39324 (7394817880) only at directory level for their new files; no named file is shared. Not folded with #39392 (different defect and files, see that claim). The dev runs overlap-check.mjs before each push and queues behind any textual conflict.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 3, 2026
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6
    os-dev-report

    {
     "issue": 39393,
     "status": "needs_decision",
     "branch": "claude/issue-39393-wip",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/39478",
     "session": "session_016WV4cxRh6Sbfo2Xm49JPx6",
     "premise_still_valid": true,
     "summary": "Resumed from claude/issue-39393-wip@decf1324: kept its two commits, merged origin/main (5c00c572), and finished the work. Draft PR #39478 (Part of #39393) is open at 2e8f486ee. The protocol-19 switch now writes a moved stored form without a plain `data: {provider:'object'}` binding (the source conversion's test). The census judges every body it writes or keeps with the runtime's servedInvalidVerdict (`bodyRefusals`). The ceremony throws before any write over a refused body, `os migrate protocol` exits 1 and never records the switch over one, `os migrate stored-forms` is not green over one, and the action names `PUT /api/v1/meta/form/NAME?package=PKG`. Premise re-measured: rebuilding metadata-protocol with the strip ablated reds 4 cases of the both-doors suite, so main still writes `data`. The PR is Part of, not Fixes, because three things stay open: (1) a decision on forms whose served name ADR-0159 D3 refuses, which cannot be renamed under ruled question 2 (open_questions); (2) the `os migrate meta --stored` fix line (stored-migration.ts servedInvalidFix), which is outside the claimed files; (3) K4, whose source is spec projectViewForms and whose remedy text is in protocol-form-reads.ts, both outside the surface.",
     "files_changed": [
      ".changeset/39393-stored-form-switch-drops-data.md",
      "packages/cli/src/commands/migrate/protocol.ts",
      "packages/cli/src/commands/migrate/stored-forms.ts",
      "packages/cli/src/commands/migrate/stored-forms.test.ts",
      "packages/metadata-protocol/src/protocol-stored-form-39393.test.ts",
      "packages/metadata-protocol/src/protocol-stored-form-apply.ts",
      "packages/metadata-protocol/src/protocol-stored-form-bodies.ts",
      "packages/metadata-protocol/src/protocol-stored-form-migration.ts",
      "packages/rest/src/stored-forms-switch-37112.test.ts"
     ],
     "tests": "At 2e8f486ee: metadata-protocol full vitest 387 files passed / 24005 tests passed; rest --project local 451 files / 9370 tests passed; objectql src/protocol-stored-form-migration.test.ts 38 passed; cli src/commands/migrate/stored-forms.test.ts 5 passed; metadata-protocol src/protocol-stored-form-39393.test.ts 7 passed; rest stored-forms-switch-37112 15 passed. Ablations, each red then green on restore: (a) strip removed from movedFormBody, metadata-protocol rebuilt, ablation-dist-preflight marker present in 2 dist files: rest 4 failed / 11 passed and unit 1 failed / 6 passed; restore rebuilt, marker absent, tree clean, 15/15. (b) apply guard disabled and rebuilt: rest D3 case red, 1 failed / 14 passed; restored and rebuilt, marker absent. (c) `?package=` dropped (src-resolved): unit 1 failed / 6 passed. (d) the censusVerifiesSwitch verdict dropped: cli 1 failed / 4 passed. All ablations went through scripts/ablation-replace.mjs, and each restore was confirmed by blob == HEAD with `git diff HEAD` empty. The cli `--project unit` full layer ran past the foreground limit and was stopped (no failure in the part that ran): NOT-MEASURED, left to CI Test Core.",
     "gates": "Local: typecheck of metadata-protocol, cli and rest, VERDICT command-exit 0. dispatch-gates --commands derived 73 commands at 2e8f486ee. dispatch-gates --ran: '73 derived, 72 run, 1 NOT-MEASURED, 0 UNRUN', exit 0. All 72 run exited 0. Seven needed a second pass: check-plugin-teardown-shape --self-test (shallow clone, fixed by fetching the pinned commit 621a4876); check:i18n, i18n-walk-parity and i18n-coverage (exit 3 until the CLI and examples closures were built); query-options-erasure, slot-lookup and type-check-debt (per-command timeout, re-run longer). The 1 NOT-MEASURED is check:dual-build-cjs-loads: exit 3, PREREQUISITE NOT MET, it needs a whole-workspace build (qa/scenarios dist). check:test-source-alias was red (exit 1) on the two edited test files and is fixed by module-top imports, commit 2e8f486ee. After that commit, re-run at 2e8f486ee: check:nul-bytes, test-source-alias, cross-package-test-inputs, undeclared-dep-imports and check-issue-citations all exit 0. check-platform-checklist --changed-from origin/main: OK, 0 anchors lost. overlap-check before each push: VERDICT clean exit 0. CI on PR #39478 when this report was sent: Lint, Type Check, Check Changeset and PR-body guards in_progress; opt-in dogfood and the 18.x harness skipped. Not read to a conclusion: NOT MEASURED, reason: in progress at report time.",
     "mcp_calls": "0",
     "api_writes": "2 — fleet-write relay stroke fw-20261204T014328Z-d92c4e (pr_create: POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/39478/assignees), and this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/39393/comments); git push x2 not counted",
     "classifier_refusals": [],
     "deviations": [
      "Resume: started from origin/claude/issue-39393-wip@decf1324 (the previous session's two commits kept as written), then merged origin/main 5c00c572 (merge commit 0bbf1c68). The 7 later main commits (to 55d673c6e) were not merged: none touch these packages' sources, and overlap-check merges clean.",
      "protocol-stored-form-bodies.ts (new, not named in the claim): kept. It is a new concern beside the 1,903-line protocol-stored-form-migration.ts (os-dev 1,000-line rule). formBodyOf, destinationRow and switchedOff moved there from protocol-stored-form-apply.ts (456 lines) because the census must compute the exact body the ceremony writes. apply imports migration, so leaving them in apply would create an import cycle. The move is forced by the cycle, not done to make room.",
      "Two test files outside the claimed surface were edited. packages/rest/src/stored-forms-switch-37112.test.ts: the existing case 'the switch moves' a package-less container's member `fsw_inquiry.intake.contact` pinned the write of a row the D3 rule refuses, which this change refuses. Triaged: it now pins the refusal; a container-move-without-data case was added; runSwitch mirrors the command's verdict. packages/cli/src/commands/migrate/stored-forms.test.ts: added the censusVerifiesSwitch pin. Both are test-only. Per the claim's breach clause, please extend the claim surface to these two files.",
      "Not edited despite the card's expected outcome: packages/metadata-protocol/src/stored-migration.ts servedInvalidFix (the `os migrate meta --stored` fix line #39391 D2 quoted, still without `?package=`). The claim says to stop on any other breach, and this is not forced by the change. Hence Part of.",
      "The harness reminder's PR footer form was not used. The AGENTS.md form (rule + session-URL line) was used instead, as AGENTS.md takes precedence. No HTML comment in the body except the required attribution first line."
     ],
     "open_questions": [
      {
       "question": "How should the protocol-19 switch treat a stored form whose served name the D3 naming rule refuses? Example: every member of a package-less stored container on a packaged object is served as OBJECT.CONTAINER.KEY, including fsw_inquiry.fsw_inquiry.contact when the container is named after its object; #39390 O-N7 (app186_note.app186_note_quick.form). Ruled question 2 (ADR-0159) says the migration renames no form, so the card's 'a name the 19 rule accepts' cannot be met literally.",
       "options": [
        "A — Refuse the switch while one stands (what PR #39478 does). Nothing is written, and the census names the row, the site and the schema's words. Cost: the deployment cannot upgrade until the admin deletes the container or re-homes it into the object's package pair on 18.x. The printed action ('correct the form where it is stored') should then name that remedy; small follow-up text work in stored-form-bodies actionFor.",
        "B — Rename to OBJECT.KEY during the move. Cost: overturns ruled question 2, so it needs an ADR-0159 amendment. Action targets, /forms links and withdrawal identity keyed by the old name break unless rewritten. Large and security-adjacent (withdrawal identity).",
        "C — Move it as served (main's behaviour) and list it after the switch as a stored form row served invalid, with the census not green and an action to re-create it under a valid name on 19. Cost: the upgrade completes but the form is unavailable until the admin acts. The verdict narrows: refused names are excluded from the pre-write refusal while still reported. Small code change."
       ],
       "recommendation": "A, with the action text naming the real remedy (delete, or re-save into the object's package pair). Axes: customer data safety — A and C write nothing invalid silently, B rewrites references; reversibility — A writes nothing; contract — A and C keep ruled question 2, B reverses it; upgrade friction — C is lowest, A blocks until fixed. A keeps 'never a switch over a form served invalid' as the card asks, and the blocked case is unusual (package-less container on another package's object). The dispatch carried no decision axes, so these are offered for the seat to replace with the canonical set from pm-dispatch."
      },
      {
       "question": "Extend the claim to packages/metadata-protocol/src/stored-migration.ts so the `os migrate meta --stored` fix line names `?package=` for a package-bound row (any type)? This would close the card's fourth expected outcome on this PR.",
       "options": [
        "A — Extend the surface; a patch round on PR #39478 adds `?package=PKG` to servedInvalidFix, with a pin. About 10 lines.",
        "B — File it separately; PR #39478 stays Part of."
       ],
       "recommendation": "A, because it is the same defect class, mechanical, and the card names it."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "class: a · reach: #39390 D1 measured on published 19.0.0-next.4 through `os migrate protocol --to 19` (a flattened 18.6 view row `{object, viewKind:'form', type, sections}` holds the switch, with the remedy only on 18.x by DELETE and recreate) · evidence: #39390 O-N6/K4; the refusal comes from spec projectViewForms ('a viewKind form item carries no config object') and the hold text from protocol-form-reads.ts, both outside this claim · dedupe words: flattened overlay, viewKind form no config, stored-forms 18.6, protocol switch hold · carrier: #39393 (folded there as K4; not done on this PR)",
      "class: a · reach: #39391 D2 measured `os migrate meta --stored` printing PUT /api/v1/meta/form/showcase_task.form, refused without ?package= · evidence: packages/metadata-protocol/src/stored-migration.ts servedInvalidFix spells PUT /api/v1/meta/TYPE/NAME with no package for every row type · dedupe words: meta --stored fix line, servedInvalidFix, ?package=, served invalid fix · carrier: #39393 (open question 2)"
     ]
    }
  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxRh6Sbfo2Xm49JPx6

    Claim amendment: 2026-12-04T01:47Z · to claim 7394855694
    File surface added: packages/metadata-protocol/src/protocol-stored-form-bodies.ts (reason: a new module beside the 1,903-line protocol-stored-form-migration.ts, forced by an import cycle; dev report 7398203321), packages/metadata-protocol/src/stored-migration.ts (the servedInvalidFix line only: name ?package= for a package-bound row, the card's fourth expected outcome), packages/rest/src/stored-forms-switch-37112.test.ts and packages/cli/src/commands/migrate/stored-forms.test.ts (tests only).
    check-handover.mjs --inflight on the four: meets only this zone's #39392 claim at directory level (its new test file); no named file is shared.
    Still out: K4 (the flattened 18.6 overlay row; spec projectViewForms and protocol-form-reads.ts), and the D3-refused served name, which goes to the seat as a maintainer decision (dev report 7398203321, open question 1). PR #39478 stays Part of #39393 until both are settled.

  8. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxhJCxxgNFHE9Ar94a

    维护者速读

    • 问题:公司从 18 升到 19 时,升级命令会把以前存下的表单搬成新格式。有一种少见的存法(不是在设计界面里新建,而是通过接口把一组表单另起名字、挂到别的应用包的业务对象上,比如给"备注"另存一份"快速录入"),搬过去的名字不符合 19 的命名规则;现在的预发布版会照搬并报"升级成功",之后这张表单一直被标成无效、也改不了。目前只有测试同事手工造出来过一次,没有真实客户撞上。
    • 每个选项一句:拦住——升级前检查点名这张表单并写清怎么改,数据一个字不动,管理员回到 18 把它删掉、按规范名字重建后再升级,整家公司的升级要等这一步(在途的修复已经这样做,另加一轮小改把提示写准);自动改名——管理员无感,但指向旧名字的按钮、链接和"已关停的对外表单"的关停记录都要跟着改,等于推翻上月已定的"升级不改任何表单名",至少三个改动且没有先例;照搬后提示——升级能完成,但库里留下一张新版不认、无法原地修改的表单,只能事后删掉重建,约一个小改动。
    • 推荐与一个理由:拦住。它正是您已定的两条的直接适用("搬不动的行拦住升级,该环境留在原版本"和"升级不改表单名"),出错时是响亮地停下、什么都没写,不会留下带病数据。
    • 不定会怎样:在途修复先按"拦住"继续走;但提示里的修复办法写不准,这张升级缺陷卡收不了尾,19 正式版升级清单上这一项会一直挂着。

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: session_016WV4cxhJCxxgNFHE9Ar94a

    Analysis (for reviewers and agents)

    Background

    The protocol-19 upgrade command (os migrate protocol --to 19 --apply) runs the stored-form ceremony of ADR-0159 D7: every form held in a stored view row is written as a form row "under the name it is served as today", then the switch is recorded. On the published 19.0.0-next.4 two QA runs (#39390 cell U and D1, #39391 S2/D2) found that the moved rows are served valid: false. The main cause (data kept on the body) is fixed by draft PR #39478 and needs no decision.

    One residue does. A stored view container whose package is not the package that owns its object is expanded by the runtime under the container's own name (the "own-name arm" of #21334): its form members are served as OBJECT.CONTAINER.KEY. ADR-0159 D3 requires a form name's prefix to equal its object, so the three-segment name is refused by the form schema. QA's instance is #39390 O-N7: container app186_note_quick on object app186_note, moved to app186_note.app186_note_quick.form, reported invalid at the next boot. The dev report (comment 7398203321, open question 1) asks what the switch does with such a row. The card thread carries no ruling on it (4 comments read: triage 7389360363, claim 7394855694, dev report 7398203321, claim amendment 7398253539).

    Governing text

    • ADR-0159 D3 (docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md:179): "The part before the last segment must equal object; a mismatch is refused at parse. The view item never enforced that equality; the new type does from its first release."
    • ADR-0159 D3, same file line 180: "It is the name every form is served under today … An action's target, a /forms/:name link, a .custom override's key and the withdrawal judgement's identity are all this string. Keeping it means the migration renames nothing, and a withdrawal recorded against a name keeps closing that name."
    • ADR-0159 ruled question 2 (line 482–484): "Ruled: A. … There is no rename: action targets, deep links, stored overrides and the withdrawal identity keep working." and "For the cards. No card renames a form or rewrites a reference to one. … the migration of card ⑤ moves each form under the name it is served as today." Ruling-ref 7131569242 on 表单从 view 拆成独立的 form 元数据类型,对外表单并入(第一步:ADR 与分卡) #36868, the maintainer, 2026-11-24: 「表单拆成独立 form 元数据类型的 5 个合并问题 都同意」.
    • Ruling record 7142585849 on 表单从 view 拆成独立的 form 元数据类型,对外表单并入(第一步:ADR 与分卡) #36868 (2026-11-24), ruling 2, maintainer verbatim 「B:全部放进下一个大版本,升级命令先自动转换、再切换」, recorded reading: "Rows it cannot move stop the switch; that deployment stays on the release it runs."
    • Ruling record 7265816895 on [Decision] What the upgrade to the next major does with a stored form row that is served today at two package addresses of one App (ADR-0159 D7, card #37111) #38661 (2026-11-30), maintainer verbatim 「A 拦住升级·同类全覆盖」: a stored row the ceremony cannot place holds the upgrade, is named by the precheck, and both addresses answer as today.
    • ADR-0159 D7 (line 307): "The administrator makes it on the pre-upgrade release and runs the upgrade command again (7142585849, ruling 2)".
    • grep: grep -n "must equal \object`|No card renames a form|Rows it cannot move" docs/adr/0159-*.md(first two hit; the third phrase lives in the ruling comment, read withgh api repos/objectstack-ai/objectstack/issues/comments/7142585849`).
    • Not covered by any text: the own-name arm itself. grep -c "21334\|OBJECT.CONTAINER" docs/adr/0159-*.md → 0. D3's sentence "the name every form is served under today" was written without this arm; the names it produces are served today and do not satisfy D3.

    Protocol statement, and whether the protocol changes

    The protocol is ADR-0159 D3 plus ruled question 2: a form is named OBJECT.KEY, and the upgrade renames none. Option A changes no protocol (PR #39478 carries Metadata-protocol: none). Option B changes it: it reverses ruled question 2 for one class of rows and needs an ADR-0159 amendment before any code. Option C changes no declared key, but leaves stored form rows that the protocol refuses, written by the platform's own upgrade.

    Premises, each with a re-check command

    1. The own-name arm serves a form member of a container on another package's object as OBJECT.CONTAINER.KEY. Re-check: sed -n 96,118p packages/metadata-protocol/src/protocol-view-expansion-names.ts (const under = \${object}.${ownName}`thenexpandViewContainer(expandAt, source)). Read at 801dda1`: holds.
    2. "Another package's object" means the object's owning package differs from the container's package, so a package-less container and a container saved in a customization pair both qualify. Re-check: sed -n 123,131p packages/metadata-protocol/src/protocol-registry-view-predicates.ts (ownerPackageId !== ownPackageId). Holds. This is wider than the dev report's "package-less".
    3. A form member that the object's package already ships is NOT in this class: it is read under the package's own form name. Re-check: grep -n "formMembersAPackageShips" packages/metadata-protocol/src/protocol-view-expansion-names.ts. Holds; this is why QA run · upgrade:18.6.0-to-19.0.0-next.4 (2/2) · e009d815 · 2026-12-03 · 0 PASS / 1 PARTIAL / 1 FAIL #39391 D2 (a Studio-style re-save of the showcase task container, five shipped forms) previewed "5 to move" with valid names.
    4. The form schema refuses the name. Re-check: grep -n "but the form is bound to" packages/spec/src/ui/view.zod.ts (line 6908). Holds.
    5. PR fix(cli): the protocol-19 switch writes moved stored forms without data, and never switches over a form the form schema refuses #39478 at 2e8f486ee refuses the switch over such a row and writes nothing. Re-check: gh api repos/objectstack-ai/objectstack/pulls/39478 --jq .head.sha and git show 2e8f486ee:packages/rest/src/stored-forms-switch-37112.test.ts | grep -n "apart from its object". Read from the diff (+656/−103, 9 files); the suites were not re-run by this analysis (not measured here; the dev report states 15/15).
    6. On main before the PR, the suite pinned the opposite: "the census counts an open form member of a package-less stored container, and the switch moves it". Re-check: git show 801dda1c:packages/rest/src/stored-forms-switch-37112.test.ts | grep -n "package-less stored container". Holds. So option C is roughly today's behaviour plus a report line.
    7. 18.6 Studio's "new form" writes a view item named OBJECT.KEY, not a container. Re-check at tag @object-ui/console@18.6.0 (commit 958ee035): ui/packages/app-shell/src/views/metadata-admin/anchors.ts, createBuildBody (qualifiedName = \${object}.${key}`, viewKind: 'form'`). Holds by reading; Studio was not driven in a browser (not measured).
    8. A runtime row that fails the schema is registered anyway. Re-check: grep -n "registered anyway (serving availability)" packages/objectql/src/registry.ts. Holds. Whether the form doors then open a name-refused form on 19 was not measured by QA or by this analysis.
    9. A 19 runtime does not boot on an unswitched database, and an 18.6.0 install boots on a database that already took 19's schema migration. Source: QA run · smoke:npm-19.0.0-next.4 (24/24) · e009d815 · 2026-12-03 · 21 PASS / 1 PARTIAL / 2 FAIL / 0 BLOCKED / 0 NOT-RUN #39390 D1 ("exits 1 before listening"; "an 18.6.0 install booted fine on the 19-migrated DB copy"). Measured once by QA, not re-measured.
    10. No example app and no HotCRM path stores this shape. Re-check: grep -rlE "formViews|viewKind: 'form'" examples --include=*.ts → 0 files; HotCRM (/home/user/hotcrm at 63a4c0b, pinned to 19.0.0-next.3) authors forms as form items in source (src/sales/forms/lead.form.ts, src/service/forms/case.form.ts). Source containers take the loaders' OBJECT.KEY names, never the own-name arm. Cloud paths: not measured.
    11. cli: os migrate protocol --to 19 --apply writes stored form rows that keep the old view-form data key (and a name the 19 rule refuses), so every moved form is served valid:false and the printed fix is refused #39393 is "Proposed gating" on the GA tracking card 19.0.0 GA tracking: what must land and what must be tested before the 19.0.0 release (focus: the v18 → v19 upgrade) #38907, not ruled gating. Re-check: gh api 'repos/objectstack-ai/objectstack/issues/38907/comments?per_page=100' --jq '.[].body' | grep -n 39393.

    The concrete question

    When the mandatory 18-to-19 upgrade meets a saved form whose current name the new version refuses, does the upgrade stop and tell the administrator, rename the form itself, or finish and leave a form the new version marks invalid?

    Admin scenario. A company on 18.x has a quick-entry form on a business object that belongs to an installed app. If they made it in Studio ("new form" on the object) it is named after the object and moves cleanly under every option; they notice nothing. The row in question exists only if someone saved a group of views and forms under a name of its own over the API (a script, an integration, an assistant writing metadata, or the raw metadata editor), on an object another package owns, and that group holds a form the app does not ship.

    • Under A: the upgrade command exits 1 before writing, names the row and what to do. The administrator stays on (or reinstalls) 18.x, deletes that group, re-creates each form as its own form named after its object, re-points anything that opened the old name, and runs the upgrade again. Everyone else in the company waits for that; the form and its public address keep working on 18.x meanwhile. The person who notices is the administrator, at the command line, before any user does.
    • Under B: the administrator sees a clean upgrade. A button or link that named the old form now points at nothing unless the upgrade also rewrote it; the first person to notice is an end user, or nobody.
    • Under C: the upgrade completes and reports the row. The form sits in the database under a name the new version refuses on every save, so it cannot be edited in place; the fix is delete and re-create, on 19. Who notices depends on whether anyone reads the report.

    Options × real cost × workload

    Option What it does What the customer feels Workload
    A — refuse the switch while such a row stands Census names the row, the site and the remedy; nothing is written; the deployment stays on 18.x One saved form blocks the whole upgrade until an administrator deletes and re-creates it on 18.x; no data is touched; the remedy is a manual rename, done knowingly Lane domain:server (em-upgrade) · 0 new PRs: carried by draft PR #39478 (+656/−103, 9 files, not landed) plus one patch round for the action text and one ADR-0159 D7/D3 note · precedent for the hold mechanism: #38613 (+4236/−32, landed); for a small census follow-up: #38803 (+157/−1, landed)
    B — rename to OBJECT.KEY during the move The upgrade picks a new name and must rewrite action targets, /forms/:name links, override keys and the withdrawal identity Invisible when it works; when a reference is missed, a button opens nothing or a switched-off public form's closure no longer matches its name; collisions when OBJECT.KEY is already taken need a second rule Lane domain:server + spec/ADR · at least 3 PRs (ADR-0159 amendment, rename + collision rule, reference rewrite with security pins) · 「无先例」: ruled question 2 says "No card renames a form or rewrites a reference to one", and no landed PR does
    C — move as served, report after the switch The upgrade writes the row under the refused name and lists it as served invalid; census not green Upgrade completes; one form is marked invalid and cannot be saved again under its name; fix is delete and re-create on 19; whether it still opens meanwhile is not measured Lane domain:server · 1 PR (narrow the pre-write refusal, re-pin the #37112 case a third time) · 「无先例」 for a census class that is reported but not held; the dev's "small" is an estimate, not a measurement

    No fourth option is added. A is refined in one respect: the action text must name a remedy that works (see confidence gaps on the dev's "re-home into the pair").

    Business meaning per option

    • A: a moving company that will not load a crate it cannot label; the customer relabels it and the truck comes back. The delay is visible and nothing is lost.
    • B: the moving company relabels the crate itself and promises to update every address book that pointed at it. It is the convenient outcome only if every address book is found, and one of those address books is the list of public forms the customer deliberately closed.
    • C: the crate is delivered with a label the new building's front desk refuses to register. It is in the building, nobody can file paperwork on it, and the customer learns of it from a delivery note.

    Four-axis argument

    ① Long-term soundness (carries at least half the weight). Two years out, a form on this platform has exactly one name, OBJECT.KEY, the name every button, link, override and public-form closure addresses, as a Salesforce layout or a ServiceNow form is addressed by its table plus one key. The upgrade is the one moment the platform can guarantee that every stored form satisfies that rule. A keeps the guarantee whole: after the switch no database holds a form the rule refuses, and the upgrade tool never writes one. It also adds no special case; it applies the stopping rule already ruled twice ("rows it cannot move stop the switch", 「A 拦住升级·同类全覆盖」) to one more cause. C makes the platform the author of rule-breaking rows on day one of the new type, and every later reader of forms must keep tolerating a three-segment name forever, which is contract growth by tolerance. B shrinks the population of odd names, which is attractive, but it does so by reopening a ruled contract point inside a migration and by inventing a rename-and-rewrite mechanism the platform has nowhere else. On this axis alone: A.

    ② Actual business pull. Measured pull is one hand-built QA fixture (#39390 O-N7, which the QA author graded "weak … on an unusual fixture"). 18.6 Studio's own "new form" path produces a conforming name (premise 7), a Studio re-save of an app's shipped forms conforms (premise 3), and no example app or HotCRM stores the shape (premise 10). The shape needs an API-level save of a custom-named group on another package's object. There are no production customers yet (team-memory rule, maintainer, 2026-11-14: no legacy-data migrations inside fixes while that holds; not in the repo, taken as context, and no ruling on this card's thread contradicts it). That rule does not touch the ceremony itself, which the later rulings of 2026-11-24 ordered, but it speaks directly against B: B is extra legacy-data migration machinery for a row no customer is known to hold. Near-zero pull says spend the least and keep the door closed: A, which is already built.

    ③ Protection against AI mistakes. The realistic author of this row is a script or an assistant writing metadata over the API. Under A the mistake ends in a loud refusal at the command line, naming the row, before anything is written; the administrator sees it, no user does. Under C the upgrade says it completed and the invalid row is one line in a report plus a boot warning; that is the silent-tolerance pattern in which bulk mistakes hide, and the row can never be corrected in place. Under B the failure mode is the quietest and the worst: a missed reference is a dead button, and a missed withdrawal identity is a public form whose closure no longer matches. Loud beats silent: A.

    ④ Startup-stage focus. A adds no key, no mechanism and no new CI gate (the refusal is a product behaviour under an existing ruled rule, not a gate; 「新增门禁默认否」 is not engaged). C adds a permanent census class "written but invalid" and a permanent obligation to tolerate it. B adds a rename engine, a collision rule and a reference rewriter. A is the smallest surface.

    os-decision-facets
    ① Long-term soundness: A keeps "every stored form is OBJECT.KEY after the switch" with no new special case; C adds a tolerated invalid class; B reopens a ruled contract point and adds a rename mechanism.
    ② Actual business pull: one hand-built QA fixture, no Studio path, no example app, no HotCRM, no production customer; zero pull, so no new machinery.
    ③ AI-error protection: A is a loud refusal before any write; C is a completed upgrade with an invalid row in a report; B fails silently in references and in public-form closure identity.
    ④ Startup focus: A adds nothing declared; C and B each add a permanent obligation.
    Prior rulings read: stored form,protocol switch,object.key,rename form,package-less container,served name → 2 hits; ADR-0159 D3, D7 (ruled question 2; ruling records 7131569242, 7142585849, 7265816895); thread: none

    Recommendation

    A — refuse the switch while such a row stands, with the action text corrected to name the remedy that works.

    Existing rulings already point here, and this analysis reads the question as their application rather than a new product fork: ruled question 2 forbids the rename (B), and ruling 2 of 7142585849 says a row the upgrade cannot move stops the switch (A, not C). It is still presented for a word because the own-name arm was not in front of the maintainer when either ruling was given, and the card's expected outcome "a name the 19 rule accepts" cannot be met literally.

    Options not taken:

    • B: reverses a maintainer ruling (「⛔ 不推翻既有维护者裁决」), moves the identity that public-form closures match on (security-boundary, human floor), is hard to reverse once references are rewritten, and has zero measured pull.
    • C: the platform's own upgrade would write rows its own schema refuses, contrary to the card's "the census not green over rows served invalid" and to the recorded reading of ruling 2; the mistake becomes quiet and permanent.

    Confidence gaps (stated, not a reason to recommend otherwise):

    • The dev report's remedy "re-home it into the object's package pair on 18.x" could not be verified, and code reading contradicts it: a container saved in the pair is still on another package's object (premise 2), and the shipped-form mapping applies to package-less rows only, so it would still be served as OBJECT.CONTAINER.KEY. The remedy this analysis can support by reading is: on 18.x, delete the container and re-create each form as its own form named OBJECT.KEY (the shape 18.6 Studio creates and the ceremony moves). That path was not run end to end for this shape; QA ran delete-and-re-create on 18.6 only for the neighbouring K4 shape.
    • The dev report's cost line for C, "the form is unavailable until the admin acts", is not established: the registry registers an invalid row anyway (premise 8). Whether the form still opens was measured by nobody.
    • The dev report says "package-less"; the class is wider (any stored container whose package is not the object's owner). The PR's refusal is by schema verdict, so it covers the wider class; the wording of the action and of the ADR note should not say "package-less" only.
    • Rollback cost under A is real: a 19 runtime does not boot unswitched, so the administrator must run 18.x again to fix the row. That this works on a database that already took 19's schema migration was measured once (QA run · smoke:npm-19.0.0-next.4 (24/24) · e009d815 · 2026-12-03 · 21 PASS / 1 PARTIAL / 2 FAIL / 0 BLOCKED / 0 NOT-RUN #39390 D1), on a file database.
    • How many 18.x deployments hold such a row: no data. The Studio raw metadata editor and assistant-written metadata on 18.x were not measured as sources.
    • PR fix(cli): the protocol-19 switch writes moved stored forms without data, and never switches over a form the form schema refuses #39478's suites were not re-run here; CI on the PR was in progress when the dev report was sent.
    • ADR-0159's status line still reads "Proposed" while carrying recorded rulings; the prior-rulings script flags it.

    只看①选 A;②③④ 是否翻转:否

    After the ruling

    PR #39478 is proceeding on A meanwhile; nothing below waits for the ruling except the wording and the ADR note.

    Related issues and PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:packagebugdomain:serverpm:dispatchedpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions