Skip to content

libobs: characterize and extract hotkey combination background id (Refs #5275) - #5287

Queued
zackees wants to merge 2 commits into
masterfrom
test/5275-hotkey-combo-id
Queued

zackees wants to merge 2 commits into
masterfrom
test/5275-hotkey-combo-id

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member

obs_hotkey_combination_get_background_id was still embedded in the hotkey monolith, preventing a whole-file Rust swap with independent compatibility coverage. This PR adds deterministic C-source characterization and moves the wrapper verbatim into libobs/obs-hotkey-combination-background-id.c.h, retaining the existing C-owned core and mutex.

The fixture records locking, callback-field reads, unlocking, invocation and cleanup. It checks failed locking, missing callbacks, successful NULL and allocated-empty output, exact pointer ownership transfer, callback failure with and without partial output, unknown modifier bits, and callback reentry. The callback field changes at unlock to prove capture under lock. Allocation accounting uses the real libobs dstr and bfree contract. The test has an external-mode seam for the later Rust swap; today it characterizes included C source.

The sorted unity group, tests.d pointer, canonical test graph, eleven isolated hotkey consumers and their expected inventories agree. No Rust source, existing C test, public C header, workflow or obs-websocket code changes. Unit-specific Rust Tiers 1/3 belong to the separate follow-up, and network Tier 4 does not apply.

The original C snapshot passed 25 repeats per library mode before RED commit ac33d9ee9 failed on the missing extraction include. The GREEN implementation was validated at 813e228ee; published head 0858b16d135dcb7d14066e5674cc1a18a7fd1379 has the identical source tree and extracts the same function body. The entire native_build:: module passed (322 tests), as did 23 focused Python inventory/build-group/diagnostic checks and one-agent clud-review. Linux Tier 2 passed all 13 focused C suites against each library and 25 repeats of the new characterization per mode; all 66 configured *_rust targets built with -k 0, and both libraries exported the identical 1,769 symbols. Windows MSVC linked all eight Rust categories plus hybrid libobs and all 57 configured Rust-static fixtures. Darwin arm64 also linked hybrid libobs and all 57 configured Rust-static fixtures. The new C fixture separately compiled and linked for both MSVC and Darwin. The single full SOLDR_PORCELAIN=0 ./lint run passed C/CMake formatting, Ruff and 394 Python self-test modules, then exited 1 because browser startup (2 s), CMake configure churn (30 s) and private-data CMake linkage (30 s) timed out. All three failed tests passed an individual focused rerun. The full lint command was not repeated; its later Rust analysis stages were not reached in that invocation. Refs #5275.

Fresh forced-refspec merge-tree checks covered all open hotkey/core-group/test-graph overlaps, including #5272 and #5268, plus the local #5259 branch. This head merges cleanly with current master and both named sibling PRs. #5259 requires registration-list and Python-membership reconciliation when the second hotkey change lands; its snapshot and the other inherited conflicts are retained in the audit report. All temporary refs were deleted.

These are Linux-hosted build/link checks and focused OFF/ON execution. Native Windows/macOS execution, the complete cmocka suite and hosted PR/merge-queue results are not claimed.

The repository push code subsequently passed complete six-target client lint (Clippy and Dylint on Linux x64/arm64, MSVC x64/arm64 and Darwin x64/arm64, plus formatting and feature combinations). Full client attestation was unavailable: the parallel browser self-test failed again and test_pr_attestation.py exceeded its 600-second module deadline, exposing the existing str/bytes timeout-reporting error in ci/local_gate.py. The wrapper published partial client-lint evidence through its documented ordinary-PR-CI fallback. Required hosted CI remains the admission gate.

Ci-Attestation: {"at":1795124964,"gate":"general/all/client-lint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"44c8ffffc36b9aa2235ed0a0cb972828","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124970,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"681c16b3678da13df7283ca3db7fe17e","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124971,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"59df1d9ae07c76bca955af338378782e","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124968,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"89dc8e81329812e3e25cf4edb413e846","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124969,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"8d713602bd376c987d7dbc78b0039a40","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124966,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"4a06c4f644058bf25551f81ac7feaecc","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124967,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"7f07fa076920f2a8607d078110aa6545","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124970,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"91113e18292be5b566046b3e2c08056d","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124970,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"c48ed21ef75d8e20bfb31cd048499a65","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124967,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"538401b13285c6a94888afe56a2122ed","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124968,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"6390cd77607ba92bbd7bebbde3609fa2","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124965,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"913437ae6aaf2784e1291986b9efb768","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
Ci-Attestation: {"at":1795124966,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"6f4e159cc4c6244e47604b0a797b097c","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"}
@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 22:09
@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
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant