Repository navigation
Turn off Firefox's bounce-tracking protection in tests - #6352
Merged
Merged
Conversation
Firefox classifies a host that a tab passes through without user activation, once the host stored state, as a bounce tracker, and logs a console warning on the page showing at the time. Every test page comes from 127.0.0.1, so a Firefox test can trip it, and the browser fixtures fail a test on any unconsumed warning. The Nov 17 macOS nightly (run 44068597322) errored in the teardown of the Firefox floating-box motion journey on exactly that warning, and the departure test in test_readiness.py had filtered it by hand since #3825. FIREFOX_PREFS now sets `privacy.bounceTrackingProtection.mode` to 0, `nsIBounceTrackingProtection.MODE_DISABLED`, so neither the suite's `firefox_browser` nor `leaf-dev`'s Firefox runs the feature. The departure test now accepts only the aborted module load it causes. A scratch page that bounces from localhost through a cookie-setting 127.0.0.1 redirect back to localhost logged the warning once with the old prefs and not at all with the new ones.
leaf-agent
approved these changes
Nov 18, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
Closes #6183 leaves the fourth test, test_page_fixture_renders[feature-gallery] (Chromium net::ERR_NETWORK_CHANGED on loopback loads, also seen on test_a_text_document_refresh_keeps_selection_in_unchanged_text), with no owner once this merges, as the description notes. Could you either change it to Part of #6183 and say what's left, or open an issue for the ERR_NETWORK_CHANGED failure so the next macOS nightly that shows it has somewhere to go?
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
The macOS nightly loses tests to Chromium's `net::ERR_NETWORK_CHANGED` because the runner drops its own address once an hour. Its DHCP server answers a new client but never a renewal, so when each one-hour lease ends, configd removes the address and gets the same one back about 3 s later. Chromium reads each step as an IP address change and fails every loopback load still waiting for a socket. In the [Nov 17](https://github.com/max-sixty/leaf/actions/runs/44068597322) and [Nov 15](https://github.com/max-sixty/leaf/actions/runs/43706054091) nightlies that failed three tests in teardown after their bodies passed, both nights at 12:50 UTC, two hours into the job. Linux runs show none. This makes `test-macos`'s first step set the leased address, router and DNS server by hand, so the interface stays unchanged for the rest of the job. Evidence, from a throwaway workflow on this branch that has since been deleted: - [Unchanged runner](https://github.com/max-sixty/leaf/actions/runs/44254650627): configd logged "server not responding" and removed `192.168.64.10` at 07:52:40, then again at 08:52:57, each time after an hour of unanswered RENEW and REBIND requests. Each time an idle Chromium's NetLog shows `NETWORK_MAC_OS_CONFIG_CHANGED` "Notify_Changed" twice, once for the removal and once for the return. - [Runner with this step](https://github.com/max-sixty/leaf/actions/runs/44263219832): the interface changed once, when the step ran. Over the next 2 h 17 min, which would have held two lease expiries, configd removed no address and Chromium logged no change. To weigh: once this step runs, the runner no longer asks the host's DHCP server for its address, so after the lease ends the server could give that address to another VM. Apple's `bootpd` keeps an expired lease's address reserved for its client until the pool runs out. I haven't confirmed that GitHub's hosts run `bootpd`. The first scheduled run after merge is the end-to-end check. Max asked for this fix after #6352 closed #6183, whose fourth failure this was. > _This was written by Claude Code on behalf of max-sixty_
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.
Firefox's bounce-tracking protection logs "“127.0.0.1” has been classified as a bounce tracker" on whichever page is showing when a test's navigations trip it, and the browser fixtures fail a test on any unconsumed warning. That warning is what failed the teardown of the Firefox
test_every_part_of_a_floating_box_moves_one_way_per_inputin the Nov 17 macOS nightly. This setsprivacy.bounceTrackingProtection.mode: 0(MODE_DISABLEDin Firefox'snsIBounceTrackingProtection.idl) inFIREFOX_PREFS, which both the suite'sfirefox_browserandleaf-dev's Firefox launch with, and drops the hand filter for the same warning from the departure test intest_readiness.py.Closes #6183. Of its four tests, two passed in the Nov 17 nightly and this change fixes the third. The fourth,
test_page_fixture_renders[feature-gallery], errored in teardown on Chromium'snet::ERR_NETWORK_CHANGEDfor loopback loads, as didtest_a_text_document_refresh_keeps_selection_in_unchanged_texttwo hours earlier in the same job. No other open issue tracks that failure, so it loses its owner when this merges.Max picked this change from his GitHub review queue page. Tested with a scratch page that bounces from localhost through a cookie-setting 127.0.0.1 redirect back to localhost, which logged the warning once under the old prefs and never under the new ones, and with the departure test, which passes.