Skip to content

test(ci): hotkey large_templates_match_c crosses the 30 s budget in Fast Gate and turns queue runs red #3109

Closed

Description

@zackees

What

hotkey::translations_parity::large_templates_match_c (rust/obs-hotkey/tests/hotkey/translations_parity.rs:310) took long enough to hit the 30 s per-test budget in a merge-queue run, turning Fast Gate red:

  • merge-queue run 41133193773 (head d0daa4271, 2026-10-30T21:44Z), job 124329262062:
    TIMEOUT [30.008s] (2077/5468) obs-data::obs-tests-core hotkey::translations_parity::large_templates_match_c
    → 5468 tests run: 5467 passed (1 slow), 1 timed out.
  • The next merge-queue run 41135249870 (head 06e8b43e5, 22:04Z) passed, with the same test reported SLOW [> 10.000s] at 121 s into the run (job 124336809231).

So the test usually takes between 10 s and 30 s in the CI debug build and crosses the budget when the 4-vCPU runner is loaded. It is deterministic, not a proptest: it builds three fixed templates of 1 MiB, 100 000 %1 repeats and 64 KiB padding and runs each through the C oracle and the Rust parser.

Why it matters

The Fast Gate is the merge gate for every PR. One test at the budget edge makes queue runs fail at random, which costs a re-queue and hides real failures behind a "flake".

Proposal

Reduce the fixed template sizes at the reduced parity level (the pattern #3103 used for the audio input proptests), using obs_c_oracle::parity::percent_at / keep: the C-vs-Rust comparison only needs a template that overruns the struct, so a smaller buffer at OBS_PARITY_CASES=reduced keeps the assertion and the overflow path while cutting the parse cost. Keep the full sizes for full/unset (local, nightly, release).

Acceptance:

  • the test stays under ~5 s in a Fast Gate run at OBS_PARITY_CASES=reduced, and the full sizes still run at full;
  • before/after timings in the PR, measured with the test module alone;
  • no timeout in 5 consecutive merge-queue runs after the change.

Alternative if the cost cannot be reduced without losing the case: give this test its own slow-timeout override in ci/nextest.toml (the file already carries overrides for the exhaustive sweeps), but that raises the budget rather than removing the cost.

Refs #3012, #2888, #3071.

Scope check

Only a test's data sizes change; no public C header, C test or Rust behavior is touched.

Activity

  1. added
    ready
    P2
    size:S
    on Oct 30, 2026
  2. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: #3109

    Plan (one PR, RED then GREEN):

    1. RED: obs_c_oracle::parity::scaled_len (a todo!() stub) plus its Tier 1 unit test, and large_templates_match_c calling it for its three fixed sizes; the module test fails on the stub.
    2. GREEN: the real scaled_len (percent of the size at the level in OBS_PARITY_CASES, floor 1 so a test never runs an empty input) and the measured before/after time of the module alone in the debug build.

    Full sizes stay at full/unset (local, nightly, release); reduced (PR, merge queue) gets 10 %.

  3. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    PR opened: #3110 (RED e88aadafe, GREEN b7bf21108). Tier 1 tests green, ./lint --only lint... measured module alone: 7.725 s at full, 0.357 s at reduced.

  4. moved this from In progress to Done in obs-rust Multiviewon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2readysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions