Skip to content

affected-tests prints a summary and keeps each check's full output in a log #1521

Closed

Description

@JacobStephens2

This was generated by AI during triage.

From the 2026-10-28 retro of thirdshift's own runs, across its Mac and four servers (thirdshift.app, stephens.page, orchestrate, dev).

Sessions run scripts/affected-tests in the background and poll it. Since 2026-10-22 (issue numbers 1000 and up), about 5,800 tail/rg calls read /tmp/*.log test logs, across 189 sessions and up to 78 calls in one session. Each session invents its own log path and grep pattern (rg '^test result:|FAILED|^error:' …) to pull the result out of thousands of lines of cargo nextest or cargo test output.

Activity

  1. added
    enhancement
    needs-triage
    on Oct 28, 2026
  2. JacobStephens2 commented on Oct 28, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: scripts/affected-tests keeps each check's full output in a log file and prints only a short summary, the failures and the log's path.

    Current behavior:
    affected-tests streams every selected check's full output to the terminal. Agents redirect it to an ad hoc file under /tmp, then poll it with repeated tail and rg calls to find the result and the failing tests.

    Desired behavior:

    • Each selected command's full output goes to a log file in one predictable place inside the checkout, ignored by git. The script prints that path before the command starts.
    • After each command it prints one line: the command, pass or fail, and its wall time.
    • On failure it also prints the failing test names, and for Rust the panic messages. For the browser suites it prints the failing node --test cases. That's enough to start fixing without opening the log.
    • Exit status is unchanged: any failed command fails the script.
    • docs/testing.md documents the log location and the summary, so agents read those instead of polling.

    Key interfaces:

    • The scripts/affected-tests <base> command line stays the same. A flag that restores today's streaming output is optional.
    • The script's own tests (scripts/test_affected_tests.py) cover the new output.

    Acceptance criteria:

    • A passing run prints one summary line per selected command, with the log path and wall time, and none of the raw test output.
    • A run with a failing Rust test prints that test's name and panic message, and exits non-zero.
    • A run with a failing browser test (site) prints the failing case's name, and exits non-zero.
    • Log files are written in a git-ignored location in the checkout, one per command, and named so they can be told apart.
    • python3 -m unittest discover -s scripts -p 'test_*.py' passes, covering the new behavior.
    • docs/testing.md describes the summary and where the logs are.

    Out of scope:

    • Which tests are selected (that's the separate selection issue).
    • Running checks in parallel, or in the background on the agent's behalf.
  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 28, 2026
  4. removed
    in-progress
    on Oct 28, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions