Skip to content

affected-tests prints a failing browser test's name without its error message #1898

Closed

Description

@JacobStephens2

This was generated by AI during triage.

From the 2026-11-09 retro of thirdshift's own runs.

Agent Brief

Category: bug
Summary: When a browser test fails, the scripts/affected-tests summary prints the test's name and then a bare error: |-. The message stays in the log, so the summary isn't enough to start investigating.

Current behavior:

node --test reports a multi-line failure as a block of this shape:

not ok 1 - Command details copies its show command to the clipboard
  ---
  duration_ms: 30012.4
  failureType: 'testCodeFailure'
  error: |-
    locator.waitFor: Timeout 30000ms exceeded.
    Call log:
      - waiting for getByRole('button', { name: 'Copy' }) to be visible
  code: 'ERR_TEST_FAILURE'
  ...

The failure summary keeps the not ok line and the error: |- line, and drops the lines under it. This is what a session saw:

not ok 1 - Command details copies its show command to the clipboard
  error: |-
not ok 2 - Command details selects its show command when the clipboard is refused
  error: |-

A one-line error, error: 'wrong page', is printed in full, and that is the only form the selector's tests cover. Playwright timeouts and assertion failures span several lines. In the spec reporter's output, the Error: line under a failing test's name is dropped as well.

Between 2026-10-29 and 11-09, six Console browser tests failed together in about 7 issues on three hosts. Sessions opened the log to learn why, and the retro could not tell the cause from the Session traces.

Desired behavior:

For each failing browser test, the summary prints its name and its error message: the lines of the error block with their shared indentation removed, up to a fixed cap of about 15 lines per test. Stack frames, duration_ms, failureType and the other diagnostic keys stay out, as now. The spec reporter's error lines under a failing test are printed under the same cap. Rust failure output is unchanged.

Key interfaces:

  • print_failures in scripts/affected-tests: follows a multi-line error block to its end, the way it already follows a Rust panic message.
  • docs/testing.md: its description of the summary says browser failures include the error message.

Acceptance criteria:

  • For a TAP block like the one above, the summary includes the not ok line and the message lines. It includes no duration_ms, failureType or code line and no bare error: |-.
  • A message longer than the cap is cut at the cap, followed by a line saying how many lines were left out.
  • For the spec reporter, the Error: line under a failing test is printed.
  • The one-line form error: 'wrong page' is still printed.
  • Passing tests print nothing, and the selector's existing Rust cases pass unchanged.
  • python3 -m unittest discover -s scripts -p test_affected_tests.py passes.

Out of scope:

  • Why those six Console browser tests failed.
  • Changing the test reporter, or what the log keeps.

Activity

  1. added
    bug
    ready-for-agent
    in-progress
    agent-failed
    and removed
    ready-for-agent
    in-progress
    on Nov 9, 2026
  2. JacobStephens2 commented on Nov 10, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Handed back to Pickup. in-progress is off and ready-for-agent is on, so the next thirdshift Pickup that is not skipped for the Command limit can continue this issue. Where agent-failed is still present, that pass takes it off as the Day shift's acknowledgement.

  3. added
    in-progress
    and removed
    agent-failed
    ready-for-agent
    on Nov 10, 2026
  4. removed
    in-progress
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions