Skip to content

ci: a 78s-per-leg Unity step regression stayed green for two days because nothing watches step durations #410

Description

What happened

#394 merged on 2026-08-13 and added a test whose scanner was quadratic in file length (#407). It added 78 seconds to the EditMode step on every editor leg -- about 5.2 minutes per Unity Tests run, all of it inside the organization build-lock window.

Every run stayed green. It was found two days later, and only because the scan eventually blew a per-test timeout on a developer's machine during a local MCP run. CI never complained, because nothing in CI looks at how long a step takes.

The signal was already there

Step durations over the last 24 green Unity Tests runs on master (52 successful editor legs), split at the #394 merge:

Step Before (n=24) After (n=28) Delta
Run Unity Test Runner (EditMode) 35.8s 113.8s +78.0s
Run Unity PlayMode tests 50.7s 48.2s -2.5s
Run Unity standalone tests 63.3s 57.6s -5.7s

That is a 3.2x step regression, isolated to one step, obvious in the first run after the merge, and already available from GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs with no new instrumentation. #409 takes it back to a 36.3s mean.

The tension, stated up front

The repository's tooling philosophy is explicitly against bespoke validators, wrappers, and preflight/doctor machinery, and this is exactly the kind of thing that grows into a monitoring subsystem. So this issue records the gap; it does not assume something should be built.

SuiteWallClockBudgetTest already exists and did not catch this, which is worth understanding before adding anything: it asserts a per-version ceiling on the default suite (300s on 2021.3, 180s on 2022.3 and 6000.x), and a 78s regression on a leg that was previously well under the ceiling does not cross it. A budget that only fires at a fixed ceiling cannot see a 3.2x regression with headroom left.

Options, cheapest first

  1. Nothing. Accept that step regressions are found when they eventually break something. This was found in two days, and the cost was CI minutes, not correctness. This is a legitimate answer.
  2. Tighten the existing budget instead of adding a new mechanism. SuiteWallClockBudgetTest already warns past a 60s soft budget. If the soft warning were visible in the job summary rather than only in the log, Isolate EditMode scene fixtures #394 would have flagged itself on the first run. No new script, no new workflow.
  3. A step-duration comparison in an existing job. The aggregate gate already runs; comparing the current run's three Run Unity * step durations against a rolling median of recent green master runs is one API call. This is the option most at odds with the tooling philosophy and should not be taken without the owner agreeing the recurring cost is worth it.

Revisit if

  • A second step-duration regression of this size reaches master undetected.
  • Unity Tests wall clock regresses without a corresponding correctness failure.
  • Work on [Feature]: chore/research: CI Test Optimization #337 resumes, since this is now the cheapest remaining lever there -- the licensed section is test execution, not scheduling, and it moved by five minutes without anyone noticing.

Context and full measurements: #337 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions