Repository navigation
feat(id-render): assertion half of stage 2 — consume the #5850 vocabulary (#12836) - #12857
Merged
Merged
Conversation
added 3 commits
November 23, 2026 03:42
…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 reachedYou'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. View limit details
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. |
This was referenced Nov 23, 2026
Closed
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.
Summary
Discharges the #5855 assumption A2 deferral — the unblocked remainder of #7918, filed as #12836. The
assertslot 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.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, stampedASSERTION_VOCABULARY_VERSION = "1". It also carries the slot grammar (comma-separateddimension tokenpairs, 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.<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).ComposeDataassertions 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.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 inemit_gui_jsonlike the other report lists.lib.rsno 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 inlower.rs/lower_native.rsare corrected.Judgment calls (flagged for review)
dimension tokenpairs. Recorded in the module docs.primary/destructivein 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.gui_table).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-renderon 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 intests/assertions.rs, each naming the decision-record behaviour it verifies.assertion_vocabularyis part of the change.tone surface-base, headingtext heading, cardelevation elevation-raised, pad space-3, buttontone accent, emphasis primary— lowers on web (classesbg-surface-base,text-step-plus-2,shadow,p-space-3,bg-accent; all five assertions reported mapped, none defaulted), on mac (tone accent mapped tocontrolAccentColor; an addedcorner corner-roundedreported platform-defaulted per id: design: native rendering: assertion → OS-standard controls (from #5679) #5852 §3.7, never silent), and on GUI (assertions accountedstandard; with an asset override on the button, its assertions are accountedsuperseded-by-presentationwhile the card's staystandard).cargo fmt -p id-render --checkclean;cargo clippy -p id-render --all-targetsexits 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-botwith what you need.