Skip to content

infra(obs-c-oracle): scale parity proptest cases by CI level (#2593 part B) - #2991

Merged
zackees merged 2 commits into
masterfrom
infra/2593-parity-cases
Oct 30, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2593-parity-cases

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

Refs #2593 (part B, as decided in #2593 (comment)). Part A is separate.

What

  • obs_c_oracle::parity::cases(n) (rust/obs-c-oracle/src/parity.rs) reads OBS_PARITY_CASES:
    • unset / full → n (local runs, nightly, release gate keep full depth)
    • reduced → 10% of n, never below 64 (or n if smaller)
    • an integer 1..=100 → that percent; anything else panics, so a typo never silently cuts coverage.
      Needed because an explicit ProptestConfig::with_cases(N) ignores PROPTEST_CASES.
  • Every ProptestConfig::with_cases(N) in the parity modules (129 files, all crates) now reads with_cases(obs_c_oracle::parity::cases(N)). One mechanical substitution; no assertion, strategy or written count changed. No with_cases( parity site is left unconverted.
  • .github/workflows/build-project.yaml workflow-level env: reduced for pull_request, merge_group and push to refs/heads/master; full for schedule, workflow_dispatch, tags and release branches. No new workflow file. ci/local_gate.py passes the environment through, so every Rust test lane picks it up.
  • Unit tests live in the existing oracle validation suite (rust/obs-c-oracle/tests/oracle/parity_cases.rs, in the obs-util library harness): no new test binary.

RED → GREEN

  • RED (test(obs-c-oracle): ... stub (RED, #2593)): scale is the identity; soldr cargo test -p obs-util --lib -- parity_cases → 5 of 6 fail (only full_keeps_the_written_count passes).
  • GREEN: implementation + conversion; 6/6 pass. (One floor assertion in the RED test was wrong — 1% of 20 000 is 200, not the floor — corrected to 1% of 3 000 in GREEN.)
  • Tiers 2/3/4: not applicable (test infrastructure only; the C oracle and Rust ports are untouched). No features.md line (CI only).

Times (local, debug, obs-tests-core binary, filtered per module)

Module full reduced
source::video_tick_parity 45.1 s 4.5 s
hotkey::translations_parity 28.7 s 6.3 s
source::audio_timing_parity 18.4 s 3.1 s
obs_core::audio_mix_parity 2.6 s 0.6 s
obs_core::audio_discard_parity 0.7 s 0.08 s
all _parity in obs-tests-core (894 tests) 98.7 s 42.9 s

The remaining reduced time is fixed per-test cost (chosen cases, layout checks, oracle setup) that case scaling does not touch.

Notes

  • ./lint passes with OBS_GATE_SKIP_SELF_TEST=1. Without it, ci/test_check_changes.py errors locally with git: command not found in a stripped-PATH subprocess (NixOS host, unrelated to this change; the Checks job runs it).

…2593)

5 of 6 parity_cases tests fail against the identity stub.
…(GREEN, #2593)

parity::cases(n) keeps n when unset/full, 10% for reduced (floor 64), or
a percent. Every ProptestConfig::with_cases(N) in the parity modules goes
through it; assertions unchanged. build-project.yaml sets reduced for
pull_request, merge_group and master push; schedule, dispatch, tags and
release branches keep full depth.

@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. scale is total (overflow-safe via u64, floor capped at n, typos panic), unit tests sit in the existing oracle suite (no new binary), the conversion is mechanical with no assertion/strategy changes, and full depth stays on schedule/dispatch/tags/release branches as decided in #2593. Watch: every crate whose parity module now names obs_c_oracle::parity needs obs-c-oracle as a dev-dependency; the CI build confirms it. Queue on green.

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