From 550f6962dbc7f47b2dd6328682f8e82a041d6e4c Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 15 Nov 2026 09:46:37 +0000 Subject: [PATCH] fix(e2e): repair the e2e tests the skills unify merges made stale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After about 27 merged branches 28 e2e items failed on 9 causes: tests clicked the new voice-input mic instead of Record, the #tasks/match screen was missing from SCREENS, a test patched render on a frozen dataclass, a cleanup row had no local plan, live rows were stamped in the future, and a renamed helper shadowed self.local. The composer now keeps its mic in the action row like the agent form, so the Home radio tile shows two history rows at 960 px. 🎯 Fix: 85 % 💥 Break: 3 % 💸 Tokens: 100 % ⏱️ Velocity: 100 % 🛡️ Security: 95 % 🏆 Score: 78 🚦 Gate: ⛔ fix 85 % < 90; security 95 % < 100: ask the operator before the commit Co-Authored-By: Claude Opus 5.5 --- orchestrator/templates/page-composer.js | 2 +- tests/e2e/test_firewall_e2e.py | 6 +++--- tests/e2e/test_home_bookmarks_e2e.py | 2 ++ tests/e2e/test_hub_bubbles_live_e2e.py | 2 +- tests/e2e/test_inbox_gone_rows_e2e.py | 10 +++++----- tests/e2e/test_orchestrator_e2e.py | 6 +++--- tests/e2e/test_radio_layout_e2e.py | 6 +++--- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/orchestrator/templates/page-composer.js b/orchestrator/templates/page-composer.js index 52a312c..20662b7 100644 --- a/orchestrator/templates/page-composer.js +++ b/orchestrator/templates/page-composer.js @@ -187,7 +187,7 @@ channel.addEventListener("change", sync); sync(); const form = h("form", {class: "composer"}, h("div", {class: "composer-grid"}, h("label", {}, "Channel", channel), toField), text, replay, - h("div", {class: "actions"}, record, status, hint, submit)); + h("div", {class: "actions"}, record, micButton(text, false), status, hint, submit)); form.addEventListener("submit", async (event) => { event.preventDefault(); const direct = TO_ONE.some(([id]) => id === channel.value); diff --git a/tests/e2e/test_firewall_e2e.py b/tests/e2e/test_firewall_e2e.py index b052049..c86b1ab 100644 --- a/tests/e2e/test_firewall_e2e.py +++ b/tests/e2e/test_firewall_e2e.py @@ -220,7 +220,7 @@ class TestFirewallE2E(HubCase): self.writer = writer_host.Writer(trust, home, tree) self.spool = self.state / "firewall" verifier.write_private(self.spool / "view.json", self.writer.view()) - self.local = f"http://localhost:{self.port}/" + self.page_url = f"http://localhost:{self.port}/" def host_unit(self) -> None: if any((self.spool / "jobs").iterdir()): @@ -235,7 +235,7 @@ class TestFirewallE2E(HubCase): steps = [] for index, (width, height) in enumerate(base.WIDTHS): values = {"SECRET": SECRET, "FILE": str(self.settings), "ENTRY": f"Bash(make lint-{width}:*)", "REMOVE": "true" if index == 0 else "false"} - steps.append({"width": width, "height": height, "url": f"{self.local}?{width}#stream/rules", "wait": 1500, "probe": probe(SHOW, values), "shot": str(OUT / f"chromium-{width}-firewall.png")}) + steps.append({"width": width, "height": height, "url": f"{self.page_url}?{width}#stream/rules", "wait": 1500, "probe": probe(SHOW, values), "shot": str(OUT / f"chromium-{width}-firewall.png")}) steps.append({"width": width, "height": height, "url": None, "wait": 0, "probe": probe(SIGN, values), "shot": str(OUT / f"chromium-{width}-firewall-signed.png")}) data = self.drive(steps, authenticator) (OUT / "chromium-firewall.json").write_text(json.dumps(data, indent=1), encoding="utf-8") @@ -282,7 +282,7 @@ class TestFirewallE2E(HubCase): def test_chromium_names_a_group_and_signs_a_rule_for_it(self): authenticator = self.authenticator() - steps = [{"width": 1366, "height": 768, "url": f"{self.local}#stream/rules", "wait": 1500, "probe": probe(GROUP_RULE, {}), "shot": str(OUT / "chromium-1366-firewall-group-rule.png")}] + steps = [{"width": 1366, "height": 768, "url": f"{self.page_url}#stream/rules", "wait": 1500, "probe": probe(GROUP_RULE, {}), "shot": str(OUT / "chromium-1366-firewall-group-rule.png")}] data = self.drive(steps, authenticator) (OUT / "chromium-firewall-group.json").write_text(json.dumps(data, indent=1), encoding="utf-8") self.assertEqual(data["errors"], []) diff --git a/tests/e2e/test_home_bookmarks_e2e.py b/tests/e2e/test_home_bookmarks_e2e.py index eb3e3cc..367745a 100644 --- a/tests/e2e/test_home_bookmarks_e2e.py +++ b/tests/e2e/test_home_bookmarks_e2e.py @@ -24,6 +24,7 @@ from hub_support import ( LONG_TASK, LONG_VOLUME, LONG_WORKTREE, + MERGED_BRANCH, iso, long_repos, long_task, @@ -322,6 +323,7 @@ class TestHomeBookmarks(HubCase): scan = json.loads(self.tree_file.read_text(encoding="utf-8")) scan["repos"] += long_repos() self.tree_file.write_text(json.dumps(scan), encoding="utf-8") + self.write_local_plan(scan, {MERGED_BRANCH: {"skip": None, "actions": ["local-branch"]}}) def vanish(self) -> None: register = self.council / "rasci.json" diff --git a/tests/e2e/test_hub_bubbles_live_e2e.py b/tests/e2e/test_hub_bubbles_live_e2e.py index a307e6d..8b6275c 100644 --- a/tests/e2e/test_hub_bubbles_live_e2e.py +++ b/tests/e2e/test_hub_bubbles_live_e2e.py @@ -176,7 +176,7 @@ class TestLiveBubbles(HubCase): stamp = time.time() rows = [ { - "ts": stamp + index / 1000, + "ts": stamp - (len(cues[word]) - 1 - index) / 1000, "from": sender, "to": to, "text": text, diff --git a/tests/e2e/test_inbox_gone_rows_e2e.py b/tests/e2e/test_inbox_gone_rows_e2e.py index 32f3317..66cb563 100644 --- a/tests/e2e/test_inbox_gone_rows_e2e.py +++ b/tests/e2e/test_inbox_gone_rows_e2e.py @@ -78,16 +78,16 @@ class TestInboxGoneRows(HubCase): super().setUp() OUT.mkdir(parents=True, exist_ok=True) self.write_tree() - hub = self.httpd.hub - real = hub.render + frozen = type(self.httpd.hub) + real = frozen.render - def render(nonce: str) -> tuple[str, str]: + def render(hub: object, nonce: str) -> tuple[str, str]: self.write_council({"rasci.json": SHOWN}) - page = real(nonce) + page = real(hub, nonce) self.write_council({"rasci.json": LEFT}) return page - patch = mock.patch.object(hub, "render", render) + patch = mock.patch.object(frozen, "render", render) patch.start() self.addCleanup(patch.stop) diff --git a/tests/e2e/test_orchestrator_e2e.py b/tests/e2e/test_orchestrator_e2e.py index 3186a66..1583401 100644 --- a/tests/e2e/test_orchestrator_e2e.py +++ b/tests/e2e/test_orchestrator_e2e.py @@ -35,7 +35,7 @@ OUT = Path(os.environ.get("E2E_OUT", "/tmp/orchestrator-phase4-shots")) WIDTHS = ((1920, 1080), (1366, 768), (390, 844)) VIEWS = ("orbit", "chord", "swimlane", "tree", "3d") TASK_VIEWS = ("list", "board", "rasci", "gantt", "burn", "3d") -SCREENS = ["home", "stream", "tasks/operator", "stream/rules", *(f"{tab}/{view}" for tab in ("agents", "artifacts") for view in VIEWS), "agents/hierarchy", *(f"tasks/{view}" for view in TASK_VIEWS), "resources"] +SCREENS = ["home", "stream", "tasks/operator", "tasks/match", "stream/rules", *(f"{tab}/{view}" for tab in ("agents", "artifacts") for view in VIEWS), "agents/hierarchy", *(f"tasks/{view}" for view in TASK_VIEWS), "resources"] SUBS = ["Firewall"] TABS = ["Home", "Stream", "Agents", "Artifacts", "Tasks", "Resources"] HELPERS = """ @@ -647,7 +647,7 @@ COMPOSE = """(async () => {@HELPERS@@SPOT_OPEN@ channel.value = "call"; channel.dispatchEvent(new Event("change", {bubbles: true})); recipient.value = "@TO@"; - const record = all("button", form).find((button) => button.hasAttribute("aria-pressed")); + const record = all("button", form).find((button) => button.hasAttribute("aria-pressed") && !button.classList.contains("mic")); record.click(); await sleep(1500); const recording = record.getAttribute("aria-pressed"); @@ -839,7 +839,7 @@ SPOT_SEND = """(async () => {@HELPERS@ inline: [getComputedStyle(spot).position, spot.getBoundingClientRect().bottom <= main.getBoundingClientRect().top, spot.parentElement.nextElementSibling === main], toolbar: all('#main [role="toolbar"] > *').map((node) => name(node.tagName === "DETAILS" ? node.querySelector("summary") : node)), channels: all("option", channel).map((option) => option.value), - record: all("button", form).filter((button) => button.hasAttribute("aria-pressed")).map(text), + record: all("button", form).filter((button) => button.hasAttribute("aria-pressed") && !button.classList.contains("mic")).map(text), heads: all(".spot-head button", spot).map((button) => [name(button), button.title]), @FITS@, }; diff --git a/tests/e2e/test_radio_layout_e2e.py b/tests/e2e/test_radio_layout_e2e.py index a4a0771..444b835 100644 --- a/tests/e2e/test_radio_layout_e2e.py +++ b/tests/e2e/test_radio_layout_e2e.py @@ -281,7 +281,7 @@ HOME = """(async () => {@HELPERS@@PROBES@ log: [tile("radio-log").querySelectorAll(".radio-row").length, tile("radio").querySelectorAll(".radio-row").length, document.querySelectorAll("#radio-spot .radio-row").length], gone: all("#main .home-tile.gone").length, stars: all("#main .home-tile .home-body .star").length, - ids: all("#main .home-tile .home-body [id]").map((node) => node.id), + ids: all("#main .home-tile .home-body [id]").map((node) => node.id).filter((id) => !id.startsWith("mic-field-")), }; const count = (id) => tile(id).querySelectorAll(".radio-row").length; const before = [count("radio-log"), count("radio")]; @@ -418,7 +418,7 @@ SPOT = """(async () => {@HELPERS@@PROBES@@SPEAKING@ states.stations.closed = [fold.open, document.activeElement === summary]; } if (wanted.includes("voice")) { - const record = all("button", form).find((button) => button.hasAttribute("aria-pressed")); + const record = all("button", form).find((button) => button.hasAttribute("aria-pressed") && !button.classList.contains("mic")); record.click(); await sleep(1300); record.click(); @@ -699,7 +699,7 @@ COMPOSE_HOME = """(async () => {@HELPERS@@PROBES@ const homeSpeak = tile("radio-speak"); const form = (root) => root.querySelector("form.composer"); const area = (root) => form(root).querySelector("textarea"); - const record = (root) => all("button", form(root)).find((button) => button.hasAttribute("aria-pressed")); + const record = (root) => all("button", form(root)).find((button) => button.hasAttribute("aria-pressed") && !button.classList.contains("mic")); const note = (root) => { const audio = form(root).querySelector(".voice-note audio"); return audio ? audio.getAttribute("src").replace("/api/voice/", "").replace(".wav", "") : null;