fix(text): route external raster kinds around the Worker font-bake plan - #73
Open
thejustinwalsh wants to merge 3 commits into
Open
fix(text): route external raster kinds around the Worker font-bake plan#73thejustinwalsh wants to merge 3 commits into
thejustinwalsh wants to merge 3 commits into
Conversation
size-limit report 📦
|
The runtime shoveled every requested raster into the Worker font-bake plan, and the Worker's embedded baker switch correctly rejected kinds it does not carry — killing the whole load even though the host-side path through technique.runtimeBaker exists for exactly this case. The routing authority is now one declared set, workerRasterKinds, exported from the runtime-bake subpath: Worker plans carry only Worker-embedded kinds, and every other technique's raster deliberately misses in the baked artifact and bakes host-side through the baker its own declaration names. Proven red-green in Node against the published example package with a strict stub enforcing the Worker contract, and by the restored browser lane: deterministic external raster frames on WebGPU and WebGL2. Verified pre-existing on a clean origin/main worktree before fixing.
thejustinwalsh
force-pushed
the
feat/external-runtime-bake
branch
from
August 13, 2026 06:22
6d2d88f to
0d93370
Compare
…re-subpath ceilings The routing change grew the renderer-neutral core bundle by +1,786 raw / +919 minified bytes, but the generated size evidence was not refolded, so the growth first surfaced in the CI runtime gate's fresh build: 228,199 raw / 155,956 minified against the 227,000 / 155,500 ceilings, byte- identical across linux-x64 and darwin. Re-price the two exceeded ceilings to the measured actuals with the usual tight headroom; gzip and Brotli still fit under their prior ceilings. The evidence refold itself rides the measure-entry branch (841ff05).
…ings The external-raster routing bundles into the Three adapter as well as the core subpath, so the same unrecorded growth surfaced there once the gate progressed past the re-priced core entry: 370,521 raw / 241,995 minified against the 370,000 / 241,500 ceilings (+1,786 raw / +914 minified over the last recorded evidence). Gzip and Brotli still fit. Same shape as the core re-price one commit down; the evidence refold rides feat/measure-entry.
thejustinwalsh
commented
Aug 14, 2026
| * the realization of this set; its rejection of anything else guards protocol | ||
| * violations, not routing. | ||
| */ | ||
| export const workerRasterKinds: readonly string[] = Object.freeze(['bitmap', 'msdf', 'slug']); |
Collaborator
Author
There was a problem hiding this comment.
Incomplete. Holding two versions of baking routing still.
thejustinwalsh
marked this pull request as ready for review
August 14, 2026 02:49
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
Repairs the third-party runtime-bake route — the
benchmark:external-rasterproof lane was failing on main (verified pre-existing in a cleanorigin/mainworktree before fixing; not a stack regression).Mechanism
The runtime shoveled every requested raster into the Worker font-bake plan, and the Worker's embedded baker switch (bitmap | msdf | slug) correctly rejected kinds it doesn't carry — which killed the whole load, even though the host-side path through
technique.runtimeBakerexists for exactly this case and every technique (including the published example) already declares its baker.Fix
One declared routing authority:
workerRasterKinds, exported from@pmndrs/text/runtime-bake. Worker plans carry only Worker-embedded kinds; every other technique's raster deliberately misses in the baked artifact and bakes host-side through the baker its own declaration names. The Worker's switch remains as the realization of the set — its rejection now guards protocol violations, not routing.Evidence
['bitmap'], and the external raster decodes from its host-baked, provenance-checked artifact.external-raster-proof-readyon WebGPU and WebGL2 with identical deterministic frame hashes (817495c4…), 2/2 frames each.