Skip to content

fix(tests): vision mixer FX tests — skip without a working GL context, drop fixed-sleep sampling - #627

Merged
srperens merged 3 commits into
mainfrom
fix/vision-mixer-fx-test-ci
Jun 5, 2026
Merged

fix(tests): vision mixer FX tests — skip without a working GL context, drop fixed-sleep sampling#627
srperens merged 3 commits into
mainfrom
fix/vision-mixer-fx-test-ci

Conversation

@srperens

@srperens srperens commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

What

Both FX integration tests from #626 failed on the GitHub Actions runner (failing run). Two distinct problems, fixed in two commits:

1. The CI runner cannot create a GL context — skip there (the actual CI failure)

The runner has the GStreamer GL plugins installed, but no GL context can be created (headless, no usable software GL): a GPU pipeline builds, starts, and then silently never produces a frame. The telltale was shader_validation_test "passing" in 0.03s on the same runner — its environment probe fails fast and skips, while the FX tests only checked ElementFactory::find() (plugins present ≠ GL works).

The FX tests now use the same probe: a trivial gltestsrc ! glshader ! fakesink run with the identity fragment must reach EOS, otherwise the test skips. No CI-specific detection — the tests skip wherever GL genuinely cannot run, and keep running fully on dev boxes and GPU machines, where this coverage effectively lives.

2. Fixed sleeps made the tests flaky under load (a real local issue, fixed while diagnosing)

  • vision_mixer_fx_engine_end_to_end slept a fixed 500ms after start, then took a wipe — too early and the position query behind trigger_transition fails. Now polls the mixer's position query (30s deadline) before taking.
  • wipe_between_letterboxed_sources_animates sampled "mid-wipe" frames at fixed wall-clock offsets, which flaked ~1 in 3 under load when a sample landed after the wipe finished. Now watches every frame during a wipe: any frame showing both sources at once satisfies the animation assert, and observation stops once the picture settles on the incoming source. Also tightens the inverted-wipe end assert (red must be fully gone), matching the classic orientation.

A hard-switch regression still fails deterministically: saw_both never sets, the observe loop runs out its deadline, and the animation assert fires.

Also carries the workspace version bump to 0.6.2.

Testing

  • Local (working GL): both tests run fully — 5+ consecutive green runs (previously flaked ~1 in 3 under load)
  • CI (no GL context): both tests skip via the probe, like shader_validation_test already does

🤖 Generated with Claude Code

srperens and others added 3 commits June 5, 2026 12:17
…slow

Both FX integration tests failed on the GitHub Actions runner (cold
software GL: context creation + llvmpipe shader JIT can take many
seconds before the first frame):

- vision_mixer_fx_engine_end_to_end slept a fixed 500ms after start and
  then took a wipe — the mixer had not produced output yet, so the
  position query behind trigger_transition failed ("Failed to query
  pipeline position"). Replace the sleep with a poll on the mixer's
  position query (30s deadline).

- wipe_between_letterboxed_sources_animates pulled the first PGM frame
  with a single 5s timeout and sampled "mid-wipe" frames at fixed
  wall-clock offsets — the same mechanism that flaked locally when a
  sample landed after the wipe finished. Poll generously (30s) for the
  first frame, then watch EVERY frame during a wipe: record whether any
  frame showed both sources at once (the animation assert) and stop
  once the picture settles on the incoming source (the end-state
  asserts). No fixed mid-wipe sampling points left.

Also tightens the inverted-wipe end assert (red must be gone), matching
the classic orientation.

5 consecutive local runs green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CI runner has the GL plugins installed but cannot create a GL
context (headless, no usable software GL) — a GPU pipeline builds,
starts, and then silently never produces a frame, so the FX tests ran
into their deadlines instead of skipping. The telltale:
shader_validation_test "passed" in 0.03s on the same runner because its
environment probe failed fast and skipped.

Give the vision mixer FX tests the same probe: a trivial
gltestsrc ! glshader ! fakesink run must reach EOS, otherwise skip.
Element presence alone is not enough. The tests still run fully on dev
boxes and GPU machines with working GL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@srperens srperens changed the title fix(tests): make vision mixer FX tests event-driven — CI runners are slow fix(tests): vision mixer FX tests — skip without a working GL context, drop fixed-sleep sampling Jun 5, 2026
@srperens
srperens merged commit e0f7f57 into main Jun 5, 2026
7 checks passed
@srperens
srperens deleted the fix/vision-mixer-fx-test-ci branch June 5, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant