chore(spec): ratchet react-block spec↔frontend conformance at console-build time (ADR-0081)#2485
Merged
Merged
Conversation
…-build time (ADR-0081) Wire the spec↔frontend react-block conformance check in as a baseline ratchet at the one place the registry-inputs manifest is produced for free — `scripts/build-console.sh`, right after it dumps `sdui.manifest.json`. Running it on every framework PR isn't worth it (the manifest only exists at console-build time); the ratchet catches NEW divergence there at near-zero marginal cost. - check-react-blocks-conformance.ts gains `--baseline <path>` (compare, report only regressions: a component exposing a NEW undocumented prop or a previously-present block vanishing) and `--update` (accept current as the new baseline). The soft spec-only signal is not gated. `--strict` exits 1 on regression. - packages/spec/react-conformance.baseline.json captures the accepted state (ListView frontend-only fields/options, ObjectChart data; rest clean after #2113/#2484). - build-console.sh runs the ratchet warn-only after the dump — never fails the console build, surfaces new divergence at the release point. - audit doc documents the ratchet + how to re-accept the baseline. 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
…a/fields/options (ADR-0081) (#2488) The conformance ratchet (#2485) accepted three frontend-only props in its baseline: ObjectChart `data`, ListView `fields`/`options`. These aren't real divergence — they're legitimate binding escape-hatches the component accepts that the spec schema simply doesn't model (static chart data; a simplified column list; a per-viewType options bag). The fix for "component accepts a prop the contract doesn't document" is to document it, not to leave it as accepted noise. - Add `data` (ObjectChart), `fields` + `options` (ListView) to the react-blocks overlay as `binding` props with honest descriptions, so the AI-facing contract (react-blocks.md / .contract.json) now declares them. - Regenerate the contract artifacts and the conformance baseline: every block is now 0 frontend-only. The ratchet is noise-free — any future frontend-only prop is a real, actionable signal rather than sitting in an accepted baseline. No public API-surface change (overlay entries, not new exports). Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Wires the spec↔frontend react-block conformance check in as a baseline ratchet at the one place the registry-inputs manifest is produced for free:
scripts/build-console.sh, right after it dumpssdui.manifest.jsonfrom the freshly-built console registry.Running the full conformance check on every framework PR isn't worth it — the manifest only exists at console-build time. So instead of taxing every PR, the ratchet catches new divergence at that point at near-zero marginal cost.
How
check-react-blocks-conformance.tsgains:--baseline <path>— compare the current dump against a committed baseline and report only regressions: a component exposing a NEW undocumented prop, or a previously-present block vanishing. The softspec-onlysignal is not gated.--update— accept the current frontend state as the new baseline (after an intentional change).--strict— exit 1 on regression (default is warn / exit 0).packages/spec/react-conformance.baseline.json— the accepted state (per block: frontend-only prop set + missing flag). Current baseline:ListViewfrontend-onlyfields/options,ObjectChartdata; everything else clean after docs(security): RLS predicates SQL → canonical CEL + fix non-compilable examples #2113 (record:* inputs) and feat(spec): complete FormView protocol with form-presentation props (conformance) #2484 (object-form presentation props).scripts/build-console.sh— runs the ratchet warn-only after a successful manifest dump. Never fails the console build; surfaces new divergence at the release point.Verification
--baselineagainst the same manifest →✓ no new divergence.list-viewinput → ratchet flags<ListView>: new frontend-only prop(s) not in baseline: bogusNewProp;--strictexits 1, default warn exits 0.bash -n scripts/build-console.shclean;@objectstack/spec buildgreen.No public API-surface change (scripts + committed baseline + docs only).
🤖 Generated with Claude Code