Skip to content

obs-hotkey: Port read-only object field getters (#3868) - #3871

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

zackees merged 7 commits into
masterfrom
port/hotkey-object-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports four read-only hotkey object getters to obs-hotkey: description, registerer type, registerer and pair partner ID. A private C field-pointer seam keeps the hotkey layout opaque to Rust. Stored values and pointer identity, including stored nulls, are preserved without retaining or dereferencing the stored objects. No intended behavior differences or user-visible changes.

Fixes #3868; Phase 6 parent #444. Rebased onto merged #3853 and preserved its disjoint binding getters. Public headers, existing C tests and obs-websocket are unchanged.

Commit sequence: actual-library C characterization 53994fe63; verbatim C extraction a315d11e6; Tier 1 RED c00963bbf; Rust GREEN 7dc4b1bfc. RED command SOLDR_RUSTC_WRAPPER=none SOLDR_VERDICTS=off OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core hotkey::object_getters:: exited 101: both new tests failed at todo!().

Validation:

  • Five new Tier 1/layout/Tier 3 tests pass. The original C functions and Rust shims operate on real C hotkey fixtures; the seam is compiled from the production C adapter. Layout checks measure seam size/alignment/every field offset and public registerer enum size/alignment/values from real headers. Parity covers all five registerer types, arbitrary bounded description bytes, stored null/non-null handles and partner IDs, plus unchanged hotkey/description/token bytes. Proptest persistence is disabled.
  • All 508 hotkey tests pass: OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core hotkey:: (6.44 s execution).
  • Mutation: forcing the safe partner-ID core to return zero makes hotkey::object_getters_parity::characterized_edges fail (Rust 0 versus C 17), exit 101. Original core restored; final GREEN rerun recorded below.
  • C characterization and extraction baseline passed both actual libraries before the swap. Final focused Tier 2 used docker_task_command and this slot’s warm volume, building hybrid libobs, libobs-c-reference, the new test_hotkey_object_getters, unchanged test_hotkey_getters_characterization and unchanged test_hotkey_load. Each test passed three repeats against each library. ldd proved /build/tree/libobs/libobs.so.30 and /build/tree/libobs-c-reference/libobs.so.30; dynamic exports match exactly (1,767 symbols).
  • GCC and Clang syntax checks of the new ported unity group pass with -Wconversion -Wsign-conversion -Wfloat-conversion and real dependency headers. Source-group inventory (10 tests), port metadata (5 tests), native portability inventory (3 tests), sorted test graph (2 tests), and benchmark stand-in inventory (3 tests) pass.
  • Read-only clud-review: clean, one reviewer. git merge-tree --write-tree --name-only origin/master HEAD exits 0 with no conflicts.

Test cost: 25 debug invocations of the five new tests, longest 0.0460 s, peak RSS 18,144 KiB; no own threads or new Rust test executables (existing Core state category). The native test is registered once in test-graph.json, with a pointer-only tests.d fragment.

Final restored GREEN: all five new tests pass after restoring the core. SOLDR_PORCELAIN=0 ./lint --fix exited 1 only at the final Dylint step: soldr refuses to build the driver under clud (Dylint 6.2.0 selects nightly-2026-05-28, but its pre-deployed driver is only available for nightly-2026-08-15). Every earlier lint step passed: pinned C/CMake formatting, CI self-tests, rustfmt, workspace Clippy and every feature-set Clippy. Per the pool worker rule, no toolchain workaround was attempted; hosted Fast Gate must supply Dylint validation. Local artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-dfWnP2.log. Formatting-only follow-up is committed separately.

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

CI repair: rebased onto master 6d29998aa and added the abort-only obs_hotkey_object_fields stand-in required when test_windows_keys_steps_rust links the production Rust staticlib. The hidden seam is deliberately unavailable through shared libobs; the key-map test never calls it. The ASan build artifact and Windows LNK2019 both name this missing symbol; Linux identifies the same failed target. The repaired target builds and passes in the slot Tier 2 Docker tree. GCC and host Clang syntax checks pass with -Werror -Wformat -Wformat-nonliteral. No C test assertions or public headers changed.

Rebase after #3880: head 2e0297c35540c5cecd9d345b223c6018c2f0032f replaces 917d100d900248bd05d282bd744229d151fe67c4, based on master 58d2c1155f9507da4728576f24f8aa68e2efefae. Dropped the obsolete exact inventory count bump; ci/test_native_b2_portability.py is identical to master. Range-diff preserves the other original patches, including the ASan/Linux/Windows Tier 2 hidden-seam link repair. Added conditional OBS::w32-pthreads to the new characterization target and the Windows-key staticlib harness because both include obs-internal.h; no port behavior or assertions changed.

Current preflight: all seven native_build::canonical_rust_static_ exact registration tests pass; all five hotkey::object_getters unit/layout/differential tests pass with reduced parity (0.04 s execution); host Clang and GCC compile the new oracle with -Werror -Wformat -Wformat-nonliteral (Clang ignores only Nix-wrapper unused linker arguments). Native inventory (4), graph sorting (2), README (1), port metadata (5), build groups (10), and diff-check pass. SOLDR_PORCELAIN=0 ./lint passes (230.5 s; matching passing Dylint verdict reused). Logs: /tmp/rebase-3871-{registration-final,focused,lint}.log. A redundant registration attempt during the focused build was refused by soldr's target lock; the final serial rerun passed. No full Tier 2, native Windows, ASan runtime or local-gate attestation rerun; hosted CI remains the merge gate.

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

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator / pool chaperone at head 9571c8b. Auto-merge is enabled with that head pinned; hosted checks and queue admission remain pending. Focused GREEN, mutation and both-library Tier 2/export evidence are final in the PR body. Local lint reached only the documented soldr Dylint-driver refusal after every earlier step passed. Returning slot obs-studio3 clean and detached at origin/master; the worker is not waiting on hosted CI.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased pool head 9571c8b onto current master 19da800; verified remote head a8ba0a9 after exact force-with-lease. Range-diff preserves all five patches; only the SDK-enabled native inventory assertion changes (425); no port behavior changes. Native inventory (3), graph ordering (2), graph slices (1), port metadata (5), build groups (10), diff-check and all five object-getter Rust tests including layout/C parity pass. Series SOLDR_PORCELAIN=0 ./lint passed on #3870 (exit 0; matching passing Dylint verdict reused). Full Tier 2/native platform suites were not repeated. Head-pinned auto-merge confirmed; handed back to the existing chaperone.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Continuing pool CI repair in slot obs-studio4. All three failing build lanes trace to test_windows_keys_steps_rust missing an abort-only obs_hotkey_object_fields stand-in for the new hidden seam (ASan artifact confirms the full undefined-reference diagnostic). Rebasing onto current master, then adding the matching link support and validating focused checks; no existing C test assertions or public headers change.

@zackees
zackees force-pushed the port/hotkey-object-getters branch from a8ba0a9 to 917d100 Compare November 7, 2026 11:24
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

CI repair pushed at 917d100 (replaces a8ba0a9; exact force-with-lease and range-diff checked). All three build failures came from test_windows_keys_steps_rust linking the production Rust staticlib without the new hidden obs_hotkey_object_fields seam. Added the matching abort-only link stand-in; no existing C test assertions or public headers changed. The ASan build artifact names the same undefined reference as Windows LNK2019; Linux failed that same target. Focused Tier 2 target now builds and passes (0.25 s); all five hotkey object getter/layout/parity Rust tests pass; GCC and host Clang syntax checks pass with -Werror -Wformat -Wformat-nonliteral. Inventory, graph ordering, README, port metadata, build groups and diff-check pass. SOLDR_PORCELAIN=0 ./lint passes (233.3 s, matching Dylint verdict reused). First lint attempt hit the focused test build lock; sequential retry passed. Full Tier 2, native Windows and ASan runtime not repeated locally. Head-pinned auto-merge re-armed and autoMergeRequest confirmed. Handed back to the pool chaperone.

@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 a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the port/hotkey-object-getters branch from 917d100 to 2e0297c Compare November 7, 2026 12:38
@zackees
zackees enabled auto-merge November 7, 2026 12:39
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 58d2c11 and force-pushed 2e0297c, replacing 917d100 with an exact lease. Dropped the obsolete inventory count bump after #3880; the inventory test is identical to master and passes with the combined graph. Range-diff preserves every other original patch, including the ASan/Linux/Windows Tier 2 seam stand-in fix. README entry remains in the port table and both getter modules remain registered.

Preflight found missing Windows pthread header propagation for the new characterization target and Windows-key staticlib harness; added conditional OBS::w32-pthreads only. No port behavior, C assertions, public headers or workflows changed. Seven static-registration tests and five focused getter/layout/parity tests pass. Host Clang and GCC compile the new oracle with -Werror -Wformat -Wformat-nonliteral. Inventory, graph sorting, README, port metadata, build groups and diff-check pass. SOLDR_PORCELAIN=0 ./lint passes (230.5 s, matching passing Dylint verdict reused). Full Tier 2, native Windows and ASan runtime were not repeated locally.

Head-pinned auto-merge re-armed and autoMergeRequest confirmed for 2e0297c. Handed off to the pool chaperone; hosted checks and merge completion remain with it.

@zackees

zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member Author

Rebased after the 14:43 UTC merges onto master 5de5b53. Retained both README rows and oracle extraction blocks; range-diff preserves the original port/test patches. Whole native_build:: module (113 tests), portability (6), sorted graph (2), README (1), local_gate --only self-test, obs-c-oracle build and all five focused hotkey object getter unit/parity tests passed. GitHub initially rejected the push because the PR entered the queue; after the manager dequeued it, the explicit lease replaced 2e0297c with 9e1a490. Remote head and re-armed head-pinned auto-merge are confirmed. Full Tier 2 and native Windows/macOS were not rerun; hosted CI remains the merge gate.

@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 7, 2026
@zackees
zackees force-pushed the port/hotkey-object-getters branch from 2e0297c to 9e1a490 Compare November 7, 2026 15:01
@zackees
zackees enabled auto-merge November 7, 2026 15:02
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 5653407 Nov 7, 2026
44 checks passed
@zackees
zackees deleted the port/hotkey-object-getters branch November 7, 2026 16:47
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Nov 7, 2026
vpacher pushed a commit to wesleyhawes/obs-studio that referenced this pull request Nov 23, 2026
…bs-rust#3908) (obs-rust#5427)

test_fallback_warning_dialog raced its countdowns against wall time: a
runner stalled for 2 s inside countdown_moves_the_progress let the dialog
finish and delete itself, and the next read dereferenced a null QPointer
(the SIGSEGV plus 180-byte leak in obs-rust#3871).

OBSFallbackWarning takes an optional monotonic Clock; empty, as every
caller passes, it keeps its QElapsedTimer. The test advances a manual
clock and waits on events, checks the dialog is alive before each
dereference, and owns Shown in cmocka setup/teardown. Every existing
assertion stays; a new case covers the default clock by waiting for the
end. Test-only change to our own C++ test, per the decision on obs-rust#3908.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1795317098,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":93,"stamp":"aae4547e0c056696ca6c52459afa56f7","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317098,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":93,"stamp":"997c1d862365769367c4ca86b979e892","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317098,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":93,"stamp":"24a43744a949101f927ec1796b887ce7","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317098,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":93,"stamp":"02b30f7012013937c8ec08057724c039","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"c3c6139588bca0ad557fd9bc92793ff4","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317098,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":93,"stamp":"3dbb8a0b957e9d5fb065417641e5a676","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"298c2c10536aec5ef69e9b0c69758c39","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"576d787bb1466672fefb7e0e8251a0ec","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"187c9e4de37e7b660689022b9a17e54f","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"471d0b401867a2581fd57044d8e84b99","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"f8f0794921073d81668daf2093fe8b13","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"56b76f05068e0f0edb4c1c6b602c19ca","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"63a042ae61ab577f5f15f3e3193f1768","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"dc329bc45a2c2f77fa0893f9769c7202","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"7035f6cb800f5ce247b8786521ebd251","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"f482b96106c412fcea0ba17b48750756","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"124a6065fdb9d1575c29d0fc0841b294","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317004,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e398822f5e9231ea0ed5d46fc3fcd63badb7e741a9ccb4e5ad04ced22562b49c","lane":"client-lint","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":10,"stamp":"79ab06f4c1a0e5566d75134937990b58","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}
Ci-Attestation: {"at":1795317301,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"e139090ec62d22b66b695b962fddca983d7859f8823bb2f0ad2302ae96b4d348","lane":"client-test-x86_64-unknown-linux-gnu","parents":["7e17e738386d224416e7acd8d5de78b7d9065171"],"secs":202,"stamp":"4b67bd45d092841f24de830133d78784","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"ec9208d1cd391d5f052dc510b7dc252a43bc75d5","coverage":"all-tracked-applicable-files","diff":["frontend/dialogs/OBSFallbackWarning.cpp.hpp","frontend/dialogs/OBSFallbackWarning.hpp","libobs/build/libobs.core+.h.c","libobs/build/libobs.ported-get-video+.h.c","libobs/build/ported-source-sets/get-video.json","libobs/cmake/rust-exports.d/obs-core-get_video.txt","libobs/obs-get-video-fields.c.h","rust/README.md","rust/obs-c-oracle/oracle/get_video.c","rust/obs-core/src/ffi/get_video.rs","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/get_video.rs","rust/obs-core/src/lib.rs","rust/obs-core/tests/obs_core/get_video.rs","rust/obs-core/tests/obs_core/get_video_parity.rs","rust/obs-core/tests/obs_core/main.rs","test/cmocka/build/rust-static-support.json","test/cmocka/get-video-link-support.c","test/cmocka/test_fallback_warning_dialog.cpp"],"head":"ce6c78a684e25eb7401f393ce5af3278f46f9ff2","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":"aec838430e0d92054fdaaa8f6b51136b25c9dcc90d5d79efbb2c0e35399ee453","tree":"b0e14e850ae6abb89dc4e678c95a42f774559833"}}
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 object field getters to obs-hotkey

1 participant