Skip to content

obs-hotkey: Port background shortcut control to Rust (#4313) - #4959

Merged
zackees merged 4 commits into
masterfrom
port/4313-hotkey-background-control-land
Nov 17, 2026
Merged

zackees merged 4 commits into
masterfrom
port/4313-hotkey-background-control-land

Conversation

@zackees

@zackees zackees commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Refs #4313. Builds on the behavior-neutral extraction merged in #4931.

Port background shortcut retry, configure and probe control to the safe obs-hotkey core and thin C ABI shims, preserving absent-core returns, registry mutex ownership, repeated retry/configure wakeups, callback invocation before unlock, CONFIGURE_FAILED clearing, and probe no-op/cancellation behavior. The original C implementation remains the reference/oracle. Existing public headers, C tests and the C++ OBS WebSocket plugin are unchanged.

This swap was verified on November 9 and re-verified on current master on November 17, 2026. A new landing branch cherry-picks only the three commits after the extraction's old head; the original held branch is unchanged. Direct C characterization precedes RED ae4999737, where both safe-core tests fail at todo!(), followed by GREEN. Master registrations and module declarations survive every conflict; the registration/core pair, singleton identity setters and singleton background-control groups remain intact. All nine current isolated hotkey/portal consumers use the real Rust entry points and private field adapter, including the later background-enumeration consumer, and the independent registration snapshots match.

All 588 focused hotkey Rust tests passed, and all five new tests passed again after the mutation check. Setting CONFIGURE_FAILED instead of clearing it made both edge and randomized original-C differential tests fail. All 224 canonical native registration checks and all three Rust-static coverage/support checks passed. An invariant check proves every master graph target/test remains identical apart from this port's source, aliases and Rust archive dependency. Tier 4 does not apply to this non-network unit.

Test cost: five new cases in the existing core category binary, no new executables or own threads. Each passed 25 reduced-parity debug runs; longest 0.04 seconds, peak RSS 22,008 KiB. Generated operation vectors are bounded to fewer than 64 elements.

Fresh focused Tier 2 rebuilt both libraries and all nine hotkey/portal fixtures. Every fixture passed twice against each implementation: hybrid repetitions took 115.68 seconds and C-reference repetitions took 117.13 seconds. Loader checks confirmed the intended libraries; both export exactly the same 1,768 dynamic symbols. The test-report parser did not recognize the long CMake/CTest log, but the harness exited 0 and both CTest summaries report all nine passing.

The single full SOLDR_PORCELAIN=0 ./lint run found extraction-era assertions still requiring production C plus graph map ordering. Updated the Python regression to require the production Rust adapter, retained reference group and archive/private-alias integration in every isolated fixture; sorted both graph maps with the repository fixer. The affected extraction, sorting and build-group tests pass. No Rust/C implementation changed after Tier 2. The final ./push client-lint lane passed clippy and Dylint for all six supported targets in 557.3 seconds. Repository self-tests and data validators passed. The client-test lane passed in 884.6 seconds: all 8,763 workspace cases passed (two slow, six pre-existing skips), documentation and utility-feature tests passed, and all eight Windows GNU test binaries linked. ./push completed in 1,619.92 seconds and produced all 19 selected prooft Ci-Attestation records. The optional Swift proof could not run because swift-format is absent; no Swift path is selected here. Final head 31337651f01b7b316982589f6c3e80356c6fe6e7 is signed and locally verified, with the exact tested tree preserved. Because this PR updates a CI regression, normal required PR checks still apply. Native macOS/Windows Tier 2 runtime was not run locally.

./push opened this PR as a draft because current backpressure is closed (10 in-flight PRs against limit 10; oldest queued job waiting 64 minutes). The maintainer-provided held-swap landing brief explicitly directs publication and pinned auto-merge after verification; this landing follows that instruction. Required PR and merge-queue checks remain in force.

Ci-Attestation: {"at":1794901047,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":137,"stamp":"b5fba31c9cbf27366b24d81ad32ed31e","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794901047,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":137,"stamp":"fa87bd8af40f04f7a9f17b69921d1a72","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794901047,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":137,"stamp":"2396f4c9d2bd213fa351fcbcc155290b","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794901047,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":137,"stamp":"773bd77170d5c2361be748f7339bc25f","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"general/all/client-lint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"0dff04b45e71e4225253b117ea5aa0f3","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794901047,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":137,"stamp":"4636d6011029c109251f7fe2cb3b1e1b","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"f38f159583f785bced989092119c726f","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"12be698dfc4546766db8757cd6e1e8b5","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"72cabefa331b357ec78a1bd519aca80e","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"ce1e68d0d3217bcb1deedeff89cfc8f7","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"c3e06562179d351f869ea8252edc36ab","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"215dc5eb25bc71e25d0ac7c1f2ed15f1","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"d07cda82050f0b1ed76cc522c63e6744","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900909,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"910c1d5d8ad0c9985ae86bd3f1c2faa5","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"c9aab6f6b22edbf569bba52be9ddc4c6","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"411517e2727eef0f008315a10dbf0e82","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"580f058edf594116eb36ba54466eaa2d","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794900908,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"30ac561cf181dd926e3499a4c4f0dcd6ac6bc421786e3d19938f944d36080e38","lane":"client-lint","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":557,"stamp":"7d76cf78692a7c083cefca386c74e425","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}
Ci-Attestation: {"at":1794901934,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"20fb8ab6bf0a4803697d711fefb9c4f3ba24fd5082e59499a17b75130b277864","lane":"client-test-x86_64-unknown-linux-gnu","parents":["ae49997377f56ee2c01809d0c7ea4f324e152e47"],"secs":885,"stamp":"3a2e42c12147bcf808352dc7da4d7f08","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"3ea35fc19440a41d82a83791e325baaf8b36ed7f","coverage":"all-tracked-applicable-files","diff":["ci/test_hotkey_background_control_extraction.py","libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-hotkey-background-control+.h.c","libobs/build/ported-source-sets/hotkey-background-control.json","libobs/cmake/rust-exports.d/obs-hotkey-background_control.txt","libobs/cmake/rust-hidden.d/obs-hotkey-background_control.txt","libobs/obs-hotkey-background-control-fields.c.h","rust/README.md","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/headless_characterizations_runtime.rs","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/portal_output_runtime.rs","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_control.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust_static_entries.rs","rust/obs-c-oracle/oracle/hotkey_background_control.c","rust/obs-hotkey/src/background_control.rs","rust/obs-hotkey/src/ffi/background_control.rs","rust/obs-hotkey/src/ffi/mod.rs","rust/obs-hotkey/src/lib.rs","rust/obs-hotkey/tests/hotkey/background_control.rs","rust/obs-hotkey/tests/hotkey/background_control_parity.rs","rust/obs-hotkey/tests/hotkey/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_hotkey_background_control.c"],"head":"889508002f7a277ed67ad03b3bc925ff26e372e7","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"fe54ad63cdf49a513a9f781b20b8f0730ce54aee4deb8393561a8591b2200458","tree":"872c5d598dc410f0fae8a59d9d7d06d574ab4153"}}
@zackees
zackees marked this pull request as ready for review November 17, 2026 07:54
@zackees
zackees enabled auto-merge November 17, 2026 07:55
@zackees zackees closed this Nov 17, 2026
auto-merge was automatically disabled November 17, 2026 12:44

Pull request was closed

@zackees zackees reopened this Nov 17, 2026
@zackees
zackees enabled auto-merge November 17, 2026 12:44
@zackees
zackees added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit d0be0cd Nov 17, 2026
40 checks passed
@zackees
zackees deleted the port/4313-hotkey-background-control-land branch November 17, 2026 16:15
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 17, 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