Skip to content

infra(ci): per-test time budget and reduced sweeps (#2888, #1592) - #3012

Merged
zackees merged 2 commits into
masterfrom
infra/2888-2072-1592-critical-path
Oct 30, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2888-2072-1592-critical-path

Conversation

@zackees

@zackees zackees commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Refs #2888, #2072, #1592

Merge-queue critical-path items batched in one PR (maintainer direction: batch similar issues to cut CI runs).

#2888: per-test time budget and reduced sweeps

  • RED 3bb9d376c: ci/test_nextest_budget.py fails (no slow-timeout, no overrides); parity::{percent_at,keep_at,sweep_at} are todo!() stubs that the new parity_cases::sweeps tests hit.
  • GREEN ec80c75ec:
    • ci/nextest.toml: slow-timeout = { period = "10s", terminate-after = 3 } on default, with named overrides that cite perf(ci): 26 Rust tests take 48 % of the Fast Gate test time; add a per-test time budget #2888 (the native build test, the two 2^32 sweeps). There is also a [profile.full] that reports SLOW but times nothing out. ci/local_gate.py picks full when OBS_PARITY_CASES is unset or full (local runs, nightly, release), and default otherwise (PR, queue, master push).
    • obs_c_oracle::parity::sweep(range) and keep(i) reuse the OBS_PARITY_CASES level from infra(obs-c-oracle): scale parity proptest cases by CI level (#2593 part B) #2991. At full they visit everything. At reduced they visit one value per window of ten (at a hashed offset) and a fixed hashed tenth of a grid. The edge words, the named codes and edge_values still run on every level.
    • Applied to the 6 tests that were still over 10 s on the reduced level in queue run 41005438965.
    • Added the testing-policy "Test time" section, plus the "Test cost" line in obs-worker §4/§5 and in the obs-coordinator review.

Measured locally (debug, one test at a time, same machine):

Test CI before (run 41005438965, reduced) local full local reduced
render_route_parity::filter_decisions_every_filter 24.8 s 28.2 s 2.3 s
video_tick::edge_proptest_tick_runs 19.7 s 11.8 s 1.2 s
translations::store_calls_follow_members 19.0 s 27.4 s 2.8 s
output_stop_parity::callers_match_c 14.6 s 22.1 s 2.1 s
round::exhaustive_matches_libm 13.1 s n/m 2.7 s*
video_fourcc_parity::every_u32_matches_c_oracle 12.5 s n/m 3.1 s*

* measured with other tests running at the same time. These 6 tests took 104 s of test time per Fast Gate run and now take about 14 s. Mutants were not rerun: the reductions keep every assertion and every edge row, and they sample the rest. Tiers are unchanged.

Test cost: the new parity_cases::sweeps tests take 0.2 s at most, run on no threads of their own, and allocate under 1 MB. The changed tests are shown above.

#2072: dropped from this PR

I tried overlapping the apt install with the zccache restore (the commits were dropped after measuring). On this PR's first run (job 123921892373) the setup got slower: the restore took 88 s and the wait step another 28 s, 116 s in total, against 34 s + 53 s = 87 s run back to back in run 41005438965. The two steps compete for the same disk, so overlapping them does not pay. The finding is recorded on #2072, and that item is released.

#1592: prepared Tier 2 image, measured

No code. I measured the Tier 2 Linux test jobs in the last 60 successful CI runs: all 150 used prepared (plus the delta), and setup_seconds was 28.6 s median (20.5–59.0 s). The stock baseline was 55.6 s in the fresh experiment and 75–79 s before #2085. Decision recorded on the issue: keep prepared.

Checks

The new and changed Python tests pass (test_nextest_budget, test_rust_execution). ./lint has one failure, test_check_changes.py (git: command not found in its subprocess environment). It fails the same way on master in this checkout, so it is not caused by this PR.

ci/test_nextest_budget.py fails: ci/nextest.toml has no slow-timeout and
no named overrides. obs_c_oracle::parity::{percent_at,keep_at,sweep_at}
are todo!() stubs; the sweeps tests in parity_cases panic on them.
…_CASES (GREEN, #2888)

- ci/nextest.toml: slow-timeout 10s x3 on the default profile, named
  overrides citing #2888 (native build test, the two 2^32 sweeps); a
  [profile.full] for the full parity level, picked by ci/local_gate.py.
- obs_c_oracle::parity::{sweep,keep}: the 2^32 sweeps visit one value per
  window of ten and large grids a fixed tenth below the full level.
- round, fourcc, output_stop callers_match_c, render_route
  filter_decisions_every_filter, video_tick edge proptest and hotkey
  store_calls_follow_members use them (or parity::cases).
- testing-policy "Test time"; obs-worker/obs-coordinator Test cost line.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: LGTM; it implements the #2888 decision as posted.

  • RED → GREEN for each of the three parts (ci/test_nextest_budget.py, parity_cases::sweeps against todo!() stubs, ci/test_tier2_setup_overlap.py).
  • sweep/keep keep every assertion and the edge rows at every level; full (local, nightly, release) still visits the whole 2^32 range, so the exhaustive guarantee moves to nightly, as decided. Window math is sound (100 / percent, last window clamped with len).
  • [profile.full] reports SLOW without terminating, so the nightly full sweeps can't time out on the 30 s budget.
  • Tier 2 overlap: the background install records PIPESTATUS[1] (the xargs/apt status, not grep), writes it atomically via mv, and the join step re-raises it with a 15-minute cap, so a failed install still fails the job. The apt save correctly moved after the join.
  • Correct call to leave the real-time sleeps in the existing C tests alone (AGENTS.md: no edits to C tests); #838's decision covers that separately.

Queue on green.

@zackees
zackees force-pushed the infra/2888-2072-1592-critical-path branch from 3c7f82d to ec80c75 Compare October 30, 2026 06:25
@zackees zackees changed the title infra(ci): per-test budget, reduced sweeps, Tier 2 setup overlap (#2888, #2072, #1592) infra(ci): per-test time budget and reduced sweeps (#2888, #1592) Oct 30, 2026
@zackees
zackees added this pull request to the merge queue Oct 30, 2026
Merged via the queue into master with commit 7dafc5c Oct 30, 2026
39 checks passed
@zackees
zackees deleted the infra/2888-2072-1592-critical-path branch October 30, 2026 06:49
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Oct 30, 2026
MCPVOT pushed a commit to MCPVOT/obs-studio that referenced this pull request Oct 30, 2026
…ild capped at 2 (obs-rust#3071) (obs-rust#3082)

* test(ci): pin Fast Gate oversubscription and the native_build group (obs-rust#3071)

RED: the nextest config has no test groups and ci/local_gate.py still returns
min(4, cpu). The three assertions fail on master.

* perf(ci): oversubscribe Fast Gate nextest to 8 threads, native_build at 2 (obs-rust#3071)

GREEN: `test_threads()` default is 8 (the CI runner has 4 vCPUs, but the test
binaries block on I/O and subprocesses), and `ci/nextest.toml` puts every
`native_build::*` test in a `native-build` group capped at 2 concurrent tests
in both the default and the full profile (the obs-rust#3012 30 s budget moves from the
one Objective-C test to the whole module).

Local, pinned to 4 cores, OBS_PARITY_CASES=reduced: 4 threads 150 s, 8 threads
124 s, 0 timeouts.

Refs obs-rust#3071

* perf(ci): run Fast Gate nextest at 6 threads, not 8 (obs-rust#3071)

8 threads timed out `obs-data::obs-tests-core source::audio_input::
edge_downmix_model` (30 s budget, run 41095350931) and the lane's nextest wall
went 122.9 s, so the oversubscription is a loss on this runner as configured.
6 is the largest bound that the issue's 4-core measurement did not make worse,
and the `native-build` group (max-threads 2) covers the failures it did show.

Refs obs-rust#3071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant