Skip to content

Decide how much of the Rust suite a local run selects on 4-core hosts #1522

Open

Description

@JacobStephens2

This was generated by AI during triage.

From the 2026-10-28 retro of thirdshift's own runs.

scripts/affected-tests selects the full Rust suite for any change outside site/ and the release scripts, so almost every change gets it. On the 4-core hosts (thirdshift.app, stephens.page), recorded /usr/bin/time wall times for a full run have a median of 19 to 23 minutes and a p90 of 36 to 37 minutes; on dev (8 cores) the median is 6 minutes. On the two 4-core hosts, sessions since 2026-10-22 that ran it spent a median of about 32 minutes in full-suite runs (p90 68, up to 5 runs per session; rough, from tool-output timings). The median implement session lasts 43 minutes. CI already runs the suite sharded on every PR.

This needs a decision, so it's not ready for an agent yet:

  • Narrow Rust selection: --bin thirdshift plus --test <name> for each changed tests/<name>.rs. This is fast, but most integration tests exercise the binary end to end, so a src/** change could break one that isn't selected, and CI would catch it later. Each CI-red Repair costs a session; there were 49 of them since 2026-10-15.
  • Keep the full suite but run it once: the session's last validation only, with focused tests while iterating. docs/testing.md already says to reuse green CI for the exact head; sessions still run the full suite several times.
  • Lean on CI: push early and treat CI as the full run, as docs/testing.md suggests. Local runs stay focused.
  • Hardware: the 4-core hosts are the outliers.

Related: #724 (introduced the conservative selection, "adding a new area cannot silently opt it out"), #1396 (wall-clock tests that fail only under a loaded full local run).

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.

    Related: #1521 (summary output) makes each full run cheaper to read, whatever selection is chosen.

  3. added
    ready-for-human
    and removed
    needs-triage
    on Nov 9, 2026
  4. JacobStephens2 commented on Nov 9, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Evidence from the 2026-11-09 retro

    Ticket runs on this repository from 2026-10-29 to 11-09, on four hosts: 98 runs, 95 merged.

    What the local full suite costs

    • 88 of 99 implement sessions ran scripts/affected-tests: 202 invocations, and 45 of those sessions' 99 hours. That is a median of 30 minutes per session, where the median session lasts 58.
    • A full run that passes takes a median of 38 to 52 minutes, depending on the host.
    • Across all session kinds the script exited green in 97 of 294 invocations, 33%, down from 48% in the two weeks before. Another 53 were interrupted. In the sessions read, the session stopped the run once CI went green.
    • In 47 of the 88 implement sessions the script never passed, and the session pushed anyway.

    What it buys

    What sessions do meanwhile

    Recommendation

    The third option above, lean on CI:

    • A session runs what its change touches: the unit tests of the modules it edited, each integration test file it edited, and the site or Console browser tests when it touches those areas. It also compiles every test target (cargo test --no-run), which catches a signature change that breaks a test it didn't select.
    • The session then pushes, opens the pull request and ends without waiting for CI. The CI watch stage and the CI-red Repair own the full suite's result.
    • scripts/affected-tests makes that selection, so final validation stays one command.

    What to watch for two weeks afterwards: CI-red Repairs per 100 Ticket runs (8 now) and the median implement session (58 minutes now). A rough break-even on time alone: the change saves about 22 minutes per Ticket run, and one more CI-red Repair costs about 52 (a 34-minute Repair session and an 18-minute CI round). So CI-red Repairs would have to rise by about 40 per 100 runs before the saving is gone.

    Still the Day shift's decision: whether a src/** change may skip integration tests it didn't edit. That is the question this issue was opened on.

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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions