GeezerVison is showing github.com — feat(id-render): assertion half of stage 2 — consume the #5850 vocabulary (#12836) by dezren39 · Pull Request #12857 · developing-today/code
Conversation
dezren39
commented
Nov 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Discharges the #5855 assumption A2 deferral — the unblocked remainder of #7918, filed as #12836. The assert slot is no longer carried opaquely: the #5850 assertion vocabulary is consumed as versioned data, stage 2 validates the slot against it, stage 3 composes it, and all three targets lower and account for it.
- New data module
src/assertion_vocabulary.rs — the id: design: style assertion vocabulary (from #5679) #5850 vocabulary transcribed as data (the crate's table idiom, id: design: rendering pipeline & conformance suite (from #5679) #5855 invariant 6): the closed dimension set of §2 (tone, emphasis, density, text, gap, pad, corner, elevation), colour roles §3, typography roles §4, spacing/density/corner/elevation §6, stamped ASSERTION_VOCABULARY_VERSION = "1". It also carries the slot grammar (comma-separated dimension token pairs, transcribing §2's (dimension, role-value) model) and the suggestion heuristic in the id: design: semantic markup vocabulary v1 (from #5679) #5849 §3.2 idiom. No pipeline branches on vocabulary content.
- Stage 2 (validate.rs) — the slot is checked per element: unknown dimension/token fails with nearest-name suggestions; a raw value fails under id: design: style assertion vocabulary (from #5679) #5850 invariant 1; a dimension asserted twice in one slot fails under id: design: per-target customisation system (from #5679) #5854 §2.2; the slot on a
<raw> region fails under id: design: semantic markup vocabulary v1 (from #5679) #5849 §3.1 (verbatim source is not a rendered element — an assertion there could only be silently dropped).
- Stage 3 (compose.rs) — each element's slot enters layer 3 at instance specificity (id: design: per-target customisation system (from #5679) #5854 §2.2), merged with caller-supplied
ComposeData assertions through the existing specificity/tie machinery (a differing data assertion at instance specificity ties and errors, §6a). An unvalidated document with a bad slot fails composition with the same located errors rather than dropping assertions silently.
- Lowering — web (id: design: web rendering: assertion → Tailwind mapping (from #5679) #5851) and native (id: design: native rendering: assertion → OS-standard controls (from #5679) #5852) already consume resolved (dimension, token) properties through their tables and coverage reports, so source assertions are now mapped/defaulted there with no lowering-code change. The GUI report gains the missing accounting: every resolved assertion is recorded by disposition under the presentation decision (
standard / fallback-standard / superseded-by-presentation, id: design: per-target customisation system (from #5679) #5854 §2.1 layer 4 — superseded assertions remain the fallback standard rendering, never dead configuration), serialised in emit_gui_json like the other report lists.
- Docs — the stale crate docs are corrected:
lib.rs no longer claims "first stages" or an unsettled id: design: style assertion vocabulary (from #5679) #5850 (it now records the A2 discharge and the two boundaries that genuinely remain: state-delta composition id: design: web rendering: assertion → Tailwind mapping (from #5679) #5851 §3.6 and conditional blocks); the Cargo.toml header comment, which made the same stale claims, is refreshed to match; the stale "carried opaquely" sentences in lower.rs/lower_native.rs are corrected.
Judgment calls (flagged for review)
- Slot syntax — no record pins a concrete string syntax; id: design: style assertion vocabulary (from #5679) #5850 §2 fixes the model (a (dimension, role-value) pair). The grammar chosen is the minimal transcription: comma-separated
dimension token pairs. Recorded in the module docs.
- Emphasis domain — id: design: style assertion vocabulary (from #5679) #5850's record names
primary/destructive in its §2 examples; the domain is completed as (primary, destructive, subtle) from the parent id: design: Markup & styling model for programs-as-websites — semantic markup, style-override mapping #5679 vocabulary line and the id: design: web rendering: assertion → Tailwind mapping (from #5679) #5851 §3.5 / id: design: native rendering: assertion → OS-standard controls (from #5679) #5852 §3.4 tables, which both carry exactly those three.
- State-qualified assertions are not in the grammar — id: design: style assertion vocabulary (from #5679) #5850 §5 fixes states as target-derived deltas with fixed precedence ("authors never assert per-state colours directly"); the state roles stay with the targets' state machinery (
gui_table).
- GUI report extension — the one report-shape change, justified above; the acceptance requires per-target report accounting for assertions and the GUI report had none.
Evidence
Venue, stated plainly: the build-lock queue is stalling under the current scale-up load, so tests ran on amd-6 in a private worktree (~/code-12836) with a private target dir (CARGO_TARGET_DIR=~/code-12836-target), the same approach as the #7918 verification lane. No new dependencies.
cargo test -p id-render on the PR head (6d979c3): 68 integration tests pass, 0 fail — the pre-existing 56 (pipeline 15, compose 11, lower 12, lower_gui 8, lower_native 10) plus 12 new in tests/assertions.rs, each naming the decision-record behaviour it verifies.
- Fail-before: three probe tests written against pristine main's existing public API only (unknown token must fail validation; raw value must fail validation; a source assertion must reach the web artefact + report) — 3/3 failed on pristine main (the slot was accepted and ignored), 3/3 pass with this change. The committed test file additionally cannot compile on main, since
assertion_vocabulary is part of the change.
- Worked example (in the tests): one assertion-bearing source — page
tone surface-base, heading text heading, card elevation elevation-raised, pad space-3, button tone accent, emphasis primary — lowers on web (classes bg-surface-base, text-step-plus-2, shadow, p-space-3, bg-accent; all five assertions reported mapped, none defaulted), on mac (tone accent mapped to controlAccentColor; an added corner corner-rounded reported platform-defaulted per id: design: native rendering: assertion → OS-standard controls (from #5679) #5852 §3.7, never silent), and on GUI (assertions accounted standard; with an asset override on the button, its assertions are accounted superseded-by-presentation while the card's stay standard).
cargo fmt -p id-render --check clean; cargo clippy -p id-render --all-targets exits 0 with no warnings in the new/changed code (the crate's pre-existing warning baseline elsewhere is unchanged; the one warning the new test file initially introduced was fixed).
Closes out the code side of #12836; #7918's remainder is discharged by this PR.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…lary (#12836)
The #5855 assumption A2 deferral is discharged now #5850 is
settled: the assertion vocabulary lands as versioned data
(src/assertion_vocabulary.rs, transcribed from the #5850
decision record), stage 2 validates the assert slot against it
(unknown dimension/token fails with suggestions in the #5849
idiom; raw values rejected per #5850 invariant 1; a dimension
asserted twice in one slot is an error per #5854 §2.2; the slot
does not apply to raw regions per #5849 §3.1), and stage 3
composes the slot's assertions at instance specificity alongside
the caller-supplied data. Lowering honours them through the
existing per-target tables; the GUI report now accounts for
every resolved assertion by disposition under the presentation
decision (#5854 §2.1 layer 4). Stale crate docs corrected
(lib.rs and the Cargo.toml header no longer claim first stages
or an unsettled #5850).
Tests: tests/assertions.rs, 12 tests naming the decision-record
behaviours they verify, including the assertion-bearing worked
example lowered on all three targets.
Clears the one clippy warning the new test file introduced
(items_after_statements); the crate's pre-existing warning
baseline is unchanged.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 33 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7d554218-dc7c-49f1-b9c7-a486b48a8682
Commits
-
Reviewing files that changed from the base of the PR and between a3ab4c5 and 6d979c3.
Files selected for processing: 9
-
pkgs/id/crates/id-render/Cargo.toml
pkgs/id/crates/id-render/src/assertion_vocabulary.rs
pkgs/id/crates/id-render/src/compose.rs
pkgs/id/crates/id-render/src/lib.rs
pkgs/id/crates/id-render/src/lower.rs
pkgs/id/crates/id-render/src/lower_gui.rs
pkgs/id/crates/id-render/src/lower_native.rs
pkgs/id/crates/id-render/src/validate.rs
pkgs/id/crates/id-render/tests/assertions.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|