Repository navigation
Description
Dashboard E2E Tests is red on main: run 32115101362 at ee1fffdde (2026-08-18T08:11Z), 27 failed / 1 flaky / 33 passed of 65. Last green: 2026-08-17T08:16Z at 47477ca76. Every failure is either element(s) not found on Tower-served pages or an API-contract assertion — across dashboard-bugs, dashboard-terminals, team-tab and siblings, i.e. environment-shaped, not one feature.
Root cause: the PR #1421 auth enforcement, reaching the one suite that never runs on PRs
PR #1421 (advisory GHSA-xvjp-7748-v88v) put every Tower route outside a narrow public allowlist behind the shared local key. Its in-PR CI fix (acb828560, "authenticate Tower e2e suites") keyed the vitest harness — a global fetch wrapper in packages/codev/vitest-e2e-setup.ts plus socket-key plumbing in tower-test-utils.ts. That made the required checks green.
The dashboard suite is a Playwright harness (packages/codev/src/agent-farm/__tests__/e2e/*.test.ts), which the vitest setup file cannot touch — and its workflow is schedule-only, so it never runs on a PR. It kept making keyless requests (dashboard-bugs.test.ts hits http://localhost:4100 and the workspace API with no key anywhere; grep for key/auth in those files comes back empty), and turned red the first time its schedule fired after the merge.
Timeline: green daily through 08-17 08:16 → #1421 merged in f1a5b3bd9 → red at the next scheduled run, 08-18 08:11.
The fix is alignment with the shipped browser design, not a bypass
server-utils.ts shows the intended browser flow: /, /index.html and the SPA shell under /workspace/<enc>/ are public; the key is injected into the shell same-origin, and the shell presents it on every data fetch; all api//ws/ subpaths stay keyed (isPublicRoute, server-utils.ts:142-160; injection note at :291-293).
So the suite splits two ways:
- Tests that drive the real UI (front page instances, SPA views) should keep doing exactly that and pass because the shell's key injection works — if any of these still fail once direct-API tests are keyed, that is a product bug in the injection path, not a test gap, and it is the part of this failure worth caring about most.
- Tests that hit APIs directly (
/api/state,/api/team, proxy API, WS handshakes) must present the key the way a real client does — e.g.browser.newContext({ extraHTTPHeaders })with the local key, or the suite's own fetch helper, mirroring whatvitest-e2e-setup.tsdid for the other harness.
Two structural notes for whoever picks this up
- "Checks green on the PR" and "all workflows that will run against this commit" are different sets. A schedule-only workflow can only ever fail after merge, so any change with a known test-impact class (here: "keyless e2e requests now 401") needs that class chased across all harnesses, not just the ones the PR can turn red. This was even foreseen: the 08-12 review explicitly deferred "the e2e-auth update" as a fast-follow for the suites that were red — the suites that couldn't go red on the PR never made the list.
- This is the instrument lesson again: the PR's green board was true of the PR's check set, not of the commit's future. Nothing lied; the question answered was narrower than the one that mattered.
Related: #1421 (the enforcement), advisory GHSA-xvjp-7748-v88v, #1435/#1456 (the other current CI-signal noise — note today's alert was a TRUE positive, unlike #1456's two false ones this week).
Activity
amrmelsayed commentedon Aug 18, 2026
On it! Working on a fix now.
Fix #1519: authenticate the Playwright dashboard-e2e harness to Tower
Fix #1519: scope Playwright e2e Tower auth to same-origin (CMAP round 1)
Fix #1519: CMAP round-2 polish (timeout constant, baseURL, test docst…
[Bugfix #1519] Update builder thread: CMAP round 2 + green e2e valida…
Merge pull request #1520 from cluesmith/builder/bugfix-1519