Skip to content

obs-hotkey: swap hotkey key-translation query and store to safe Rust (Refs #5321) - #5357

Merged
rdoupe merged 3 commits into
masterfrom
port/5321-hotkey-key-translation
Nov 20, 2026
Merged

rdoupe merged 3 commits into
masterfrom
port/5321-hotkey-key-translation

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #5321.

Swap obs_get_hotkey_translation and obs_hotkeys_store_key_translation into obs-hotkey. Both are declared in obs-internal.h without EXPORT, so the shims stay hidden (rust-hidden.d/obs-hotkey-key_translation.txt); the exported symbol set is unchanged.

  • The query returns NULL for OBS_KEY_NONE without touching the core. Otherwise it returns the stored pointer itself (read a second time to return it, exactly like C's slot ? slot : def) or the caller's default, NULL included.
  • The store frees the old name (NULL too), clears the slot and then stores a bstrdup copy, or leaves it NULL.
  • No lock and no key range check, as before. No copies, no ownership change, no public API change.

The obs->hotkeys.translations[] array and bfree/bstrdup stay in C behind three private adapters (libobs/obs-hotkey-key-translation-fields.c.h, in the core group, and a new shared Rust-static support member, test/cmocka/hotkey-key-translation-link-support.c). The slot adapter indexes the array exactly as the original did. The original file moves unchanged to libobs.ported-hotkey-key-translation, which only the C reference builds. The standalone hotkey fixtures still compile the original from source, as before.

test/cmocka/test_hotkey_key_translation.c is unchanged and still tests the C source. A new test_hotkey_key_translation_rust target compiles the same file with HOTKEY_KEY_TRANSLATION_EXTERNAL and links libobs_rust-static. In one unity group it is followed by hotkey-key-translation-record-support.c, which includes the real fields adapter with obs bound to the test's own record_core(). Every assertion (pointer identity, re-stores, bnum_allocs balance, no core reads for OBS_KEY_NONE) therefore runs against the Rust symbols on the C-owned array, with no fake. Both functions are hidden in libobs, so on macOS the fixture binds to the archive, not the dylib.

The translations shim now calls the Rust store directly. The real definition replaces three store stand-ins: the recorder in the hotkey test binary (translations parity now records store calls through the key-translation oracle's core), the aborting stand-in in the port_comparison bench (ci/test_bench_libobs_stand_ins.py updated), and the one in windows-keys-rust-stubs.c.

Tests:

  • Tier 1 (hotkey::key_translation) mirrors every assertion of the unchanged C test against the safe core, plus the original's access order (frees, slot reads, untouched keys).
  • Tier 2: the unchanged C test against the original on both builds, plus its Rust twin; all hotkey tests repeated.
  • Tier 3 (hotkey::key_translation_parity) runs the original extracted C and the shims on one recording core through the real-named adapters. It compares the free/copy trace, the number of core reads, the returned pointer (NULL, default, stored slot), the stored slot (NULL, text, never the caller's pointer), the allocation balance and every other key. It also checks the original's traces against the characterization, real-header layout (OBS_KEY_LAST_VALUE, slot size), edges over five keys × five strings, and a proptest. Eight mutants are caught (core read for NONE, default preferred, single read, leaked old name, wrong text copied, copy before free, NULL clear ignored, wrong key).
  • Tier 4 does not apply (no network protocol). Excluded as UB in both: keys outside 0..OBS_KEY_LAST_VALUE, and a missing core for any key but OBS_KEY_NONE. No intentional differences.

Evidence

RED (3885e4872, the safe core is todo!()):

soldr cargo test -p obs-data --test obs-tests-core -- hotkey::key_translation::
test result: FAILED. 0 passed; 6 failed

GREEN (ac54af5b2, on 7dffa4d67):

soldr cargo test -p obs-data --test obs-tests-core -- hotkey::key_translation hotkey::translations
test result: ok. 48 passed; 0 failed

soldr cargo test -p obs-data --test obs-tests-core
test result: ok. 6191 passed; 0 failed; 5 ignored

soldr cargo test -p obs-studio-rust --test obs-tests-app -- native_build::
test result: ok. 328 passed; 0 failed

Mutation: with the query's second read removed from the safe core (Some(text) => Some(text)), hotkey::key_translation_parity gives FAILED. 2 passed; 3 failed. The change was reverted, and no seed files were written (failure_persistence: None).

OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 1 --tests 'hotkey'
libobs exported symbols, C vs Rust: IDENTICAL (1769 symbols)
100% tests passed, 0 tests failed out of 1053   (C reference and hybrid, each; every *_rust target built)
100% tests passed, 0 tests failed out of 46     (repeat of the hotkey tests, C reference and hybrid)
test_hotkey_key_translation, test_hotkey_key_translation_rust ... Passed (all four runs)

uv run --no-project ci/windows_link_check.py      exit 0 (categories; Tier 2 win-x64 and mac-arm64 links, including test_hotkey_key_translation_rust)

./lint                                            lane lint: ok
./push client lanes: clippy + Dylint on all six targets ok; 9294 workspace tests passed (6 skipped), 920 utility tests passed

Test cost: new modules at OBS_PARITY_CASES=reduced take 7 ms (Tier 1) and 10 ms (Tier 3). Peak memory is 8 MB over 20 runs. The tests start no threads of their own.

The change has no user-visible effect, so it adds no features-ledger line. Native Windows and macOS execution is not claimed (links only).

🤖 Generated with Claude Code

@rdoupe
rdoupe requested a review from zackees as a code owner November 20, 2026 05:56
@rdoupe
rdoupe force-pushed the port/5321-hotkey-key-translation branch from 280d270 to ac54af5 Compare November 20, 2026 06:10
@rdoupe

rdoupe commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto 7dffa4d67 (master had added two entries to test/cmocka/build/rust-static-support.json; kept both and appended ours). RED is now 3885e4872, GREEN ac54af5b2. Rechecked on the rebased head:

  • soldr cargo test -p obs-data --test obs-tests-core -- hotkey::: 642 passed, 0 failed
  • soldr cargo test -p obs-studio-rust --test obs-tests-app -- native_build::: 329 passed, 0 failed
  • ./lint: ok
  • ./push client lanes: clippy and Dylint ok, Linux client tests ok

rdoupe and others added 3 commits November 20, 2026 01:23
… (Refs #5321)

Safe Rust mirrors of every assertion of the unchanged
test_hotkey_key_translation.c, plus the original's slot access order,
against a todo!() core for obs_get_hotkey_translation and
obs_hotkeys_store_key_translation.

    soldr cargo test -p obs-data --test obs-tests-core -- hotkey::key_translation::
    test result: FAILED. 0 passed; 6 failed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(Refs #5321)

obs_get_hotkey_translation and obs_hotkeys_store_key_translation (both
hidden, obs-internal.h) now come from obs-hotkey in hybrid libobs. The
query returns NULL for OBS_KEY_NONE without touching the core, else the
stored pointer (read again to return it, as C's ternary) or the default.
The store frees the old name (NULL too), clears the slot and stores a
bstrdup copy. No lock, no key range check, as before.

The name array and bfree/bstrdup stay in C behind private adapters
(obs-hotkey-key-translation-fields.c.h, core group and a shared Rust-static
support member). The original moves to libobs.ported-hotkey-key-translation
for the C reference. The unchanged test_hotkey_key_translation keeps
testing the C source; a new test_hotkey_key_translation_rust twin selects
its HOTKEY_KEY_TRANSLATION_EXTERNAL seam and binds the real adapters to the
test's own core in one unity group, so the same assertions run on the Rust
symbols. The translations shim calls the Rust store directly; the store
stand-ins in the hotkey test binary, the bench and windows-keys-rust-stubs.c
are gone (the real definition replaces them).

Tier 3 runs the original and the shims on one recording core through the
real-named adapters (free/copy trace, read count, returned pointer, stored
slot, allocation balance, other keys) with eight mutants.

    soldr cargo test -p obs-data --test obs-tests-core -- hotkey::key_translation hotkey::translations
    test result: ok. 48 passed; 0 failed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Ci-Attestation: {"at":1795154791,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":96,"stamp":"60038850620514c8f2ef91bda1f34e74","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154791,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":96,"stamp":"7cd019a9b2cceba8636e9c289b98ea63","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154791,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":96,"stamp":"b67296b2234a3fcb2ba47b0915298ea9","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154791,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":96,"stamp":"22108fc11e554a23654ca39d6d832188","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"general/all/client-lint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"59910c1e57d34ddc1965b970e8013aa0","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154791,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":96,"stamp":"184efd6f471a757cb80bbc4096b9bfe1","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"6ee985a7cf873e9d6b8458e84e05c0dc","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"a38a28642b81e0641da18bbaa97fccba","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"81013b65e87f99ad00788fe07df794aa","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"41153ce2466c5d729c70dfe3de29b85f","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"046cadd9317e8607d0670dbe85b3b9c6","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"bf09de774cbc2890db0e3cad5a179723","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"94c5c3c737b10074d1f9ad3d15e530f3","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"5dd42ec31d9444ae826815316eb669f5","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"f5dedca47bbe961719d4ebb9e770317b","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"b7bb52dfff5542176822e68846c4bf70","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"04d3f8d71bbb577e13851d0396e24854","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795154695,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5d7c34f32aa73072551f9d058df55976992661c8a1b8d61bfda01a15f172180b","lane":"client-lint","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":90,"stamp":"ec79a9d15a7c61c5fde8bfcafd518fac","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}
Ci-Attestation: {"at":1795155038,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"84dc5b179dc5a94323476e7391a206b1eb91cda323678101ad4f5ea9723dc73d","lane":"client-test-x86_64-unknown-linux-gnu","parents":["3885e487237cd05a3ff7febf000fbf6a3fab85c6"],"secs":246,"stamp":"fc1922c91d740b22516db9cf60b30c95","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"7dffa4d67d6ccc3a53f85dcc41a95f26e6a36f0b","coverage":"all-tracked-applicable-files","diff":["ci/test_bench_libobs_stand_ins.py","libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-hotkey-key-translation+.h.c","libobs/build/ported-source-sets/hotkey-key-translation.json","libobs/cmake/rust-hidden.d/obs-hotkey-key_translation.txt","libobs/obs-hotkey-key-translation-fields.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_hotkey_key_translation_swap_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_key_translation_rust.json","rust/obs-c-oracle/benches/port_comparison.rs","rust/obs-c-oracle/oracle/hotkey_key_translation.c","rust/obs-c-oracle/oracle/hotkey_translations.c","rust/obs-c-oracle/src/hotkey_translations.rs","rust/obs-hotkey/src/ffi/key_translation.rs","rust/obs-hotkey/src/ffi/mod.rs","rust/obs-hotkey/src/ffi/translations.rs","rust/obs-hotkey/src/key_translation.rs","rust/obs-hotkey/src/lib.rs","rust/obs-hotkey/tests/hotkey/key_translation.rs","rust/obs-hotkey/tests/hotkey/key_translation_parity.rs","rust/obs-hotkey/tests/hotkey/main.rs","rust/obs-hotkey/tests/hotkey/translations_parity.rs","test/cmocka/build/rust-static-support.json","test/cmocka/build/test-graph.json","test/cmocka/hotkey-key-translation-link-support.c","test/cmocka/hotkey-key-translation-record-support.c","test/cmocka/windows-keys-rust-stubs.c"],"head":"7804e244dab46057649d49af9022070931906b27","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.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-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"21adc2c6ebf2fedddde2b0515db3aa93cfc60bc97ea65e94f4936999b08371d8","tree":"fe46a2769cc2d4063fa311ff22cee23cd2778bc2"}}
…(Refs #5321)

On Apple targets enum obs_key is unsigned, so storing it in the int
kt_last_key tripped -Wsign-conversion and broke the macOS cross lint and
artifact lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795156807,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":93,"stamp":"8d5d83d0af26cef72527c99d0b1dfd6f","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156807,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":93,"stamp":"27660b6d178a171f96e4b76f669cbcae","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156807,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":93,"stamp":"5ccd40ed1ccda1d713c562ce5663fc76","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156807,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":93,"stamp":"3560116aea11d09ca885b1f3f587e1f0","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"general/all/client-lint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"fb7480029512d87c96bf3f4155748aa1","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156807,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":93,"stamp":"6cfeab94a050dae2a2a29bc63255f2f8","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"20b8b32c9e68bf43b56a396ad4b391ac","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"cb0307db011f644610b617245855236b","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"1de9c5db952241f72abce0d1e6f38a62","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"c93b9d7384aeda5e9894692cf42ef50e","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"287ca02cc853af1039415f66d6eaa4dd","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"ed066e7c6989bf999baec5e15915cc1e","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"0ed394e914697c5b4b87ada5c7361b4f","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"742814af1b7df0ed11fb1b07ce2cb02d","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"6344539b4b020dc99866533a4e836542","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"8cbd89b9ab4ef18f9c4c3acc4a1ef94b","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"9c2d7f2aad01848f0a863e0aa85334cd","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795156713,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"27a8ffbcefe5ff5554b09f7468ae33aedfcf6116fd60cce78aa306e762b0b8c7","lane":"client-lint","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":140,"stamp":"4474ac51b6732250189ada2af350097d","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}
Ci-Attestation: {"at":1795157044,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"7a38a25f0f2c387824a8300603bc220cd6129c3762e30a45000608f8fd673c72","lane":"client-test-x86_64-unknown-linux-gnu","parents":["4626b387f49305df1efbf459ccfe19a19117f135"],"secs":236,"stamp":"c604f509b742bd572e8887fd19adc463","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"f5edeeb1fa1d8fc96e0dd7d3d951470687a76ee2","coverage":"all-tracked-applicable-files","diff":["ci/test_bench_libobs_stand_ins.py","libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-hotkey-key-translation+.h.c","libobs/build/ported-source-sets/hotkey-key-translation.json","libobs/cmake/rust-hidden.d/obs-hotkey-key_translation.txt","libobs/obs-hotkey-key-translation-fields.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_hotkey_key_translation_swap_is_registered.rs","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_key_translation_rust.json","rust/obs-c-oracle/benches/port_comparison.rs","rust/obs-c-oracle/oracle/hotkey_key_translation.c","rust/obs-c-oracle/oracle/hotkey_translations.c","rust/obs-c-oracle/src/hotkey_translations.rs","rust/obs-hotkey/src/ffi/key_translation.rs","rust/obs-hotkey/src/ffi/mod.rs","rust/obs-hotkey/src/ffi/translations.rs","rust/obs-hotkey/src/key_translation.rs","rust/obs-hotkey/src/lib.rs","rust/obs-hotkey/tests/hotkey/key_translation.rs","rust/obs-hotkey/tests/hotkey/key_translation_parity.rs","rust/obs-hotkey/tests/hotkey/main.rs","rust/obs-hotkey/tests/hotkey/translations_parity.rs","test/cmocka/build/rust-static-support.json","test/cmocka/build/test-graph.json","test/cmocka/hotkey-key-translation-link-support.c","test/cmocka/hotkey-key-translation-record-support.c","test/cmocka/windows-keys-rust-stubs.c"],"head":"a648d8cd03d639e928e6aaea165230732ed26c03","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.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-GITv2.15.4\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"0c25aa1f42ec1fbae129f7b86face0ad7113958cb7c1f73295cf1de377d98898","tree":"026f1faf19036b6c6eb20ffbf1016f60082a2487"}}
@rdoupe
rdoupe force-pushed the port/5321-hotkey-key-translation branch from ac54af5 to fe5ca4b Compare November 20, 2026 06:44
@rdoupe

rdoupe commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

The macOS cross lint and macOS Rust artifact lanes failed to build the C oracle: on Apple targets enum obs_key is unsigned, so kt_last_key = key; (an int) tripped -Wsign-conversion under -Werror.

Reproduced locally with the same flags and the soldr Apple SDK (clang --target=arm64-apple-macosx -isysroot ~/.soldr/bin/apple-sdk/14.5/darwin-aarch64/package/sdk ... -Wsign-conversion -Werror -fsyntax-only oracle/hotkey_key_translation.c):

  • before: hotkey_key_translation.c:101:16: error: implicit conversion changes signedness: 'obs_key_t' (aka 'enum obs_key') to 'int'
  • after fe5ca4b (explicit (int) cast): no diagnostics.

Rebased onto master; ./lint passes.

@rdoupe
rdoupe added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
@rdoupe
rdoupe added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
@rdoupe
rdoupe added this pull request to the merge queue Nov 20, 2026
Merged via the queue into master with commit 52ccd83 Nov 20, 2026
44 checks passed
@rdoupe
rdoupe deleted the port/5321-hotkey-key-translation branch November 20, 2026 08:32
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