Skip to content

text-0: the text oracle method - #68

Merged
softmarshmallow merged 4 commits into
mainfrom
text-0-oracle-method
Aug 4, 2026
Merged

text-0: the text oracle method#68
softmarshmallow merged 4 commits into
mainfrom
text-0-oracle-method

Conversation

@softmarshmallow

Copy link
Copy Markdown
Member

The first milestone of the text arc, per the shape agreed for it: a PR rather than a direct rung, because its content is owner decisions, not measurements.

What this is

The method for gating text on the SVG engine of record (websem → rframe → n0) — the statement is docs/wg/consolidation/text-oracle.md. It decides no code, leaves the D-M text stage open, and produces no score (FLIP stays unratified).

The probe headline (Chromium 149, the exact bake posture)

  • Default macOS smoothing dilates glyph ink beyond true coverage — a deterministic 1px fringe no honest engine raster can reproduce. Plain Ahem alone does not deliver byte-exactness.
  • With -webkit-font-smoothing: none, every probe went bilevel and exact: alphas {0,255}, solid boxes at precisely the predicted Ahem coordinates, byte-stable across repeats.
  • antialiased produced byte-identical PNGs to none over integer-aligned boxes — the deep fact the method rests on: over the admitted numeric domain, every raster policy coincides, so the posture declaration leaks no quality flag into the engine.
  • Fractional inputs never refuse in Chromium — they snap by a rasterizer-internal rule. The slice refuses them instead of codifying it.
  • Whitespace collapse verified by column profile: " X X " → ink exactly [10,30) ∪ [50,70).
  • An undeclared font family renders ambient system fallback (89 distinct alpha levels) — the thing the hermetic environment refuses.

Decisions to ratify (§ Decisions for the owner)

  1. The gate ladder — rung A (deterministic-font byte-exact) active; rung B (geometry oracle) named for real fonts later; rung C (thresholded raster) parked pending FLIP.
  2. The admitted numeric domain + refusal-over-snapping.
  3. -webkit-font-smoothing: none as bake posture carried by text fixtures.
  4. The hermetic font environment: empty by default, --font FAMILY=PATH, content-hash identity.
  5. The corpus-growth law: probes never committed; cells are a gate, not coverage; text contained in fixtures/web-first/text/; breadth untracked in fixtures/local/.
  6. Outlines-first lowering for text-1 — no rframe amendment until the D-M deciding spike.
  7. The resolver crate (proposed textlayout): backend-free rustybuzz + ttf-parser, refuses font discovery/paint/clocks/estimates.

Also in this PR

fixtures/web-first/fonts/ — Ahem pinned by content hash (b719ecb3…94b8448, public domain, WPT @ 986881aa), with the directory's README stating the identity law.

Once ratified, text-1 (the <text> proving slice) returns to the direct-to-main rung shape.

The first entry in fixtures/web-first/fonts/: Ahem from web-platform-tests
@ 986881aa, public domain, sha256-pinned. A font here is an identity, not a
family name — the text-oracle brief owns the method that consumes it.
How text enters the byte-exact Chromium gate without weakening it:

- the gate ladder (deterministic-font byte-exact active; geometry oracle
  named for real fonts later; thresholded raster parked pending FLIP)
- the probe record against Chromium 149: default macOS smoothing dilates
  ink beyond true coverage; -webkit-font-smoothing:none goes bilevel; over
  integer-aligned Ahem boxes every raster policy is byte-identical
- the admitted numeric domain (integer x/y, font-size % 5, integer anchor
  starts) with refusal-over-snapping
- the hermetic font environment (empty by default, content-hash identity)
- the corpus-growth law: probes never committed, cells are a gate not
  coverage, text contained in its own suite, breadth stays untracked

Decides no code; the D-M text stage stays open.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nothing Ready Ready Preview Aug 4, 2026 8:12am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@softmarshmallow, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a5d7d9f-206c-49bb-8e67-5acdb7b8ecc6

📥 Commits

Reviewing files that changed from the base of the PR and between f335b51 and 22e2dcc.

📒 Files selected for processing (1)
  • docs/wg/consolidation/text-oracle.md

Walkthrough

The PR documents a proposed deterministic SVG text oracle, including grading rungs, Chromium probe findings, supported inputs, refusal rules, hermetic fonts, corpus governance, and text-1 architecture decisions.

Changes

Deterministic SVG text gating

Layer / File(s) Summary
Oracle contract and grading ladder
docs/wg/consolidation/index.md, docs/wg/consolidation/text-oracle.md
The consolidation index links the proposed text-oracle method. The document defines text-0 scope, responsibilities, the gating problem, and three grading rungs.
Probe evidence and admitted behavior
docs/wg/consolidation/text-oracle.md
The document records Chromium probe results, bake posture, byte-stability conditions, admitted numeric and glyph domains, and stable refusal behavior.
Hermetic fonts and corpus governance
docs/wg/consolidation/text-oracle.md, fixtures/web-first/fonts/README.md
The document defines hash-pinned fonts, corpus growth rules, owner decisions, and a proposed text-1 resolver. The README records the pinned Ahem font identity and policy.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 69 — The issue directly defines the text-oracle method and text-1 architecture documented by this PR.

Possibly related PRs

  • gridaco/nothing#26 — Defines universal shaped text layout that uses deterministic text-resolution and oracle contracts.
  • gridaco/nothing#64 — Documents Web-first SVG fixture capability status and Chromium-baked corpus coverage related to the pinned-font guidance.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes do not implement the painter consolidation, debug separation, or architecture lock required by linked issue #39. Implement the painter changes required by #39, or unlink issue #39 from this pull request.
Out of Scope Changes check ⚠️ Warning The text-oracle documentation and Ahem font additions are unrelated to the linked painter architecture objectives in #39. Remove the unrelated text-oracle and font changes, or link the pull request to the correct text-oracle issue.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding the text oracle method.
Description check ✅ Passed The description accurately explains the proposed text oracle method, its decisions, and the pinned Ahem font addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch text-0-oracle-method

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/wg/consolidation/text-oracle.md (1)

202-205: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarify the rframe resource-reference rule.

Line [203] says that rframe refuses resource references. Line [205] then says that a glyph run referencing a font key “is one” without naming the noun. State whether the font-key reference is the refused resource reference and explain how outlines-first lowering avoids it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/wg/consolidation/text-oracle.md` around lines 202 - 205, Clarify the
paragraph around the “lowering shape for text-1” section by explicitly stating
that the glyph run’s font-key reference is the resource reference refused by
rframe, then explain that outlines-first lowering removes or resolves that
reference before the shaped-text fact enters rframe.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/wg/consolidation/text-oracle.md`:
- Around line 116-129: Expand the “The admitted numeric domain” contract before
ratifying Rung A: define whether transforms and viewBox scaling are admitted
only when final device-space geometry remains integral, and explicitly admit or
refuse direction="rtl", text-anchor variants, and tspan layout behavior. If
these inputs are not covered, narrow Rung A’s “whole text resolution pipeline”
claim to the stated admitted subset rather than implying broader coverage.
- Around line 156-167: Update the text rendering input contract around the
--font FAMILY=PATH interface and fixtures/web-first/fonts/README.md so every
declared font includes its expected SHA-256. Verify each loaded font’s bytes
against that declared hash before rendering, and fail immediately on mismatch
rather than proceeding with the bake.
- Around line 64-70: The text-oracle documentation generalizes beyond the single
macOS Chromium probe without evidence for other supported rasterizers. Add
matching Linux and Windows re-bake evidence using the same bake posture, or
revise the documented oracle scope and admission claims to limit support to
macOS arm64; update the relevant generalization section alongside the existing
Identity evidence.

---

Nitpick comments:
In `@docs/wg/consolidation/text-oracle.md`:
- Around line 202-205: Clarify the paragraph around the “lowering shape for
text-1” section by explicitly stating that the glyph run’s font-key reference is
the resource reference refused by rframe, then explain that outlines-first
lowering removes or resolves that reference before the shaped-text fact enters
rframe.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 42230ff2-8ee8-4493-ae1d-4d38cee0015c

📥 Commits

Reviewing files that changed from the base of the PR and between cd29176 and f335b51.

⛔ Files ignored due to path filters (1)
  • fixtures/web-first/fonts/ahem.ttf is excluded by !**/*.ttf
📒 Files selected for processing (3)
  • docs/wg/consolidation/index.md
  • docs/wg/consolidation/text-oracle.md
  • fixtures/web-first/fonts/README.md

Comment thread docs/wg/consolidation/text-oracle.md
Comment thread docs/wg/consolidation/text-oracle.md
Comment thread docs/wg/consolidation/text-oracle.md Outdated
…oracle brief

A scratch spike (rustybuzz + pinned Ahem -> outline path facts ->
n0::glyphless on the reftest posture) rendered the em-box, space-advance,
and middle-anchor runs byte-identical to the round-2 Chromium captures,
deterministic across double renders. The coincidence argument is now
measured on both sides of the gate.
- scope the measured oracle identity to macOS arm64 Chromium 149; cross-
  rasterizer coincidence is a named argument the verify-only harness keeps
  safe until a re-bake measures it
- bind the admitted numeric domain to final device-space geometry (CTM
  restriction named); construct admission belongs to the slice's statement
  of record
- make the font hash executable: hash-bearing --font declarations verified
  before rendering, typed refusal on mismatch
- name the resource reference the outlines-first lowering resolves away
@softmarshmallow
softmarshmallow merged commit e4f8b3b into main Aug 4, 2026
15 checks passed
@softmarshmallow
softmarshmallow deleted the text-0-oracle-method branch August 4, 2026 10:50
softmarshmallow added a commit that referenced this pull request Aug 4, 2026
Merged as #68. The gate ladder, admitted numeric domain,
bake posture, hermetic font environment, corpus-growth law, outlines-first
lowering, and the resolver crate now bind the text arc's rungs. The D-M
shaped-text stage stays open — text-2 is the spike that closes it.
softmarshmallow added a commit that referenced this pull request Aug 4, 2026
Merged as #68. The gate ladder, admitted numeric domain,
bake posture, hermetic font environment, corpus-growth law, outlines-first
lowering, and the resolver crate now bind the text arc's rungs. The D-M
shaped-text stage stays open — text-2 is the spike that closes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant