Skip to content

libobs: characterize and extract single-hotkey registration - #4908

Merged
zackees merged 5 commits into
masterfrom
test/4421-hotkey-register-extract
Nov 16, 2026
Merged

zackees merged 5 commits into
masterfrom
test/4421-hotkey-register-extract

Conversation

@zackees

@zackees zackees commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Characterize the five public single-hotkey registration APIs, then move their bodies verbatim from obs-hotkey.c.h into obs-hotkey-register.c.h. The public C test covers unavailable core, NULL owners, private sources, frontend and real-owner identities, callbacks/data, saved binding enrollment and owner teardown. Locking and obs_hotkey_register_internal stay in the original core.

All eight current isolated-core fixtures compile registration with their private core in one translation unit. Every other source retains a separate translation unit, and both affected registration snapshots match the graph. A real Tier 2 build also exposed the portal adapter being compiled twice after unity wrapping; retaining logical source ownership lets its deferred hook recognize the already-enrolled adapter. A tiny CMake regression covers missing, direct and graph-wrapped adapter enrollment.

Refs #4421. The Rust swap remains #4425. Enumeration, unregistration and object-bound pair registration remain outside this prerequisite. No Rust implementation or public API changes.

RED/GREEN evidence:

  • Characterization commit 1f3758c80 passed before extraction. Published RED 1b820392b failed the extraction-boundary check with nine observations: the absent unit and all eight missing consumer enrollments. Extraction GREEN is b18d0d639; the five bodies match master byte for byte.
  • Fixture RED 21c766324 reproduces duplicate adapter definitions through the real CMake helpers. The final fix passes all three tiny link builds.
  • Before and after extraction/fix: the same ten focused Tier 2 tests pass against C reference and hybrid, with 1,768 exported symbols identical. This includes the public characterization plus enumeration/background enumeration, binding press, getters, load, pair, press, portal and Wayland fixtures. Loader diagnostics verify both modes.
  • All 277 native_build:: contracts pass after the fixture fix. The 17 focused Python/build checks pass, as do targeted gersemi/ruff checks and git diff --check.
  • Full ./lint ran once and passed in 438.4 seconds. The subsequent fixture-only repair was covered by the focused tests above; final ./push revalidates its client evidence.

A complete local Tier 2 suite, native Windows/macOS runtime and hosted PR/queue checks are not claimed. Tier 1/3 Rust implementation work belongs to #4425; this unit has no Tier 4 network surface. No Rust tests or test executables were added.

Final GREEN push produced complete required prooft client evidence: all six clippy/Dylint pairs, self-tests/validators, 8,649 passing host cases (6 skipped), 916 passing utility feature cases, documentation checks, and Windows GNU linking of all eight category binaries. Client lint took 241.3 seconds; client tests took 2,802.6 seconds. The final head has 19 Ci-Attestation trailers plus the client receipt, and GitHub verifies its signature. Optional Swift proof was unavailable (swift-format missing); this change contains no Swift. The ci/ regression is a trust-surface edit, so ordinary selected PR CI remains required. Auto-merge is armed and pinned to 5162abb6e08d76bcb4651252ed28e346aade1fde; required hosted checks are pending.

Refs #4421. Public APIs pass against hybrid libobs and libobs-c-reference before extraction. Cover absent core, rejected owners, private sources, identity, callback data, saved bindings and owner teardown. No Rust swap in this prerequisite; Rust RED/GREEN follows in #4425.
Refs #4421. Both extraction contracts fail before moving the five entry points; all eight current isolated-core consumers require the same registration/core translation unit. The public characterization remains unchanged.

Ci-Attestation: {"at":1794860875,"gate":"general/all/client-lint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"bf4a94a6ddb98c3bce113f8a27f86b99","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"5b8470816ab382473b531f69095aed94","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"18960a5430fcf98aa7593d684e1b3578","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"d290ec3f54f45cba4851be094714cece","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"bac5f69a660cb0cb3d73ae56906a2720","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860875,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"86d16c6dc5e69ab8be587d910de0d22c","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860875,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"87b52516ba3a006243ce04d182c0f2cf","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"dcbd09570b1965e041c39f1c8515c22b","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"1a6d945435e297f29fc37c3756c2247b","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860875,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"5335a5b6a971155006ceb8d7ca8e4af0","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860876,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"232cbacb36273573fc0135b6425bd267","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860875,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"fa64396a4f35a8e8705d7b748cdf796e","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Ci-Attestation: {"at":1794860875,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"da6b7ac0af03733eb1b26f8edd07299f69810f71b75c63260fdac866b0c7510e","lane":"client-lint","parents":["1f3758c802cdb6bc95c421820e189ffd6dcd290b"],"secs":845,"stamp":"03c09e16e69ac4a27d09986f27eba6f2","tree":"a6467a2e794d8ce1521a660ad16b16abf53a3fd4","v":1,"via":"run"}
Refs #4421. Move only the five registration bodies; retain locking and obs_hotkey_register_internal in the original core. Enroll all eight current isolated-core fixtures with explicit complete unity partitions and matching registration snapshots. The Rust swap remains #4425. Preserve every unrelated source translation unit.
Refs #4421. Build direct, legacy missing-adapter and graph-owned unity variants. The graph-owned variant fails to link because the deferred support hook adds the real adapter a second time after source replacement.
@zackees zackees changed the title test: Pin the single-hotkey registration extraction boundary (RED) libobs: characterize and extract single-hotkey registration Nov 16, 2026
Refs #4421. Retain logical source ownership as CMake target metadata before sources become generated wrappers. The deferred portal adapter hook now checks both logical and compiled sources, avoiding duplicate definitions while preserving legacy missing/direct adapter enrollment. The focused CMake link regression passes in all three modes.

Ci-Attestation: {"at":1794862789,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":130,"stamp":"b5398f81a615c86b58806bf66d431309","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862789,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":130,"stamp":"13c9daa3077c1cf51f7b0818aae1eccd","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862789,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":130,"stamp":"c7ec094f7b53c4559ad92eb21c10a713","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862789,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":130,"stamp":"6809143e074743d477bdfec714c52ade","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862655,"gate":"general/all/client-lint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"c0bbe9f1ab8793a7e29fefd17dd1c5f9","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862789,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":130,"stamp":"c04b5ef18e710444a864d7cc7c4259c0","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862657,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"a05010f0d2d39c8183bba5401adaf6a6","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862657,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"14db9301da46faca9194264e61d9af96","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"2e86a8dfa37d90d5b449ee5c9c1d2bb8","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"9e1bef27389d72b7cdd6a44a1f92ae3c","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"d12ed34f46f63e206644d2b8641c131d","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"eb302780c9d8eec2eac5856fb22e5dbc","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"b17a1cc39f383e1a849864782db5bbc4","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862657,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"5654a0b2519f58b4f9d40857c2a04aea","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"f46e8ebf6e1fcd3981cee920f7d2ff28","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862656,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"cea9b1f99e57d1c283aad36bffd25025","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862655,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"c724efb3aa4155248dd5f89b3f026091","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794862655,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"f6a00e9daae0b60048ac3b0a0f7ed57de5746006bc40f46858bf408a6ac7ce4f","lane":"client-lint","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":241,"stamp":"fa1b83aba4530ce45e7c0009d716c83a","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}
Ci-Attestation: {"at":1794865593,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"5391489ed83d73b0df42087ea8bf0d81a734691d0a47ffbd6c95e7c6107b9f38","lane":"client-test-x86_64-unknown-linux-gnu","parents":["21c7663246945b7c7cc2b821d6fcf506dcf66566"],"secs":2803,"stamp":"498f66e4807ab7531a6477346a91f647","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"70921630b403b6e8f2f0db281a1b9fd92d873030","coverage":"all-tracked-applicable-files","diff":["ci/test_hotkey_register_extraction.py","libobs/build/libobs.core+.h.c","libobs/obs-hotkey-register.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","test/cmocka/build/test-graph.json","test/cmocka/native-test-groups.cmake","test/cmocka/test_hotkey_register.c","test/cmocka/tests.d/hotkey_background_error_link_support.cmake","test/cmocka/tests.d/test_hotkey_register.cmake"],"head":"40f72b0b40c0782f41504b3dae8cd8c98dc74210","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":"da4115c904c629f6acc934f801041525de48ba89992c3c1f75b663f26a2f12f0","tree":"75108fc7c3fc615630204a79e1be1e68d8efadbe"}}
@zackees
zackees enabled auto-merge November 16, 2026 21:48
@zackees
zackees added this pull request to the merge queue Nov 16, 2026
Merged via the queue into master with commit aaf61a1 Nov 16, 2026
41 checks passed
@zackees
zackees deleted the test/4421-hotkey-register-extract branch November 16, 2026 23:31
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