Skip to content

fix: retry monitor lookup after a PipeWire default change - #3651

Merged
zackees merged 4 commits into
masterfrom
fix/3630-pulse-default-retry
Nov 5, 2026
Merged

zackees merged 4 commits into
masterfrom
fix/3630-pulse-default-retry

Conversation

@zackees

@zackees zackees commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Fixes #3630

A PipeWire default-output change can arrive before the new sink monitor answers source-info queries. OBS stopped the old stream and, after the transient error, waited for a device-created event that need not arrive. Retry that lookup through the existing bounded reconnect path, so capture can resume without another device change. Named-device disappearance still waits for its device event.

RED: 1e760a63b adds a deterministic native regression that calls the real default-change event task and injects the source-info error. It fails because no retry timer was queued (assert_non_null(retry_cb), exit 1).

GREEN: 458307456 enables the bounded retry after a default change. Four focused cases pass: transient lookup error with the finite 100-attempt budget, source destruction before the retry fires, unchanged named-device waiting, and SOURCE_NEW arriving before SERVER_CHANGED. An additional RED commit, 8df85304d, proves that SOURCE_NEW may record the new default and hit the same lookup error before SERVER_CHANGED arrives; the first fix still failed that case. The final GREEN commit 16b2250f1 retries missing devices for all follow-default restarts. 100 consecutive executions of all four final cases passed (400 cases, 4.276 s). ASan/UBSan with leak detection passes all four cases. Existing C tests and public headers are unchanged; the features ledger is updated. No Rust port or protocol changes, so Rust Tier 1/3 and protocol Tier 4 do not apply.

Review: clud-review clean after fixing ASan's retention of otherwise unused plugin entry-point globals; unreachable dependency stubs fail if reached and belong only to this test executable.

Final-head runtime evidence, run 41972995290: all six Tier 2 test partitions passed. The unchanged test_pulse_default_follow_pipewire ran against real libobs and the real capture plugin, passing in 17.99 s on C-reference OFF and 17.89 s on hybrid ON; both parallel suites report 717 tests and zero failures. The new deterministic test passed in 0.05/0.04 s. The standalone PulseAudio-daemon variant was skipped in both jobs; no coverage is claimed for that variant. Fast Gate and formatting passed. Local lint passes using CI-pinned soldr 0.9.45, including the final 77.4 s run. Hosted ASan also passed: the new test exits 0 in 0.1 s and the real application launches and shuts down cleanly (app exit=0). The completed final-head Pull run and CI Gate are successful (42 successful checks).

@zackees
zackees marked this pull request as ready for review November 5, 2026 05:30
@zackees
zackees added this pull request to the merge queue Nov 5, 2026
@zackees

zackees commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Verified merge queue acceptance: position 1, QUEUED at 2026-11-05T05:30:28Z, requested with the validated head pinned to 16b2250. Final Pull run 41972995290 and CI Gate passed. All six Tier 2 partitions passed; unchanged real PipeWire default-follow passed with C-reference OFF (17.99 s) and hybrid ON (17.89 s), and hosted ASan ran the new regression and launched/shut down the real app cleanly. Standalone PulseAudio-daemon variant was skipped, not counted as runtime coverage. Local lint and 100 executions of the four deterministic cases also passed.

Merged via the queue into master with commit cbcaa71 Nov 5, 2026
46 checks passed
@zackees
zackees deleted the fix/3630-pulse-default-retry branch November 5, 2026 05:39
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.

Flaky: test_pulse_default_follow_pipewire misses the default output switch

1 participant