Skip to content

E2E Tests is ~25% flaky on main (4 of last 15 pushes), so a red check on a PR carries little information #1550

Description

@khaliqgant

Summary

E2E Tests has failed 4 of the last 15 pushes to main — a ~25% failure rate on the trunk. At that rate a red E2E Tests on any PR carries almost no information: roughly one in four is the suite, not the change.

Found while diagnosing two red checks on relay#1546. Both reproduced on main at commits that predate that PR, with byte-identical signatures — so the PR was cleared, but only because someone went and looked.

The two reproducing signatures

1. agent-relay node status hangs after printing complete output.

On main at 62acd373 (2026-08-16 08:17), job 95138136703:

[INFO] Testing: agent-relay node status (with 10s timeout)
Status: RUNNING
Workspace source: unknown (startup provenance was not recorded)
[ERROR] status command timed out (hung for >10s)

Byte-for-byte identical on relay#1546's job 95258953989.

The command prints every field and then fails to exit. Traced: node statusrunStatusCommandreadBrokerStatusDetails (broker-lifecycle.ts:2200) → HarnessDriverClient.getStatus() → HTTP GET /api/status. The hang sits precisely between the last line runStatusCommand prints and the first line it would print from statusDetails — i.e. in the HTTP call. The broker's handler (runtime/api.rs:1802) is a pure in-memory read on the actor loop with no network await, so the stall is on the client side of that call.

Not runner load: the macos-latest E2E matrix cell passed on the same head, same CI infrastructure, same moment.

2. Package Validation — standalone broker never reports readiness.

Reproduced on main at 87ada407 (2026-08-15 21:53), job 95075182762: Standalone broker did not report readiness within 30s.

On a fresh runner no workspace is preconfigured, so standalone up attempts to create one and hits the network. The failure is in the workspace-creation network path, which surfaces as Failed to start broker: Unable to connect. Is the computer able to access the url? — an undici TypeError from fetch.

Why this is worth fixing rather than tolerating

A 25%-flaky trunk check degrades every downstream judgement:

  • A red check stops being evidence. Tonight a PR with two red checks turned out to be entirely clean, and establishing that took a dedicated investigation with main-baseline reproduction.
  • It trains people to ignore red, which is precisely how a real failure ships.
  • It compounds with relay#1549 (bot-authored commits parking workflows at action_required): between suppressed runs and flaky runs, "not green" now has at least three distinct meanings — failed, never ran, or flaked.

Suggested direction

  1. node status should not be able to hang. Whatever the client-side timeout is on getStatus(), it is not firing inside the harness's 10s budget. A bounded timeout with a clear error beats an indefinite wait.
  2. standalone up should not require network workspace creation to report readiness in a smoke test — or the smoke test should provision a workspace first, so a network failure is not indistinguishable from a broker failure.
  3. Track the flake rate. Four in fifteen is measurable; if nobody is measuring it, it will not improve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions