fix(ci): close the two post-#370 CI races - denylist hydration vs sw/web-fetch, and the Firefox Run-control probe - #372
Open
jonybur wants to merge 2 commits into
Open
Conversation
Visual regression✅ No visual drift. Every state renders identically to the committed baselines. 📸 Browse the visual gallery — 54 baseline screens (light + dark) as of this commit. |
jonybur
added a commit
that referenced
this pull request
Aug 9, 2026
… flush The Run-control probe read notebook.js the instant the button flipped to Stop. The flip happens at run-reserve time, BEFORE js/eval's awaited mirror of the agent code into notebook.js lands in OPFS, so on a slow runner the single-shot read saw the previous run's code and failed the suite (branch runs of #372 and #360 hit this; the product ordering is correct - reserve first prevents double-runs, and the mirror completes before the run starts). The read now polls until the mirrored content appears, bounded at 50 attempts, so a slow flush is a wait instead of a false mismatch. Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
jonybur
added a commit
that referenced
this pull request
Aug 9, 2026
…st arrival The remote-fetch stop probe slept a fixed 150ms after starting the run, then aborted - on a slow runner the abort landed before the resolver had even issued the slow fetch, so the fixture saw 0 requests instead of the in-flight cancel the test pins (CI hit this on the #372 branch run). The fixture now serves a status endpoint reporting how many slow-module requests have arrived, and the probe polls it through the same audited sw/web-fetch relay the resolver uses, aborting only once the request is on the wire. Single injected block (geckodriver gives each script a fresh sandbox, so cross-call state is not an option), and elapsedMs now measures abort to settled - the prompt-stop property - instead of including run setup. Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
jonybur
added a commit
that referenced
this pull request
Aug 9, 2026
…st arrival The remote-fetch stop probe slept a fixed 150ms after starting the run, then aborted - on a slow runner the abort landed before the resolver had even issued the slow fetch, so the fixture saw 0 requests instead of the in-flight cancel the test pins (CI hit this on the #372 branch run). The fixture now serves a status endpoint reporting how many slow-module requests have arrived, and the probe polls it through the same audited sw/web-fetch relay the resolver uses, aborting only once the request is on the wire. Single injected block (geckodriver gives each script a fresh sandbox, so cross-call state is not an option), and elapsedMs now measures abort to settled - the prompt-stop property - instead of including run setup. Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
jonybur
force-pushed
the
fix/web-fetch-denylist-hydration-race
branch
from
August 9, 2026 13:17
fcce931 to
53fc0ec
Compare
… SW start The denylist seed hydrates async at service-worker boot, and webFetch's getDenylist does a synchronous readiness check. A sw/web-fetch request (Notebook module fetch, VM egress) that raced a cold start was refused with DenylistPolicyUnavailableError instead of waiting - the packaged page boot job hit exactly this on main's #370 merge run (the same tree passed on the PR branch and locally). The engine route now awaits an injected awaitDenylistPolicy gate (requireDenylistPolicy(await denylistReady)) before any fetch work, so the race becomes a short wait while a genuinely failed hydration still refuses before any egress. The sync check inside getDenylist stays as the last-resort chokepoint for every other direct caller. Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
…st arrival The remote-fetch stop probe slept a fixed 150ms after starting the run, then aborted - on a slow runner the abort landed before the resolver had even issued the slow fetch, so the fixture saw 0 requests instead of the in-flight cancel the test pins (CI hit this on the #372 branch run). The fixture now serves a status endpoint reporting how many slow-module requests have arrived, and the probe polls it through the same audited sw/web-fetch relay the resolver uses, aborting only once the request is on the wire. Single injected block (geckodriver gives each script a fresh sandbox, so cross-call state is not an option), and elapsedMs now measures abort to settled - the prompt-stop property - instead of including run setup. Signed-off-by: Jonathan Bursztyn <jobur93@gmail.com>
jonybur
force-pushed
the
fix/web-fetch-denylist-hydration-race
branch
from
August 9, 2026 17:10
53fc0ec to
bef5589
Compare
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 broke
Three intermittent CI reds surfaced after #370 merged, all races rather than code breaks (each passed on other runs of identical trees):
packaged page boot(red on main's Add first-class Firefox Notebook modules #370 merge run). The preview remote-import probe failed withThe sensitive-origin policy is unavailableafter 0 fixture requests. The denylist seed hydrates async at SW boot andwebFetch'sgetDenylistdoes a synchronous readiness check, so asw/web-fetchrequest (Notebook module fetch, VM egress) racing a cold start was refused instead of waiting. Every tool-dispatch path already awaitsdenylistReadyinbuildToolContext; this engine route was the one fetch boundary that did not.notebook.jsthe instant the button flipped to Stop, but the flip happens at run-reserve time, beforejs/eval's awaited mirror of the agent code lands in OPFS - the single-shot read saw the previous run's code. The product ordering is correct (reserve first prevents double-runs; the mirror completes before the run starts); the test's read was the bug.What changed
sw/web-fetchawaits an injectedawaitDenylistPolicygate (requireDenylistPolicy(await denylistReady), defined next todenylistReady, wired shorthand) before any fetch work. A racing request waits out the one-time load; a genuinely failed hydration still refuses before any egress - fail-closed unchanged, and the sync check ingetDenyliststays as the last-resort chokepoint for other direct callers.notebook.jsread (bounded) until the mirrored content appears.sw/web-fetchrelay the resolver uses; single injected block because geckodriver gives each script a fresh sandbox).elapsedMsnow measures abort to settled - the prompt-stop property - instead of including run setup.Residual (flagged, not changed)
The neighboring
timedOutFetchprobe has a smaller latent race of the same family: its 400ms eval deadline must fire after run setup has issued the slow fetch. It has never failed in CI and fixing it deterministically means changing its contract (the deadline is intrinsic to the eval), so it is left for a deliberate follow-up if it ever fires. Thedweb two-peerred on this PR's second run is unrelated: the only diff from its green first run is the Firefox harness file, and the lane passed on the ten runs before - an infra blip, re-exercised by this push.Verified
vmHttpFetch), revert-proven red without the fix.check:pagesboth channels, and the full Firefox runtime suite (all checks + 858 Gecko browser tests) against pinned Firefox 153 + geckodriver 0.37.1, green including all three previously-racing probes.packaged page bootalready ran green twice on this PR with fix 1 in place.