Skip to content

test: add timing lock to Pulse default-follow fixtures (Refs #4944) - #4984

Closed
zackees wants to merge 2 commits into
masterfrom
fix/4944-pulse-default-follow
Closed

zackees wants to merge 2 commits into
masterfrom
fix/4944-pulse-default-follow

Conversation

@zackees

@zackees zackees commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Add the shared timing resource lock to both Pulse default-follow CTest registrations, as required by docs/knowledge/timing-tests.md. Extend the existing timing inventory check to enforce that registration. The unchanged C test samples live audio for 300 ms, requires at least 100 ms of samples and 90% desktop samples, and gives following the default five seconds. All C assertions, skip handling and timeouts remain unchanged.

This is an incomplete investigation and scheduling mitigation for #4944. Keep this PR draft with auto-merge off. Local failures continue with the lock; zero failures in an equal or larger loaded run has not been established.

Observed local evidence (four pinned logical CPUs, real private daemons and unchanged C binary):

  • RED commit 9291b3a78: uv run --no-project python -m unittest ci.test_sanitize_harness.TimingLockTest fails the missing-lock contract. With six copies of the PipeWire registration submitted to six CTest workers plus one sha256sum /dev/zero stress process, filtering to default_output_unplugged fails 6/6 executions at initial audio startup.
  • Scheduling mitigation: the same six registrations and stress process, retaining the new resource lock and requesting two repeats per registration, produce 2/11 failures. The first nine executions pass; the last two fail on mixed audio from the correctly selected fallback sink. ctest --repeat until-fail stops a registration after its first failure, hence eleven executions rather than twelve.
  • An initial broader diagnostic with six worker lanes plus four stress processes and a concurrent build produces 9/24 failures across the two daemon variants, mainly during startup or with mixed audio. It is a different load profile, not the primary before/after comparison.
  • With only the original pair submitted to eight CTest workers plus two stress processes, both registrations fail in 2/3 executions before and 2/3 after the lock. The post-change sample overlapped ./push client checks, so host pressure was not identical; it still provides no zero-failure GREEN. The restore-to-A failure in the baseline has A selected and mixed audio, rather than the reported stale C.
  • Full SOLDR_PORCELAIN=0 timeout 1800 ./lint --fix passes (84.8 s); the three focused TimingLockTest cases pass.

The reported runner failure is confirmed in run 44134744877, job 134247840974: capture remains on obs_test_c.monitor after A is restored. None of these local failures retained C after restoration. Existing bounded retry logic from #3651 is present, and both daemon fixtures use private runtime/config/state directories, so no shared-daemon collision was established. The timing lock coordinates one CTest invocation and cannot isolate independent runner suites on the same host.

Read-only clud-review found no defect in this two-file scheduling change but reported a HIGH delivery gap: insufficient runtime evidence for #4944. Further work needs the stale-sink failure reproduced and its event/restart sequence traced, plus zero failures in an equal or larger loaded comparison before queueing.

Reproduction driver and complete logs are preserved in /home/niteris/dev/obs-rust/.worker-pool/flake-4944/, including reproduce.py, baseline.log, green.log, job.log and the original-pair experiment logs. No Rust implementation or protocol behavior changes; no new test executable. This PR does not claim a complete Tier 2 run or hybrid runtime validation.

Publication: ./push passed six-target client lint/analysis and client self-tests/validators. Its full workspace run passed 8,858 tests (6 skipped, 3 slow, 1 reported leaky); workspace documentation checks reused passing soldr verdicts. I cancelled the subsequent optional obs-util feature-repeat wrapper with SIGINT to bound publication time. Therefore the overall client-test lane was not attested: the final head has 18 Ci-Attestation trailers providing partial prooft evidence, and ordinary PR CI remains required. Draft status and absent auto-merge were verified on head c0fc38b41ad3f412b831e1a17c30cbed0d17bb09.

Refs #4944.

…#4944)

RED: the timing-lock contract fails because the default-follow registration has no timing resource. Under six parallel lanes on four CPUs plus one CPU stress process, the unchanged default_output_unplugged case fails 6/6 starts at its initial five-second audio deadline; this does not yet reproduce the reported stale sink C after replug. Preserve all C assertions.
Both private-daemon variants take the shared timing resource. Preserve their 300 ms observation windows, five-second follow deadline, 120 s CTest timeout and all C assertions. This is a scheduling mitigation: the initial loaded sample improved from 6/6 failures to 2/11 failures, so the reported stale-sink race is not established as fixed. Full ./lint --fix passed in 84.8 s.

Ci-Attestation: {"at":1794944300,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":108,"stamp":"6bf3096aefacc3c757957d9a95b7dac6","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944300,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":108,"stamp":"5fb91ca7b5984ee6dd557896875a84f9","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944300,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":108,"stamp":"4b531a0b24053890c937a820bba95a10","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944300,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":108,"stamp":"ec66d91723004b356e9e23a78ab37fa7","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944189,"gate":"general/all/client-lint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"8444adf73865f2bbbcc516bea1386838","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944300,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":108,"stamp":"16a1a25e0e5c70d2c73845dcafd53633","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"f1716735649e9ec17a2f4ab6fe928108","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"1350c5dbb9445022b4c3706c6b62ef08","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"c1a64fbe713632864a4c25b1981e64f1","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"8be8a5047ec35081f7853007943d5c4c","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944189,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"5fd36dbf669d27778d2cc3184bcce4ef","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944189,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"5919c13ac70c6992f9d6ab218c39d4c2","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"a5560e217f6768e0c3f44178c62f99ca","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"4c3e377b26cb39633e13b60573becdd7","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"07efaa0ea0ab41b8420de704ae95cf31","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944190,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"795e7ed90ea4c037d25c3480ba405cdc","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944189,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"5c96f579befd616cf3d74453213a9599","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
Ci-Attestation: {"at":1794944189,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"b4eac7f70bd48bd5ad5121f616997bd134949c800e15b33125121dd30ed3b162","lane":"client-lint","parents":["9291b3a787105a9c1c83ec3f6a5f74dce87df3a8"],"secs":26,"stamp":"65663b50ed3275903469835bd10790ec","tree":"8a1b37692f61c8ccd6498a09ffe5296936729544","v":1,"via":"run"}
@zackees
zackees marked this pull request as draft November 17, 2026 19:56
@zackees zackees changed the title test: isolate Pulse default-follow audio timing (Refs #4944) test: add timing lock to Pulse default-follow fixtures (Refs #4944) Nov 17, 2026
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 17, 2026
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 17, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In progress in obs-rust Multiview Nov 18, 2026
@zackees

zackees commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Superseded by #5036, which adds one shared RESOURCE_LOCK across all 21 private PulseAudio/PipeWire daemon registrations and a generated-CTest regression. The replacement remains draft: configuration checks and full lint/client proof passed, but loaded runtime acceptance is still unmet (unlocked 1/24 failures; locked 3/17). Refs #4944.

@zackees zackees closed this Nov 18, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In progress to Done in obs-rust Multiview Nov 18, 2026
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