Skip to content

refactor(ui)!: the renderer runs @objectstack/sdui-parser; delete @object-ui/sdui-parser (#25712 2g PR 2) - #26343

Merged
objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-hrsgde
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-hrsgde

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #25712 (item 3 = 2g, PR 2 of 3: rewrite the importers onto @objectstack/sdui-parser and delete ui/packages/sdui-parser; Tier H: over 3000 lines, and skills/**).
Part of #25677.

Clause-②: yes (narrowing: a type-mismatch or member-type-mismatch the html-tier compile used to grade warning is now an error, so a page that carried one now refuses to compile instead of rendering with the value dropped)
Metadata-protocol: none

维护者速读(草稿)

  • 改了什么:
    • 按 2g 裁定(6418729849,E+B),ui 里所有对 @object-ui/sdui-parser 的引用改为 @objectstack/sdui-parser,包括 import、package.json 依赖、vite/vitest 别名和 tsconfig 路径。
    • 删除 ui/packages/sdui-parser(不发转发版本),并把它移出 changesets 的 fixed 组。
    • gen-manifest.ts 移到 ui/apps/console/scripts/。PR 1 留下的 5 个测试搬到各自归属的包。
    • ui 里按包数计数的几个门禁同步减一。manifest 记录不再包含这个包。
  • 哪些原来能渲染的现在会报错: 渲染器原来那份解析器只在 enum 旁把类型不符判为 error,其他情况只给 warning。现在统一按保存门的规则判为 error。所以 html 层页面里属性类型写错(例如 columns='["name","amount"]',而 columns 声明为数组)会显示编译错误块,不再静默丢掉这个值。保存门本来就拒绝这种页面,所以经保存门保存的页面不受影响。
  • 为什么改: 两份解析器只剩一份,渲染器和保存门跑同一套代码。PR 3(chore(sdui-parser): retire the objectui lockstep gate and its vendored record #26221)和 PR 1(feat(sdui-parser)!: one parser body in @objectstack/sdui-parser (#25712 2g PR 1) #26211)已经合入。
  • 风险与代价(含回滚): 约 8400 行变更,其中约 7000 行是删除(被删的包和锁文件)。回滚 = revert 本 PR。合入后 npm 上的 @object-ui/sdui-parser 停在 18.1,18.2 之后由维护者执行 npm deprecate。
  • 需要你确认的一件事: 两个待发布的 changeset(25831-object-ui-18-1-to-merge.md、26276-ui-package-test-vitest.md)原本列着 @object-ui/sdui-parser。包删掉后,changeset version 遇到不存在的包会失败,所以本 PR 删掉了这两行。check-empty-changeset 把这种改动当作需要人确认的「主动更正」,会一直是红的,直到你确认。
  • 你要做的: 确认上面两行删除,然后批准(Tier H)。

席位核对

(left for the dispatch seat)

Why

Ruling 6418729849 on #25712 keeps @objectstack/sdui-parser as the one parser, deletes ui/packages/sdui-parser with no forwarding release, and takes @object-ui/sdui-parser out of the fixed group. The maintainer deprecates the npm package after 18.2. PR 3 (#26221, lockstep gate retired) and PR 1 (#26211, one body in @objectstack/sdui-parser) are on main. This PR moves the renderer onto that body and deletes the second copy.

What changes

Importers (no behaviour of their own).

  • Every @object-ui/sdui-parser import, package.json dependency key, vite alias (console, console-starter, plugin-editor, plugin-markdown, runner), the ui/vitest.config.mts alias and the ui/tsconfig.json paths now name @objectstack/sdui-parser, which resolves to the root packages/sdui-parser.
  • No importer uses the deprecated SchemaNode / ValidationResult aliases.
  • Kept on purpose:
    • the Symbol.for('@object-ui/sdui-parser.html-tier-node') registry key, which is the cross-instance contract;
    • the MIT "moved in from @object-ui/sdui-parser" notices;
    • CHANGELOGs and dated QA notes.

Deleted: ui/packages/sdui-parser (32 files).

Moved:

From To
ui/packages/sdui-parser/scripts/gen-manifest.ts ui/apps/console/scripts/gen-manifest.ts (its only caller is emit-sdui-manifest.ts)
…/__tests__/render.test.tsx, inline-whitespace.test.tsx, injected-component-input-6950.test.ts ui/packages/react/src/__tests__/sdui-* (they import ../SchemaRenderer, not @object-ui/react, per check-package-self-import)
…/__tests__/spec-symbol-batch7.test.ts packages/lint/src/sdui-spec-symbol-batch7.test.ts
…/__tests__/dashboard-widget-options-census.test.ts ui/packages/plugin-dashboard/src/__tests__/ (leg 4 no longer counts the ui copy)

@object-ui/react gains @objectstack/sdui-parser as a devDependency for the re-homed tests.

Guards that counted the package:

  • package floors drop by one:
    • package-files-exist: owing floor 38→37;
    • side-effects-declaration-consistency: 29→28 and false 12→11;
    • check-dist-completeness: tsc floor 12→11;
    • QUICK_REFERENCE.md: 37→36 published packages;
    • check:lockstep-package-count: 111→110 in backward-compatibility.mdx and publish-smoke-pack.mjs.
  • turbo.objectui.json drops the 10 build inputs that pointed at the deleted package.
  • select-type-check-scope's fixture now uses a live file.
  • check-type-check-coverage drops the deleted scripts directory.
  • The cli workspace-vite alias list drops the package.
  • ui/.github/labeler.yml drops its rule.
  • .changeset/config.json removes it from the fixed group.

Relative reads re-rooted to the root parser:

  • designerRegistrationInputs-11434;
  • body-dialect-children-arm-7181;
  • component-input-retired-keys-7493;
  • unconsumed-widget-option-claim-6186;
  • the ui/README.md link, which is now a GitHub URL because check-doc-links treats ui/ as its root.

Severity pin. htmlTierColumnSpellings-6598 form 2 (a JSON string where columns is declared array) moves from "the block's defaults render" to "fails loudly". The page now shows the compile error naming columns. The test's invariant, "never the reported state", holds either way.

Manifest record. node scripts/gen-sdui-manifest-node.mjs drops scripts/sdui-manifest.sources/sdui-parser.json ("no longer reached") and re-records components, core, plugin-dashboard and types. sdui.manifest.json is byte-unchanged (106 components, sha256 1f6e1ccb925a…).

Pending changesets. 25831-object-ui-18-1-to-merge.md and 26276-ui-package-test-vitest.md each lose their '@object-ui/sdui-parser' line, and nothing else changes. Without the edit, changeset version fails on a package that is not in the workspace. This is the DELIBERATE CORRECTION class of check-empty-changeset, so that gate is red until a maintainer confirms the two deletions.

Verification

Head 7fd87174 on main 62941574. 185 paths: +1182 / −7242 lines (8424), of which the deleted package and the lockfile account for −7007. Governed: skills/** ×1 (skills/objectui/README.md, one line) and over the 3000 human-merge line.

  • Derived gates: node scripts/pm/dispatch-gates.mjs --commands derives 137. All 137 ran:
    • 136 exit 0;
    • check-empty-changeset exits 1 for the reason above;
    • 119 ran on 90f44cec. The 18 families added by the check:lockstep-package-count --fix commit, plus that gate, ran on 0b13f123, whose tree equals 7fd87174. Only the commit message was reworded.
    • --ran reconciles 137 derived, 137 run, 0 NOT-MEASURED, 0 UNRUN.
  • ui vitest:
    • On this head: the 83 changed or importing test files, 1663 tests, all pass.
    • On the pre-rebase tree (the same change on PR 1's head), the whole unit project ran: 1643 files and 31054 tests. Every red was fixed in this diff, except the 47→48 ObjectSchema key pin, which main already carries.
    • Also on the pre-rebase tree: dom-heavy passed 35 of 35 files, and dom shards 1–3 of 4 passed 2914 files. Shard 4 was cut off by the local time limit, and CI's 16 shards cover it.
  • Push battery (GITHUB_ACTIONS=true GITHUB_EVENT_NAME=push node scripts/pm/check-dispatch-gates.mjs) on 7fd87174: ✓ dispatch-gates self-test: 2164 cases pass, exit 0.
  • 2i overlap: 2i PR A (ci(ui): regenerate the SDUI manifest in Build & E2E UI and compare it with the committed bytes (#26137 PR A) #26315) touches the ui filter and the manifest prose, so whichever lands second rebases.

Changeset

.changeset/25712-renderer-runs-one-sdui-parser.md: a patch for the 13 published @object-ui/* packages whose dependency moved, with the Clause-② narrowing above and an ADR-0087 not-required (no-migration-prescription) marker.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm

…ject-ui/sdui-parser

2g PR 2 (ruling 6418729849, E + B). Every ui importer, package manifest,
alias and tsconfig path now names @objectstack/sdui-parser, and
ui/packages/sdui-parser is deleted with no forwarding release. It leaves
the changesets fixed group. gen-manifest.ts moves to
ui/apps/console/scripts/. The five tests PR 1 left behind are re-homed.
The ui guards that counted the package drop it, and the manifest record
no longer reaches it.

Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests tooling labels Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/sdui-parser, @objectstack/spec, touching 11 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/sdui-parser/src/dashboard-widget-options.ts, packages/sdui-parser/src/index.ts, packages/spec/liveness/page.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/automation/flows.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/data-modeling/field-types.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/data-modeling/fields.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/data-modeling/formulas.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/data-modeling/schema-design.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/data-modeling/validation-rules.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/deployment/environment-variables.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/protocol/objectui/concept.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/protocol/objectui/layout-dsl.mdx (via visibleOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), visibleOn (literal, a string literal in SDUI_BASE_PROPS), visibleWhen (literal, a string literal in visibleOn))
  • content/docs/ui/pages.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/ui/public-data-collection.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/ui/views.mdx (via visibleOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), visibleOn (literal, a string literal in SDUI_BASE_PROPS), visibleWhen (literal, a string literal in visibleOn))

⛔ 12 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/implementation-status.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v12.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v15.mdx (via visibleOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), visibleOn (literal, a string literal in SDUI_BASE_PROPS), visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v16.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-0.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-2.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-4.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-5.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-6.mdx (via hiddenOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), visibleOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), hiddenOn (literal, a string literal in SDUI_BASE_PROPS), visibleOn (literal, a string literal in SDUI_BASE_PROPS), visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v17/17-7.mdx (via visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v18/18-0.mdx (via visibleOn (symbol, a field of const object RETIRED_VISIBILITY_DIALECTS), visibleOn (literal, a string literal in SDUI_BASE_PROPS), visibleWhen (literal, a string literal in visibleOn))
  • content/docs/releases/v18/18-1.mdx (via visibleWhen (literal, a string literal in visibleOn))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/sdui-parser/src/dashboard-widget-options.ts, packages/sdui-parser/src/index.ts, packages/spec/liveness/page.json) — pages documenting those are invisible to this run
  • the SDK route bridge reached 55 of 207 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 146 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 2163e80629578bb3518b5455fbca04d66696ba94 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 916c7a57709954c1b27d9ac3b3c24840fb981ac8 — the merge of head 9cd30dc4a9b58c05644b887a0643394be0505191 into base 2163e80629578bb3518b5455fbca04d66696ba94, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 916c7a57709954c1b27d9ac3b3c24840fb981ac8 && git checkout 916c7a57709954c1b27d9ac3b3c24840fb981ac8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2163e80629578bb3518b5455fbca04d66696ba94 9cd30dc4a9b58c05644b887a0643394be0505191 && git checkout -B drift-repro 2163e80629578bb3518b5455fbca04d66696ba94 && git merge --no-ff 9cd30dc4a9b58c05644b887a0643394be0505191

node scripts/docs-audit/affected-docs.mjs --json 2163e80629578bb3518b5455fbca04d66696ba94

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 2163e80629578bb3518b5455fbca04d66696ba94 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

The re-homed test compiled under the ui tsconfig, which does not set
noUnusedLocals. packages/lint's tsconfig.test.json does, so the seven
function-local `type _X = Assert<...>` pins read as unused (TS6196) and
check:test-typecheck refused the file. Exported at module level they are
used, and each still bites: flipping one expectation fails with TS2344.

Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
Co-authored-by: Claude <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review October 26, 2026 22:49
@os-zhuang
os-zhuang enabled auto-merge October 26, 2026 22:50
#26274 retired the node-level visibleOn / hiddenOn / disabledOn spellings
and edited the ui copy of the parser, which this branch deletes. Its
parser half is carried onto packages/sdui-parser so it is not lost:
the three leave SDUI_BASE_PROPS, validateTree answers each with an
unknown-prop naming the canonical key, retired-visibility-dialects.ts
moves in with its MIT notice, and base-props-one-list-11044 takes the
same test edits. The pending changeset 25926 names
@objectstack/sdui-parser, where that behaviour now ships.

Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
Co-authored-by: Claude <noreply@anthropic.com>
…alects

base-props-one-list.test.ts listed visibleOn / hiddenOn / disabledOn
among the every-node members. With #26274 carried onto this parser they
are no longer base props: each draws one unknown-prop naming its
canonical key, and the list is 17 entries.

Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
Co-authored-by: Claude <noreply@anthropic.com>
The PR declares `Metadata-protocol: none`, so check-changeset-no-major
requires every entry it introduces or changes to be `patch`. The fixed
group already carries the minor from @object-ui/types.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
@os-zhuang
os-zhuang enabled auto-merge October 27, 2026 01:16
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Batch #405 governed-draft line · maintainer 「同意」 2026-10-27T01:17Z

Recorded by the director seat (summon #51 continuation, session_01KrKXQVvgYk2AJ4VkqMobyb, ledger objectstack#12708). This PR was presented to the maintainer in batch #405 as the governed-draft line (Tier H: over 3,000 lines and skills/**; Clause-② narrowing — an html-tier page whose attribute type is wrong now shows a compile error instead of silently dropping the value). The line put one thing to the maintainer: the DELIBERATE-CORRECTION red on Check Changeset — the two pending changesets 25831-object-ui-18-1-to-merge.md and 26276-ui-package-test-vitest.md each lose their '@object-ui/sdui-parser' line because the package no longer exists in the workspace. The maintainer's reply to the batch was 「同意」. That word is recorded here verbatim as the confirmation the gate's human path asks for ("say so on the PR … and get it confirmed"): the two deletions are confirmed, the lines are not restored. The gate stays red by design and is not a required context.

What 「同意」 is not: it is not an APPROVED review and nothing on this PR changes by it. os-zhuang's approval (22:48Z) is on 76d26aec; the head is 96739554, six commits later (two merges of main, manifest re-records, one changeset grade); the required checks are still running on it at this stamp. The landing act stays the maintainer's: an APPROVED review on the current head by os-zhuang or hotlong once the required checks are green. This seat's account is an approver and submits no review. needs-user-decision leaves the PR in this act; the box item is answered.

main retired the per-package SDUI manifest records (scripts/sdui-manifest.sources/);
this branch's re-records of those files resolve as deletions.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xe3LjBvLrRVA6dmFUEGskm
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 27, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft October 27, 2026 01:44
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 01:57
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 01:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 80f267d Oct 27, 2026
65 of 66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-hrsgde branch October 27, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants