Skip to content

obs-hotkey: Port binding field getters (#3851) - #3853

Merged
zackees merged 4 commits into
masterfrom
port/hotkey-binding-getters
Nov 7, 2026
Merged

zackees merged 4 commits into
masterfrom
port/hotkey-binding-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports the three remaining binding getters in obs-hotkey.c.h to obs-hotkey, preserving the exact stored combination, independent binding ID, pointer identity and both latch fields. No intended behavior differences or user-visible change. Public headers and existing C tests are unchanged.

Fixes #3851.

Commit sequence: C-only actual-library characterization 442a8c1eb; verbatim C extraction f07d822bc; Tier 1 RED 4d6829b14; Rust GREEN 6f2795544. RED command soldr cargo test -p obs-data --test obs-tests-core hotkey::binding_getters:: exited 101 with both tests failing at todo!().

The Rust shims read only the requested field, do not dereference/retain the stored hotkey, and delegate to the safe core. The C reference retains the extracted implementation in its own ported group. The three symbols are public and use rust-exports.d, so no hidden-symbol fragment is needed. Save/load parity now uses the actual binding layout and getter shims; obsolete Windows benchmark stand-ins were removed.

Validation:

  • Five new Tier 1/layout/Tier 3 tests pass. Size, alignment and every field offset of both binding and combination are measured from real C headers. Differential cases cover arbitrary modifier bits and IDs, null/non-null stored pointers, independent IDs, and unchanged latch state.
  • All 503 hotkey tests pass (final run 3.88 seconds) with OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core hotkey::.
  • Mutation: forcing hotkey_id to return zero makes hotkey::binding_getters_parity::characterized_edges fail (Rust 0, C 17), exit 101. Original core restored and GREEN rerun.
  • Focused Tier 2 used docker_task_command and this slot's warm volume. Built libobs, libobs-c-reference, test_hotkey_binding_getters, unchanged test_hotkey_getters_characterization and unchanged test_hotkey_load; each test passed three repeats against each library before and after the swap. ldd confirmed both actual loader paths. Dynamic exports match exactly: 1,767 symbols.
  • SOLDR_PORCELAIN=0 ./lint passes (354.6 seconds): formatting, 349 CI self-test scripts, workspace/feature Clippy and Dylints.
  • Staged source-group inventory (10 tests), port metadata (5 tests), and benchmark stand-in inventory (3 tests) pass. GCC and Clang syntax checks of the new source group pass with -Wconversion -Wsign-conversion -Wfloat-conversion, using the oracle's dependency header shims.

Test cost: 25 debug invocations of the five new tests, longest 0.045 seconds, peak RSS 16,672 KiB; no own threads or new Rust test executables (existing Core state category).

The full ./unittest/Tier 2 suite, macOS/Windows native checks and a local-gate attestation were not run. Hosted PR CI remains the merge gate. Tier 4 does not apply to these field readers.

@zackees
zackees marked this pull request as ready for review November 7, 2026 08:37
@zackees
zackees enabled auto-merge November 7, 2026 08:37
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator/chaperone. GREEN head 6f27955 is pushed and verified; PR is ready and auto-merge is enabled with the head pinned. Full local lint passed; 503 hotkey tests and focused dual-library Tier 2/export/loader checks passed. Full Tier 2 and native Windows/macOS runs were not run locally; no local-gate attestation. See the final PR body for RED/GREEN and mutation evidence.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 61afc2f Nov 7, 2026
46 checks passed
@zackees
zackees deleted the port/hotkey-binding-getters branch November 7, 2026 09:43
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.

rust: Port obs-hotkey binding getters to obs-hotkey

1 participant