Skip to content

libobs: characterize and extract hotkey unregistration entry points (Refs #5175) - #5197

Merged
zackees merged 5 commits into
masterfrom
test/5175-hotkey-unregister-entry
Nov 19, 2026
Merged

zackees merged 5 commits into
masterfrom
test/5175-hotkey-unregister-entry

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member

Refs #5175

Add a deterministic C characterization of the public hotkey unregistration wrappers, then move both bodies verbatim into libobs/obs-hotkey-unregister-entry.c.h. The recorder pins no-core silence, full-width single and pair IDs, missing and repeated pairs, balanced locking, member removal order, and pair deletion/free before unlock. It executes the real pair helper and compiles the existing C owner-release helper under a separate single-remover name, avoiding a Rust archive fallback for cleanup. Existing C tests remain unchanged.

The extracted wrappers reuse the registry lock seams and single-key remover. A private call seam leaves the pair helper unchanged in its original translation unit. All eleven whole-hotkey fixtures, thirteen independent inventories, two existing consumer assertions and their real-adapter lists agree. The core unity group and test graph remain sorted; the registration unity pair stays intact. JSON singleton placement also avoids a textual conflict with #5155. Source-set and core module inventories already own the group exactly once.

Original C passed before extraction. RED 86710943f records the missing-source CMake contract; GREEN 57ec1c3af supplies the unchanged wrappers and makes that contract pass. The new C characterization has not changed since RED. Subsequent commits complete the fixture inventories without weakening assertions. The whole native_build:: module passes all 314 cases in 40.07 seconds. Focused Linux Tier 2 rebuilds both libraries and passes the recorder, unchanged companion fixtures, and unrelated test_async_conversion_plan_rust and test_deinterlace_pacing_steps_rust in both modes with three repetitions; supplemental unchanged public single-key, pair-registration and press-state tests pass against both libraries. Both libraries retain 1,769 identical dynamic exports. Windows MSVC workspace test linking passes. Full ./lint passes (one run, SOLDR_PORCELAIN=0, 1,800-second deadline).

Test cost: four new C cases, no own threads; no new Rust cases or executables. The Rust changes only extend existing fixture-name inventories. The recorder's observed longest run was 0.20 seconds in the final run. Native macOS/Windows C runtime, including their CMake executable replay against Cargo-native obs-c-reference, is left to the selected native CI lanes and is not claimed as locally verified. This C prerequisite adds no production Rust, public-header, existing-C-test, WebSocket, CI or workflow changes. The Rust swap and its unit/differential/mutation coverage belong to a separate follow-up issue. Tier 4 is inapplicable to these non-protocol wrappers.

Before publication, forced-fetch/merge-tree replay covered every open PR touching the core group, original hotkey file or test graph. #5193 has merged and is in the base. #5196, #5191, #5190, #5155 and #5142 merge cleanly with this branch. #5061, #4655 and #4124 conflict with this branch and with unmodified master; these pre-existing conflicts do not hold this publication. The single pre-push reviewer is clean.

Publication through ./push passed six-target Clippy/Dylint (234.6 s), repository self-tests/data checks, all 9,122 host tests with six skipped, applicable doctests, all 920 feature tests, and Windows GNU workspace links (host client gate 869.5 s). Optional Swift proof is unavailable because swift-format is absent; no Swift files changed. The pushed final head is signed and verified by GitHub. Master advanced to #5195 during attestation; the signed head merges cleanly with that new master, and the queue retains its current base-owned checks.

…#5175)

Ci-Attestation: {"at":1795065727,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":189,"stamp":"f4b8fa9f50f9b55d05fcb6367c117b39","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065727,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":189,"stamp":"0680d6c6f31f3c06bb741e9360245c0a","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065727,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":189,"stamp":"01a246ba9076abd855c05ca788a0ccf9","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065727,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":189,"stamp":"89cc778eef9b970a8ec516133ad06971","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065535,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"fb8f0d0c5802cc24e2571980ce756ebb","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065727,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":189,"stamp":"2ba28161efca6ef1b9fcf7d48ce643eb","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"e58b58044d05667c227dbdbb0d7a6394","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"02d59adcf4119a035ff581097948c06e","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"58f0554a4f056ad709c3c8218b06e2cb","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"f33a059133812ccc88ba3c62f9f04606","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065535,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"95bdfb49b7ab569febd829080ce5d05e","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065535,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"546dc8a6505e5ff0c28bbb7de1aa96dc","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"e68b66983dda0dacc8f5668e5cdf9302","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"cbea457e1e27e1f0fc32b888d64ff896","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"6f0bd2414b79edb7bb0bcb2fd40aa429","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065536,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"5118455353e4d3b47a474bef85ee3680","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065535,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"2e1fecbc0a161f386c74103e49e64501","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795065535,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e1bfce1565441e880dc666a874eee8fc29e47097ca20b406cb7f3077e6415ce3","lane":"client-lint","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":235,"stamp":"bf59934b8d3f30ce34ed0e826578a814","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}
Ci-Attestation: {"at":1795066599,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"159928755e2705e99653d29c16cf4304809e18c46bfe870ade623a5924cce0f3","lane":"client-test-x86_64-unknown-linux-gnu","parents":["f7184f4bc614b3d7db567b9cc969db247629ffce"],"secs":870,"stamp":"69fe500e4aa3e1dd20239e8f2d8e041d","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"1bad0135e0fbc45f9ab2164bfb94c54395b193c4","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/obs-hotkey-unregister-entry.c.h","libobs/obs-hotkey.c.h","rust/obs-build/tests/native/registration/canonical_hotkey_background_press_swap_is_registered.rs","rust/obs-build/tests/native/registration/canonical_hotkey_background_trigger_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.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_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.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_hotkey_unregister_entry.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","test/cmocka/build/test-graph.json","test/cmocka/test_hotkey_unregister_entry.c","test/cmocka/tests.d/hotkey_background_press_link_support.cmake","test/cmocka/tests.d/hotkey_background_trigger_link_support.cmake","test/cmocka/tests.d/test_hotkey_unregister_entry.cmake"],"head":"1da98bb9f53dd51d54704c4bb2886e432b7d4259","tools":{"orchestrator-python":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]","schema-dependencies":"3.14.7 (main, Aug 14 2026, 15:35:28) [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":"233a35f4f4df7dac08e77045694722f4a12d38b25e840d40d66ff386776118e9","tree":"4c3a3b93df208bb16d49b4e7369a3a833ab32909"}}
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees enabled auto-merge November 19, 2026 05:38
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit ade80e1 Nov 19, 2026
41 checks passed
@zackees
zackees deleted the test/5175-hotkey-unregister-entry branch November 19, 2026 06:12
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