feat(sdui-parser): port objectui's one base-prop list into the save gate - #20799
Conversation
… where-undeclared scopes) into the save gate Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
📓 Docs Drift CheckThis PR changes 1 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 8 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 4519e4ce745df42d23e801734bc34cd2189a0f45 && git checkout 4519e4ce745df42d23e801734bc34cd2189a0f45
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 96e724475c476d018c2b6d13dcd117ade14d0aa0 5cb34e77dc619f0bbed84983d96e127652f73136 && git checkout -B drift-repro 96e724475c476d018c2b6d13dcd117ade14d0aa0 && git merge --no-ff 5cb34e77dc619f0bbed84983d96e127652f73136
node scripts/docs-audit/affected-docs.mjs --json 96e724475c476d018c2b6d13dcd117ade14d0aa0
|
Contract reviewServed-tier: ① Derived judgments
② Semver levelMeasured on the tracked ③ Boundary flags
Implemented-by: VERDICT: FAIL Required fixes:
|
…t declared base attributes, as objectui does Claude-Session: https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #20578
Clause-②: yes (widening)
What
Ports objectui's one base-prop list into the save gate, at the console pin
db11afd4967c(objectui#11008 forbind/hidden, objectui#11044 for the single list). objectui anchors:packages/sdui-parser/src/validate.ts:137(SDUI_BASE_PROPS, docblock:60-136, skip:213) andpackages/sdui-parser/src/codegen.ts:13-32,:95-110.validate.ts:BASE_PROPSis now theevery-nodemembers of a 20-entry list: the 9 existing plusbind,hidden,visibleWhen,hiddenOn,testId. Sixwhere-undeclaredmembers (name,label,description,placeholder,data,ariaLabel) skipunknown-proponly when the type declares no input of that name; a declared one keeps itstype-mismatchcheck.codegen.ts:generateDtsemitted a hand-keptexport interface SduiBaseProps(public throughindex.ts). It is now emitted from the same list, and a component that declares a base attributeOmits it from the base it extends. This is the second consumer of the list, so it is exported fromvalidate.tsforcodegen.tsand is not re-exported fromindex.ts.codegen.tsemits no base-props interface. That was false; the second commit fixes the code and thevalidate.tsLOCKSTEP paragraph.html-tier-manifest.test.tsnow expectsAProps extends Omit<SduiBaseProps, "className">, the same string objectui pins inhtml-tier-manifest-10735.test.ts:114.Clause-② measurement
Scanned every component's
inputsin the trackedsdui.manifest.json(107 components).every-node:bind,hidden,visibleWhen,hiddenOn,testIdare declared by 0 components each, so no declared type check is removed.where-undeclared:name3,label10,description6,data7,placeholder0,ariaLabel0 declaring components. The skip is guarded by!byName.has(key), so a declared key takes the same path and severity as before.unknown-propwarning; no error-severityvalidateTreediagnostic is removed.SduiBasePropsgoes from 8 members to 19, so a.tsxpage authoringbind,hidden,visibleWhen,hiddenOn,testId,name,label,description,placeholder,dataorariaLabelon a tag that does not declare it was a TypeScript error againstgenerateDtsoutput before and compiles now. That widens the accepted authoring surface and the published type output, henceyes (widening)and aminorchangeset.Tests
base-props-one-list.test.ts: each of the 13 attributeevery-nodemembers draws nounknown-prop; the list is pinned entry by entry (20 entries,typealone with no attribute type); each of the 6where-undeclaredkeys draws nothing when undeclared; a declaredlabelgiven a number still drawstype-mismatch; a non-base key is stillunknown-prop; the emittedSduiBasePropsequals the list's attribute entries in order; a component with no declared base attribute extends the whole base and one declaringlabelextendsOmit<SduiBaseProps, "label">.typeis not tested throughvalidateTree: on a node it is the tag itself, so any such case passes throughunknown-component.pnpm --filter @objectstack/sdui-parser exec vitest run: 13 files, 224 tests passed;typecheckexit 0 (os-verify-lock,VERDICT command-exit 0)..d.tsor golden file for this output exists in the repo outsidepackages/sdui-parser/(grep forSduiBasePropsandgenerateDts).Gates (head
5cb34e77dc)dispatch-gates --commandsderived 61 families; 56 ran and exited 0, includingcheck:sdui-lockstep,check:published-files,check:query-options-erasure,check:type-check-coverage,check-changeset-no-major,check:doc-authoring,check:nul-bytes. NOT MEASURED, exit 3 PREREQUISITE NOT MET (need a builtdist/, left to CI):check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content,check:type-check-debt. The earlier body's count of 52 was wrong.Acceptance notes
None outside the card.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv