websem: admit exact static SVG text faces - #128
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (36)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughChangesThe textlayout oracle advances to v6 with exact static weight, stretch, and style descriptors. Font selection now stops at the first family with resources and requires one exact tuple. SVG cascade, CLI declarations, Chromium fixtures, tests, and documentation carry the new contract. Exact static face selection
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: ⚪ Minimal · up to The exact static face-selection change is covered consistently across descriptor parsing, cascade propagation, resolution, CLI wiring, and fixture/oracle updates. No merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant SVG as SVG text
participant Cascade as csscascade
participant Websem as websem
participant Layout as textlayout
SVG->>Cascade: font-weight, font-style, font-stretch
Cascade->>Websem: computed font properties
Websem->>Layout: StaticFaceDescriptor in Style
Layout->>Websem: exact face or typed refusal
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.61% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 99 functions across 19 files. (17 skipped: 16 unsupported, 1 too large.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Verdict
T5b is ADMIT/SPLIT, with no checklist closure.
textlayout-v6now receives one complete typed static face request and requiresone exact
(weight, stretch, style)tuple inside the first reached namedfamily. The Web consumer carries the bounded descriptor profile through the
one Stylo cascade, and the host manifest declares the same exact facts beside
hash-pinned font bytes.
The complete CSS and SVG presentation-attribute
font-weight,font-style,and
font-stretchgrammars remain open. Fractional weights, arbitrary stretchpercentages, oblique angles, descriptor ranges, directional nearest-face
matching, synthesis, and variation remain explicit boundaries, so this PR
ticks no checklist row.
Measured crux
Chromium 149.0.7827.55 establishes the split around exact static matching:
style, stretch, and complete tuples select the exact declared face.
synthesis. A lone normal Ahem face requested at weight 700 or italic differs
from its unsynthesized control by 164 or 272 pixels at maximum channel delta
255.
font-synthesis:nonereturns both to that control.italicversusoblique 14degandnormalversusoblique 0deg; the laterdeclaration wins. An explicit host manifest has no CSS source-order fact.
conversion, while the pinned Stylo values use 1/64 and round. Authored
font-stretch:74.999%therefore selected a declared 74% Bungee face inChromium, while Stylo's computed 75% bucket would select Ahem. Those controls
differ by 1,062 pixels at maximum delta 255.
font-weight:400.5andfont-style:oblique 23degresources. T5b refuses those wider sources beforetheir provenance can disappear.
Every branch in the new descriptor cell is exact to an independent all-Ahem
Chromium construction; changing any one branch to the normal tuple changes
69 pixels at maximum delta 255.
Every probe used
fixtures/web-first/probe_harness.tsand the sharedhash-pinned capture module. The committed cell also rendered through the
actual strict
n0command and matched the Chromium oracle at zero differingpixels and zero maximum channel delta.
Contract and evidence
textlayoutadvances to v6.Styleand everyFontResourcecarry a finite,typed
StaticFaceDescriptor: integral weight 1 through 1000, one of nine CSSstretch points, and
normaloritalicstyle.tuple and a reached exact-tuple tie are typed failures; manifest vector order
cannot select a face. The selected content key and face index remain artifact
identity.
search or synthesis, discovers no ambient font, and does no I/O.
font-weight,font-style, andfont-stretchpresentation attributes enterbelow author CSS through the same Stylo longhands as CSS declarations. No
second matcher exists, and no descriptor fact crosses
rframe.FAMILY=PATH@sha256:HEX[;weight=N][;style=normal|italic][;stretch=POINT].Fields are optional and order-independent; malformed, duplicate, unknown,
and wider values refuse before the environment exists.
one complete-tuple branch across presentation attributes, inline CSS, author
rules, inheritance, numeric/keyword aliases, and relative weight.
source precision, and a reached family with no exact tuple in strict and
best-effort admission.
thirteen exact text cells, eight exact-number real-font geometry witnesses,
and 224 named refusals.
No existing oracle was overwritten. The new text cell was added only through
the fixture tooling; every previous primitive, animation, text, and geometry
oracle was reverified after the shared capture-module change.
Gate sensitivity
I deliberately changed the computed italic mapping to the normal tuple. All
1,051 primitive cells stayed green, then the new text cell failed loudly at
its exact numeric-domain contract. Restoring the italic mapping returned every
primitive, text, geometry, and refusal gate to green.
Workflow review
This environment exposes no Workflow runner for
.agents/workflows/verify-rung.js. I therefore reproduced its two independentroles by hand as separate passes:
zero tick flips; audited every count and measured-not-celled claim; verified
that the typed producer owns only exact face selection, the consumer uses the
one Stylo cascade,
rframeis unchanged, and both admissions name everyretained boundary.
text, and geometry bakers, the strict CLI pixel comparison, fixture closure,
manifest provenance/order, all four stable refusal paths, status freshness,
and the deliberate sensitivity failure/restoration.
The SDK seam discipline was also applied explicitly: the consumer contract was
written first in the ignored
textlayout-face-selection.plan.md; an independentproducer maintainer implemented
crates/textlayout/**; the consumer thenintegrated only the published typed contract.
Verification
just bakejust text-bakejust text-geometry-bakejust gatejust statuscargo test --locked -p textlayout -p csscascade -p websem -p n0 -p n0_clicargo test --quiet --workspace --exclude grida-canvas-wasmcargo fmt --all -- --checkcargo clippy --workspace --exclude grida-canvas-wasm --no-deps -- -D warningspnpm fmt:checkpnpm lintgit diff --check, added-link build check, and pre-PR OSS diff auditNo conformance score was produced or inspected. FLIP and its record, rule, and
baseline are unchanged.
Refs #43.
Refs #69.