Skip to content

libobs: characterize and extract hotkey dispatch (Refs #5327) - #5337

Merged
zackees merged 2 commits into
masterfrom
test/5327-hotkey-dispatch
Nov 21, 2026
Merged

zackees merged 2 commits into
masterfrom
test/5327-hotkey-dispatch

Conversation

@zackees

@zackees zackees commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

obs_hotkey_dispatch was embedded in the hotkey monolith, preventing an independent Rust swap. This C-only prerequisite characterizes the current dispatch behavior and moves the function verbatim into libobs/obs-hotkey-dispatch.c.h, following #5287, #5305 and #5320.

Five focused cmocka cases pin direct callback arguments, active and absent/unmatched bindings, press/release and duplicate forwarding, router selection and removal, unchanged binding/count state, valid zero-initialized state, and the NULL-hotkey no-router branch. Dispatch performs no binding lookup. NULL core and invalid delivered-path callbacks remain unchecked C preconditions, documented rather than invoked. The fixture characterizes included C source, with the sibling-style external seam reserved for the Rust swap.

The alphabetical production unity group, all eleven isolated hotkey consumers, thirteen expected inventories, canonical test graph and tests.d pointer agree. No link-support files, Rust implementation, public headers, existing C tests, workflows or WebSocket code change. There is no user-visible behavior change. Rust Tiers 1/3 belong to follow-up #5329; network Tier 4 does not apply.

RED 7cd544218 failed preprocessing on the missing extraction include after all five cases passed against an original-C snapshot. GREEN 8795aa88e supplies the byte-for-byte extraction. Validation and publication details follow.

Refs #5327. Rust swap: #5329, natively blocked by #5327.

Validation: the full native_build:: module passed all 322 tests. Twenty focused inventory/build-policy checks and four Windows diagnostic checks passed. Linux built both libraries, the new fixture and all eleven isolated hotkey consumers; all twelve focused CTest suites passed per library, with 25 additional repeats of the new five-case characterization per mode. Both export sets contain the same 1,769 symbols. The new fixture also compiled with clang-cl for the MSVC target using /W4 /WX, with no warnings. The single full SOLDR_PORCELAIN=0 ./lint passed in 659.8 seconds. One-agent pre-push review is clean.

Merge simulations are clean against #5320 and #5246. No held support files are added. The original broad 68-target Rust-static build was intentionally stopped after partial compilation, then narrowed to every affected hotkey consumer; a complete 68-target result is not claimed. Native Windows/macOS execution, the entire cmocka suite and hosted checks have not been awaited. The validated source tree is 40f2a3556b00a818e347a06a936326619c9d947c.

Publication through the repository ./push proof/sign/push code produced complete prooft evidence: all six Clippy/Dylint targets, client checks, 9,264 workspace host tests, the 920-case standalone feature run, documentation tests and Windows GNU linking of all eight Rust categories passed. Final signed head bd3844316f047cb215cfb9adfec5a9964ec5caac carries 19 Ci-Attestation records and has the same validated source tree. Automatic PR creation was deferred to this separate reviewed-body invocation. No attestation fallback warning was emitted. Routine broker-image, unspecified-debug-profile and arm64 GIO availability notices are retained in the evidence log.

The optional Swift lane returned exit 75 because swift-format is unavailable; prooft reported lane 'client-swift' failed with exit code 75; nothing was attested. No Swift execution proof is claimed; the complete 19-record required client evidence and final signature were produced successfully.

Rebased onto master 0419d4a268c3fb3bcdbe3fbe3908b3f4d75e380c, replacing published head bd3844316f047cb215cfb9adfec5a9964ec5caac, while preserving the merged hotkey field adapters and every existing registration. The characterization commit remains unchanged by range-diff, and dispatch remains a byte-for-byte extraction. On the rebased source, formatting, all 342 native-build category tests, nine focused policy/Windows-diagnostic checks, and the single full SOLDR_PORCELAIN=0 ./lint passed (1,129.3 seconds). Both libraries and all twelve focused hotkey targets built, and all twelve CTest suites passed against each library; both defined dynamic export sets contain the same 1,769 symbols. All eight Windows MSVC Rust category executables linked. The broader Windows native Tier 2 graph reached its 30-minute deadline without a reported source/link error, so that graph and the subsequent Darwin pass remain incomplete; native Windows/macOS execution is not claimed. The Linux capture also reached its deadline, but its still-running container was observed through successful completion without restarting the build. Hosted checks remain the merge gate.

Publication through ./push --replace-remote-head bd3844316f047cb215cfb9adfec5a9964ec5caac succeeded with its exact lease. Final signed head d99c944c985952af6a1c2e11b0113c526326ec01 preserves validated tree 3ea59be82dd49b9dd906e0088e7f9fe6fd21b299 and carries 19 fresh Ci-Attestation records. Fresh client proofs passed Clippy and Dylint on all six targets, the self-tests and data/XML validators, all 9,442 executed workspace host tests (six skipped), all 920 standalone feature-set tests, documentation tests, and Windows GNU linking of all eight Rust categories. A merge simulation against newer master 846873834f6657325bb1059cca6b74203b74e30c is clean and retains exactly the intended 20-file change. The optional Swift lane again returned 75 because swift-format is unavailable; no Swift proof is claimed.

@zackees
zackees enabled auto-merge November 20, 2026 03:41
@zackees
zackees added this pull request to the merge queue Nov 20, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this to In merge queue in obs-rust Multiview Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 20, 2026
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In merge queue to Needs fix in obs-rust Multiview Nov 20, 2026
Ci-Attestation: {"at":1795247262,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":437,"stamp":"15d4f541145241371861d50e1babf6e8","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795247262,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":437,"stamp":"75a1545e3b70e2601e83acdaa8c27225","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795247262,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":437,"stamp":"871a6b31c1c0662f77b6edad1523efae","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795247262,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":437,"stamp":"ff7a0a927a8d0f710d7b8c6f43838556","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246818,"gate":"general/all/client-lint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"750be9087e13a31805ca35ae10c4b7c0","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795247262,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":437,"stamp":"feca34293cc110745d919b4e61892f5b","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246820,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"07c5157b65c3afc69e109c9d03959489","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246820,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"d1446cd8e9eac0638285e570662bf36c","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"2c3b34a5e6cba45536ab23ee41e466fc","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"e7f5bc3acfe09b9f95739fdaa185fb5a","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246818,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"dbe4344b9e4800dcb700cb315ff58ea0","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"84922a0b7939894eea28d997ae6434b0","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"b742e5769f65441f4dbba893374ea43d","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246820,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"5caea93bc2e2a5d38f9271d0025c8c38","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"254b9d1139cf77996aa9407eee8c8179","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246819,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"d30d8ff0429f2d8239869d185fe0c884","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246818,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"94dda964466e61c0da1c9332b73e7df1","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795246818,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"acc21d42df887ea006c72a029e654ae42f5822993983b87a30b708249f3651d3","lane":"client-lint","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":1246,"stamp":"a5812a52d8e80c3cb6d6c536fa3cf01b","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}
Ci-Attestation: {"at":1795249591,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"ab873a19ca619ce2580f5307a4c619d7e6c4ab8d877604389e05f66ddd4eca9a","lane":"client-test-x86_64-unknown-linux-gnu","parents":["28597785f9edb597c6474bf7c9a65276a504c7c2"],"secs":2323,"stamp":"7bfbac42b602965f684d93ce5ce521f0","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"0419d4a268c3fb3bcdbe3fbe3908b3f4d75e380c","coverage":"all-tracked-applicable-files","diff":["ci/test_hotkey_register_extraction.py","libobs/build/libobs.core+.h.c","libobs/obs-hotkey-dispatch.c.h","libobs/obs-hotkey.c.h","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_dispatch.c","test/cmocka/tests.d/test_hotkey_dispatch.cmake"],"head":"b1004f78ffed2486dc512b2f8f105a51fecae229","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":"45307905779858b5408b220d5cf3900de60a6c60b9440c137c53e53858143313","tree":"3ea59be82dd49b9dd906e0088e7f9fe6fd21b299"}}
@zackees
zackees force-pushed the test/5327-hotkey-dispatch branch from bd38443 to d99c944 Compare November 21, 2026 08:27
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 21, 2026
@zackees
zackees enabled auto-merge November 21, 2026 08:29
@zackees
zackees added this pull request to the merge queue Nov 21, 2026
Merged via the queue into master with commit 4019645 Nov 21, 2026
45 checks passed
@zackees
zackees deleted the test/5327-hotkey-dispatch branch November 21, 2026 09:13
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 21, 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