Repository navigation
fix(core): a runtime failure just before start-up is named too - #5444
Merged
Merged
Conversation
Contributor
Edit accuracy: accurate 2061 (base branch 2061), smooth 1648 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
somanshreddy
approved these changes
Oct 11, 2026
somanshreddy
left a comment
Contributor
There was a problem hiding this comment.
Approving at 9c9cb490.
- The recorder now wraps all of
startAfterCompositionScripts.- Sync path:
refreshSvgSelectorAliases, or init with no deferred scripts. It records and rethrows, as init alone did before. - Font-gated path:
runScriptsAfterFontsawaits fonts and scripts, then callsafterRun()(init) unguarded, so an init throw still rejects the promise. The new.catchrecords it and passes it toreportError. Removing init's own wrapper therefore loses nothing.
- Sync path:
- Tests: the
src/runtime/entry*tests pass 51/51. Mutants killed:- no record on the font-gated rejection (1 fails)
- no record in the sync catch (4 fail)
- CI: all required checks green. No CRs.
Review by Somu
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 changes for the user
When the HyperFrames runtime fails in the steps just before it starts (refreshing SVG selector aliases, or running the font-gated composition scripts),
check,snapshot,renderand the other readiness waits now fail at once with "HyperFrames runtime failed: : …" instead of waiting out their timeout with no cause.Root cause
The start-up error recorder (
recordStartupError, which readiness waits read throughwindow.__hfStartupError) was wired around the init call only.startAfterCompositionScriptsinruntime/entry.tsruns two steps before init:refreshSvgSelectorAliases()and, when the page has font-gated scripts,runScriptsAfterFonts(...). A throw in either left nothing recorded, so the page never became ready and the wait timed out without saying why.Fix
The recorder now wraps all of
startAfterCompositionScripts: the synchronous path records and rethrows as before, and the font-gated path records the rejection and passes it toreportError(the same wayafterFonts.tsreports listener errors), so it still reaches the console without an unhandled rejection. The init call no longer needs its own wrapper.Verification
entry.startupFailure.test.tscases: a throw fromrefreshSvgSelectorAliasesand a rejected font-gated script run each record the named error (and the latter is passed toreportError). Both fail on the previous code.check:position-edits-renderare clean.Follows the start-up error work merged in the previous PR on this path.
Why this PR is small
It closes one gap left by the start-up error work: one function in
entry.tsand its two regression tests.