Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
86a7642
Add autowebcompat-etp agent for ETP Strict-mode breakage
mozmraiber Nov 2, 2026
97ccaea
Give the autowebcompat-etp agent page-load waiting and tracker list h…
mozmraiber Nov 2, 2026
bf33bfa
Add a local runner and review UI for the autowebcompat-etp agent
mozmraiber Nov 2, 2026
52701a1
Add a README for the autowebcompat-etp local runner
mozmraiber Nov 3, 2026
c99869e
Lock the autowebcompat-etp local runner's Python dependencies
mozmraiber Nov 3, 2026
a6bece8
Link the shavar-prod-lists commits that add tracker list entries
mozmraiber Nov 4, 2026
2ff09cf
Shorten the set_etp_mode response to the prefs Strict changes
mozmraiber Nov 4, 2026
d14399e
Clear site data when switching ETP mode
mozmraiber Nov 4, 2026
4968646
Fix get_firefox_prefs always failing
mozmraiber Nov 4, 2026
d927e7a
Use the classic URL classifier in the agent's Firefox
mozmraiber Nov 4, 2026
5a850e6
Propose ETP diagnosis whiteboard tags and user story lines
mozmraiber Nov 4, 2026
6ee8787
Post screenshots as one combined image with the comment
mozmraiber Nov 4, 2026
7de133a
Hide navigator.webdriver and let the agent wait for PoW challenges
mozmraiber Nov 4, 2026
71d5f00
Propose severity and priority, and set them on the bug if unset
mozmraiber Nov 4, 2026
adb0191
Report applied state for active runs
mozmraiber Nov 5, 2026
fd6af9c
Make Run.status a RunStatus enum
mozmraiber Nov 5, 2026
a8ff948
Compare Strict breakage against the EasyPrivacy list
mozmraiber Nov 6, 2026
1744664
Report anti-adblock breakage and let the reviewer opt in to its excep…
mozmraiber Nov 6, 2026
6c478ea
Stream run output in batches so replays don't scroll
mozmraiber Nov 6, 2026
59f62fd
Always propose exceptions for anti-adblock breakage, alongside any shim
mozmraiber Nov 6, 2026
2c48508
Compare against EasyList+EasyPrivacy and record blocked tracker counts
mozmraiber Nov 6, 2026
54668f4
Record content blocking logs per ETP mode in a run artifact
mozmraiber Nov 6, 2026
87ba5d2
Add retest mode that runs with ETP exceptions disabled
mozmraiber Nov 6, 2026
e8b5548
Don't rebuild the image by default in the local runner UI
mozmraiber Nov 6, 2026
94c8acc
Add a button to queue all open site reports in the local runner
mozmraiber Nov 6, 2026
da8f28c
Give agents one retry when they finish without submit_result
mozmraiber Nov 6, 2026
6d000d0
Add option to close the bug when posting from the local runner
mozmraiber Nov 10, 2026
b5f4ad5
Add option to needinfo the reporter from the local runner
mozmraiber Nov 10, 2026
c5ca969
Load the bug's fields after the review in the local runner
mozmraiber Nov 10, 2026
e2e604b
Add an off mode and a stitched full-page screenshot tool to the ETP M…
mozmraiber Nov 13, 2026
4335082
Add an autowebcompat-etp-compare agent comparing a site across ETP co…
mozmraiber Nov 13, 2026
53f8a63
Add the compare agent to the local runner
mozmraiber Nov 13, 2026
4aa5b4a
Add breakage tags to the ETP compare agent's verdict
mozmraiber Nov 13, 2026
14766fa
Show breakage tags in the local runner's compare view
mozmraiber Nov 13, 2026
ae5690e
Tag breakage per configuration in the ETP compare agent
mozmraiber Nov 18, 2026
93643dd
Register autowebcompat-etp with hackbot-api
mozmraiber Nov 18, 2026
2ebca9c
Merge remote-tracking branch 'origin/master' into autowebcompat-etp-a…
mozmraiber Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/hackbot-prod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ on:
# hackbot-deploy: names
options:
- agents/autowebcompat-diagnosis
- agents/autowebcompat-etp
- agents/autowebcompat-repro
- agents/bug-fix
- agents/build-repair
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ repos:
hooks:
- id: codespell
exclude_types: [json]
exclude: pnpm-lock\.yaml$
- repo: https://github.com/marco-c/taskcluster_yml_validator
rev: v0.0.13
hooks:
Expand Down
90 changes: 90 additions & 0 deletions agents/autowebcompat-etp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
FROM python:3.14 AS builder

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

ENV UV_PROJECT_ENVIRONMENT=/opt/venv
ENV UV_PYTHON_DOWNLOADS=never

WORKDIR /app

# Install external deps without building workspace members.
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=VERSION,target=VERSION \
uv sync --frozen --no-dev --no-install-workspace --package hackbot-agent-autowebcompat-etp

RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,target=/app,rw \
uv sync --locked --no-dev --no-editable --package hackbot-agent-autowebcompat-etp

FROM python:3.14 AS base

WORKDIR /app

ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PATH="/opt/venv/bin:$PATH"

FROM base AS agent

# The agent needs Node.js + npm to run the Firefox DevTools MCP server (an npm
# package; the python base ships neither) and the shared libraries Firefox
# requires. The Firefox binary itself is downloaded at agent startup via
# mozdownload/mozinstall (see browser.py). Unlike autowebcompat-repro there is
# no Chrome: the comparison is Firefox Standard vs Strict ETP, so the image also
# runs natively on arm64.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# Node.js, to run the Firefox DevTools MCP server.
nodejs npm \
ca-certificates \
# Firefox runtime deps.
libgtk-3-0 libdbus-glib-1-2 libx11-xcb1 libxtst6 libxt6 libpci3 \
libasound2t64 fonts-liberation \
# Codecs and audio/video related dependencies
ffmpeg \
# Window manager and display backend
fluxbox \
xvfb \
&& rm -rf /var/lib/apt/lists/*

# Install the DevTools MCP server from the pinned package.json/lockfile, then
# add the agent's ETP tools to it (see mcp/patch-mcp.mjs).
COPY agents/autowebcompat-etp/package.json \
agents/autowebcompat-etp/package-lock.json \
/app/etp/
COPY agents/autowebcompat-etp/mcp /app/etp/mcp
RUN cd /app/etp && npm ci --omit=dev \
&& node mcp/patch-mcp.mjs node_modules/@mozilla/firefox-devtools-mcp-moz

# hackbot.toml lives at the agent root (not inside the package), so copy it into
# the working dir; the runtime discovers it there (cwd) at startup.
COPY agents/autowebcompat-etp/hackbot.toml /app/hackbot.toml

RUN useradd --create-home --shell /bin/bash agent \
&& mkdir -p /workspace \
&& chown agent:agent /workspace /app/etp

ENV SCREEN_WIDTH=1280
ENV SCREEN_HEIGHT=1024
ENV SCREEN_DEPTH=24
ENV DISPLAY=:99.0

USER agent

COPY --from=builder /opt/venv /opt/venv

CMD ["python", "-m", "hackbot_agents.autowebcompat_etp"]

FROM base AS broker

RUN useradd --create-home --shell /bin/bash broker

USER broker

EXPOSE 8765

COPY --from=builder /opt/venv /opt/venv

CMD ["python", "-m", "hackbot_agents.autowebcompat_etp.broker"]
54 changes: 54 additions & 0 deletions agents/autowebcompat-etp/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
services:
autowebcompat-etp-broker:
build:
context: ../..
dockerfile: agents/autowebcompat-etp/Dockerfile
target: broker
environment:
BUGZILLA_API_URL: ${BUGZILLA_API_URL}
BUGZILLA_API_KEY: ${BUGZILLA_API_KEY}
expose:
- "8765"

autowebcompat-etp-agent:
build:
context: ../..
dockerfile: agents/autowebcompat-etp/Dockerfile
target: agent
environment:
- RUN_ID
- BUG_DATA
- BUG_ID
- MODEL
- EFFORT
- MAX_TURNS
- MODE
- BROKER_URL=http://autowebcompat-etp-broker:8765
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:?error}
# No uploader locally: summary/logs/attachments are written under
# /artifacts/<run_id>, bind-mounted to the host's ~/hackbot/artifacts.
- ARTIFACTS_DIR=/artifacts
volumes:
- ${HOME}/hackbot/artifacts:/artifacts
depends_on:
autowebcompat-etp-broker:
condition: service_started

# The comparison agent: same image, different entrypoint. Takes URL instead
# of a bug, and needs no broker.
autowebcompat-etp-compare-agent:
build:
context: ../..
dockerfile: agents/autowebcompat-etp/Dockerfile
target: agent
command: ["python", "-m", "hackbot_agents.autowebcompat_etp_compare"]
environment:
- RUN_ID
- URL
- MODEL
- EFFORT
- MAX_TURNS
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:?error}
- ARTIFACTS_DIR=/artifacts
volumes:
- ${HOME}/hackbot/artifacts:/artifacts
16 changes: 16 additions & 0 deletions agents/autowebcompat-etp/hackbot.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# autowebcompat-etp needs no platform prep: no [source] checkout, no [firefox] build.
# Subject comes from the request (bug_data / bug_id); the DevTools MCP drives a
# Firefox Nightly downloaded at startup.

# Infrastructure this agent runs on, applied by Terraform. Changing anything here
# changes the agent's shape and goes through an infra PR; the image ships on
# its own.
[deploy]
runtime = "cloud_run_job"
cpu = "6"
memory = "24Gi"
timeout_seconds = 7200

[deploy.broker]
cpu = "1"
memory = "512Mi"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import logging
from datetime import datetime
from typing import Literal

from autowebcompat_tools.inputs import BugDataInput, BugIdInput
from autowebcompat_tools.task import RunTracker, TaskConfig
from hackbot_runtime import (
HackbotAgentResult,
HackbotContext,
run_async,
)
from pydantic_settings import BaseSettings, SettingsConfigDict

from .agent import AutowebcompatEtpResult, Mode, run_autowebcompat_etp

logger = logging.getLogger("autowebcompat-etp")


class AgentInputs(BaseSettings):
broker_url: str
bug_data: str | None = None
bug_id: int | None = None
model: str | None = None
max_turns: int | None = None
effort: (
Literal["low"]
| Literal["medium"]
| Literal["high"]
| Literal["xhigh"]
| Literal["max"]
| None
) = None
headless: bool = False
# `retest` reruns an old bug with Firefox's ETP exceptions turned off.
mode: Mode = "investigate"

model_config = SettingsConfigDict(extra="ignore")

@property
def bugzilla_mcp_url(self) -> str:
return f"{self.broker_url.rstrip('/')}/mcp"


class AutowebcompatResult(HackbotAgentResult):
result: AutowebcompatEtpResult
start_time: datetime
end_time: datetime


async def main(ctx: HackbotContext) -> AutowebcompatResult:
start_time = datetime.now()
inputs = AgentInputs() # type: ignore

if inputs.bug_data is not None:
input_data: BugDataInput | BugIdInput = BugDataInput(bug_data=inputs.bug_data)
elif inputs.bug_id is not None:
input_data = BugIdInput(bug_id=inputs.bug_id)
else:
raise ValueError("set either BUG_ID or BUG_DATA")

tracker = RunTracker()
result = await run_autowebcompat_etp(
TaskConfig(
model=inputs.model,
max_turns=inputs.max_turns,
effort=inputs.effort,
log=ctx.log_path,
verbose=True,
headless=inputs.headless,
),
tracker,
input_data,
bugzilla_mcp_server={
"type": "http",
"url": inputs.bugzilla_mcp_url,
},
publish_file=ctx.publish_file,
mode=inputs.mode,
)
end_time = datetime.now()

result = AutowebcompatResult(
result=result,
num_turns=tracker.num_turns,
total_cost_usd=tracker.total_cost_usd,
start_time=start_time,
end_time=end_time,
)
logger.info("Run completed with result: %s", result)
return result


if __name__ == "__main__":
run_async(main)
Loading