feat(spec): spec↔frontend conformance check for react blocks (+ first audit)#2480
Merged
Conversation
… audit) Confirms whether objectui components actually implement the props the spec protocol declares (the gap raised in review). check-react-blocks-conformance.ts compares the spec schemas referenced by REACT_BLOCKS against the live objectui registry-inputs manifest (sdui.manifest.json) and reports matched / spec-only / frontend-only props per block. First run (docs/audits/2026-06-react-blocks-conformance.md): 79 spec-only, 17 frontend-only, 0 missing — they DO diverge. Actionable: object-form's frontend- only formType/drawer*/modal* are real component extensions absent from the spec; the record:* blocks declare zero designer inputs. Report-only for now (run with --strict + a CI console-dump to ratchet once triaged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
added a commit
that referenced
this pull request
Jun 30, 2026
Records the model that the spec↔contract↔conformance↔prop-gate work converged on (now implemented + merged across framework #2478/#2480/#2482/#2484/#2485/#2488/ #2489 and objectui #2113/#2115), so future contributors don't re-litigate it: - the spec zod schema is the protocol source of truth; the AI-facing contract is GENERATED from it (zero-drift), never hand-authored; - registry inputs are the designer palette (a curated subset) — spec-only is a soft signal, frontend-only is the actionable one; - React-interaction props (callbacks/controlled/binding escape-hatches) live in a thin overlay, not the spec; declaring a genuine binding there is how a frontend-only prop is closed (baseline now 0 frontend-only); - conformance is a build-time baseline ratchet (build-console.sh, warn-only), not a per-PR gate — the manifest only exists at console-build time; - authoring correctness is a hard gate at os validate (missing-required = error, typo = warning); and the dogfood golden page proves the chain closes. Captures the alternatives rejected (copy props into spec / per-PR hard gate / hand-authored contract / registry-as-source). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the review question: we can't guarantee the frontend components actually follow the backend protocol — should we confirm it? Confirmed — they diverge.
packages/spec/scripts/check-react-blocks-conformance.ts— compares the spec schemas referenced byREACT_BLOCKSagainst the live objectui registry-inputs manifest (sdui.manifest.json), reporting matched / spec-only / frontend-only props per block. Run:MANIFEST=… pnpm --filter @objectstack/spec check:react-conformance(--strictto fail).docs/audits/2026-06-react-blocks-conformance.md— the first run + how to read it.Finding: 79 spec-only, 17 frontend-only, 0 missing. The reliable, actionable divergence is frontend-only —
object-formexposes formType / drawer* / modal* / split* that the spec'sFormViewSchemadoesn't declare;object-chartdiffers fromChartConfigSchema; therecord:*blocks declare zero designer inputs. (spec-only is softer — the registry inputs are a designer-palette subset of the protocol, read in full at render.)For an ADR: there's no single machine-readable 'authoritative component prop surface' today (spec=protocol, registry inputs=palette subset, React types=impl), and nothing keeps them in lockstep. Recommendation: spec = source of truth; add genuine frontend-only props to the spec; ratchet this check in CI (with a console manifest dump).
This is the conformance-first step; the AI-source prop-validation gate follows on the now-trustworthy contract. Report-only for now (no hard gate while 79 divergences are triaged).
🤖 Generated with Claude Code