Repository navigation
DNS prefetching off for every renderer (ticket 662): a store frame's page asks the resolver for nothing - #669
Merged
Merged
Conversation
…ge cannot send a name out (ticket 662) setBlinkSettings in chromium-features.ts is the one writer of blink-settings (dnsPrefetchingEnabled=false), called once from main's entry beside the other switches. The unit guard pins the value, its place in the entry's order before any root loads, and that no other source under src/ names the switch. The e2e:deliverables scene frames an HTML artifact whose script connects a dns-prefetch link by script and by markup, and reads Chromium's net log of the window's session: a name main resolves on purpose is there, the page's are not. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…s type alone (ticket 662) An event's other params carry the machine's resolver settings, such as its search domains; the report keeps them out of test output. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…pike, PR 664) Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… this landing (ticket 662) Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…e/dns-prefetch-off Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…fetch-off Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Closes #662. Main switches Blink's DNS prefetching off for every renderer before the app is ready, so a page in a store frame (an HTML artifact's script, or markup it writes into its own document) can no longer send data out of the machine in DNS queries through
<link rel="dns-prefetch">.What changes
src/main/chromium-features.ts:STARTUP_BLINK_SETTINGS = ['dnsPrefetchingEnabled=false']andsetBlinkSettings, the one writer of theblink-settingsswitch (Chromium reads one list; a second append would replace the first).src/main/index.ts: the one call, right after the startup feature switches, in the app's entry and so before either root (the app, the render host) loads.docs/tech-debt-tracker.md: the row of 2026-11-14 "Residual egress from an HTML-artifact frame by DNS" is amended in place to say it is fixed by this landing. No new row.What it costs
No page in the app gets DNS-prefetch hints any more, the in-app browser included (its links lose their hover prefetch). Name resolution and page loads are untouched.
Why the switch and not the page
On Chromium 152 an
X-DNS-Prefetch-Control: offheader or meta does not stop an explicitdns-prefetchlink: it still sends (measured in the viewer-frame spike,spikes/viewer-frame/FINDINGS.md, "2026-11-14 follow-up: the DNS-prefetch channel"). The frame's CSP, its sandbox, main's request filter, the store-frame policies and a session proxy never see the query, and Electron's web preferences and sessions have nothing that reaches the Blink setting.Proof
Unit guard (
src/main/chromium-features.test.ts,src/main/index.test.ts): the exact value; the switch is set beforeregisterStoreSchemesand before the root loads, in the app mode and in--render-host; no source file undersrc/other thanchromium-features.tscontainsblink-settings, andindex.tsis the only caller ofsetBlinkSettings, exactly once (so nothing later replaces the list).e2e scene (
e2e/deliverables.spec.ts, "ticket 662: an HTML artifact's dns-prefetch links ask the resolver for nothing; a name main resolves on purpose is in the same net log"): an HTML artifact served under the real handler and frame policies attaches one prefetch link by script and one as markup, each with a random name underexample.com; main then resolves a third name on purpose (session.resolveHost), the positive control; Chromium's net log must hold the control's resolver job and no event for either page name. The report prints event types and counts only.Red run on a Mac, the switch not set (a side branch that is not merged; run 43654278209, hosted macOS,
e2e:deliverables; the run shows as cancelled because it was cancelled by hand after its hosted job had failed as intended, so that its Mac mini copy would not run): the scene fails, on the run and on its retry, withGreen run, this branch (run 43654259870,
e2e:deliverableson hosted macOS):14 passed; the scene's report: control 6 events, script 0, markup 0.The builder's Linux runs agree (red: 10 events for each page name; green: 0 and 0).
Checks
e2e:deliverableswith its copy on the Mac mini lane, on904222afd: run 43654259870, success (the hosted macOS job and the copy on the Mac mini lane:14 passedeach; the mini copy's log shows this scene passing).unit:darwin --affectedon904222afd: run 43654212363, success.cb733a13aadds one merge of master's tracker rows (docs/tech-debt-tracker.mdonly) on top of904222afd.Not verified
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)