Repository navigation
Add the autowebcompat-etp agent for ETP Strict-mode breakage - #7582
Open
mozmraiber wants to merge 37 commits into
Open
mozmraiber wants to merge 37 commits into
mozmraiber wants to merge 37 commits into
Conversation
…istory Add a wait_for_page_load tool to the patched DevTools MCP server: it polls document.readyState until the load event instead of waiting inside evaluate_script, which the bundle aborts after 10s, and reports a page that never finishes loading rather than failing. Add a check_tracker_lists tool backed by mozilla-services/shavar-prod-lists, showing the list entries covering given hosts and the recent commits that added or removed them. A site fixed by a recent removal works in the agent's fresh profile but not for a reporter with older lists, which the agent now reports as the new fixed_by_list_update outcome.
A FastAPI server (agents/autowebcompat-etp/local_runner/server.py) that runs the agent through its compose.yml, queues runs, streams their output, and lists untriaged Privacy: Site Reports bugs to queue in bulk. A React app (web/, pnpm + Vite + Valtio) shows each result next to a draft Bugzilla comment, screenshots and field changes, which are posted with the user's own BUGZILLA_API_KEY after review. Exclude pnpm-lock.yaml from codespell, as JSON lockfiles already are: its package names (devlop, trough) read as typos.
Also publish the content blocking logs with the run.
…gent # Conflicts: # docs/hackbot/agents.md # docs/hackbot/security.md
This branch has not been deployed
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.
Add the autowebcompat-etp agent for ETP Strict-mode breakage
This adds
autowebcompat-etp, a hackbot agent that investigates site breakage reports that may be caused by Enhanced Tracking Protection (ETP) in Firefox. It also adds a second agent,autowebcompat-etp-compare, and a local runner for reviewing results before anything is posted to Bugzilla.autowebcompat-etpThe agent drives Firefox Nightly through DevTools MCP. It follows the report's steps in Standard and Strict mode and uses the content blocking log to find the blocked resources responsible. It then proposes one of these fixes:
url-classifier-exceptionsRemote Settings collection, after checking with the skip-URL prefs that they fix the breakage, orIf it can't propose a fix, it returns a
failure_reasoninstead, for examplenot_etp,not_reproducible,broken_in_standard,fixed_by_list_update,not_fixable_by_exception,anti_adblock, orblocked_captcha. For anti-adblock walls it always proposes the exceptions, but they are only added if a reviewer opts in.The result also includes:
The agent has a
retestmode that reruns an old bug with Firefox's built-in ETP exceptions turned off, to check whether they are still needed.The agent only returns a result. It doesn't write to Bugzilla itself. Its Bugzilla reads go through a broker, as the other autowebcompat agents.
autowebcompat-etp-compareThis agent loads a site in four configurations:
off,strict,strict/easyprivacyandstrict/easylist+easyprivacy. It takes stitched full-page screenshots of each and decides whether the differences are normal variation between page loads or real breakage. It tags the breakage for each configuration.Local runner
agents/autowebcompat-etp/local_runner/contains a small server (a PEP 723 script) and a React UI. It starts the agent through itscompose.yml, streams the output, and shows the result next to a draft of the Bugzilla changes. After you edit and approve the draft, it posts the changes with your own API key. It can also close the bug, needinfo the reporter, and queue all open site reports. See its README for setup. This was used for testing, see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=2088845 .Changes outside the agent
libs/autowebcompat-tools/task.py: if an agent finishes without callingsubmit_result, it now gets one retry turn instead of failing straight away. This affects every autowebcompat agent.AutowebcompatEtpInputswithmode: investigate | retest), hackbot-ui,docker-compose.ymland the prod deploy workflow.docs/hackbot/agents.mdandsecurity.md.pnpm-lock.yaml.Deployment
hackbot.tomlrequests a Cloud Run job with 6 CPU, 24 GiB of memory and a 2 h timeout, plus a broker (same as e.g. autowebcompat-investigate).Testing
agents/autowebcompat-etp/tests/(agent, compare, exceptions, result, tracker lists).