Skip to content

obs-hotkey: Port synchronized background app ID query (#4072) - #4076

Merged
zackees merged 7 commits into
masterfrom
port/hotkey-background-app-id
Nov 9, 2026
Merged

zackees merged 7 commits into
masterfrom
port/hotkey-background-app-id

Conversation

@zackees

@zackees zackees commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Port obs_hotkeys_get_background_app_id to obs-hotkey, preserving its public API, failed-lock NULL result, exact borrowed pointer, and lock/read/unlock sequence. The real C adapter remains in production libobs and the live portal-shortcuts fixture. Public headers, existing C tests and obs-websocket are unchanged.

Fixes #4072 (native child of #444).

The port retains characterization, verbatim extraction, Tier 1 RED (d7d66c237, formerly c2eee39ed), and implementation (3882a2de9). The safe core's unlock omission was mutation-tested: differential parity failed at the C oracle's !app_id_locked assertion; restored code passed.

The CI repair corrects the portal fixture's exact expected source list. It also fixes standalone release linking: Rust had merged the app-ID FFI shim into the archive members selected by the Windows-key fixture. Those unused shims then demanded private C adapters, whose global obs cannot be imported from shared libobs. The release profile now gives obs-hotkey the same 256 codegen units as debug, keeping the unrelated FFI modules in separate archive members while retaining Thin LTO. The fixture no longer compiles the app-ID adapter or pulls its shim. Its independent registration tracks the manifest that controls this boundary. No placeholder global or new stub definitions were added.

Validation:

  • Local release CMake replay of the canonical test_windows_keys_steps_rust target: RED on f1fcb4b9a with the real adapter's undefined obs; GREEN after archive separation, exit 0. Removing the adapter before separation also reproduced the hosted three undefined app-ID adapter names. The final replay uses no section-GC, symbol-localization or undefined-symbol workarounds for executable objects. Symbol inspection confirms no app-ID shim/adapter symbols in the executable, and separate Windows-key/app-ID members in the production archive.
  • soldr cargo build -p libobs-rust --release: passed. Canonical Windows-key registration: one passed. Portability self-tests: 21 passed. The rebuilt canonical portal registration passed after its source-list fix.
  • Original hotkey suite: 521 passed; focused app-ID suite: four passed. Original full unit run: 7,395 passed, one stale portal expectation failed, six skipped; that expectation was fixed and its rebuilt test passed.
  • Final SOLDR_PORCELAIN=0 ./lint: passed, exit 0 in 246.7 seconds. The archive-isolation repair is commit bdd450262.
  • Local Tier 2 still stops before compilation because its cached soldr wrapper reports a read-only filesystem. Running the locally linked C executable is blocked by missing host libavcodec.so.62. The CMake replay allows unresolved dependencies originating inside the cached shared libobs, whose FFmpeg closure differs from this host; direct executable-object references remain checked. Hosted Tier 2, asan and native platform results remain the merge gate.
  • Tier 4 does not apply to this internal query. There is no intended behavior difference or feature-ledger change. No test binaries were added.

Test cost: the four original new tests, over 25 reduced-parity debug runs, had longest 0.032 seconds and peak RSS 19,904 KiB, with no test-owned threads. Generated arrays are capped below 64 bytes.

Hold for graph serialization behind #4075. Auto-merge stays OFF; the manager will enqueue this PR.

@zackees
zackees force-pushed the port/hotkey-background-app-id branch from c2eee39 to 3882a2d Compare November 8, 2026 21:55
@zackees
zackees marked this pull request as ready for review November 8, 2026 21:58
@zackees
zackees enabled auto-merge November 8, 2026 21:58
@zackees

zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator/chaperone. GREEN 3882a2d is pushed, ready, and auto-merge is armed with the head pinned. Local hotkey suite: 521 passed; restored app-ID rerun: 4 passed; mutation killed; ./lint passed. Local Tier 2 was blocked before compilation by the cached soldr wrapper reporting a read-only filesystem; hosted CI remains the merge gate.

@zackees

zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Continuing this pool PR under assignment fix-4076. Reproducing the missing background-app-ID private adapter links and the stale portal-shortcuts registration expectation. Auto-merge remains off; hold for graph serialization behind #4075.

@zackees
zackees added this pull request to the merge queue Nov 9, 2026
Merged via the queue into master with commit 7d64449 Nov 9, 2026
42 checks passed
@zackees
zackees deleted the port/hotkey-background-app-id branch November 9, 2026 02:03
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Nov 9, 2026
zackees added a commit that referenced this pull request Nov 10, 2026
…e links alone

The standalone test_video_render_size_rust target links libobs_rust.lib.
In release, obs_video_set_render_size shared archive members whose
dependencies reached audio_callback/audio_mix and the private audio-seam
adapter, which needs libobs's unexported obs global (MSVC LNK2019).
Local RED: release archive closure from obs_video_set_render_size reached
cgu.5/cgu.7 with undefined obs_audio_seam_*; GREEN: closure is one member.
Same fix as obs-hotkey/obs-scene (#4076).

Ci-Attestation: {"at":1794314767,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"a1b8a12c3faed0ed85a59984c5eb04ec","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
Ci-Attestation: {"at":1794314767,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"84687ed9a3666078168676e6447f4d0a","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
Ci-Attestation: {"at":1794314767,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"ea0c9a364206902a5528b1e4221720fc","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Nov 10, 2026
…dge (obs-rust#4541)

* test: Mirror video render-size graphics calls against Rust stub

* libobs: Port render-size setup to safe Rust with private graphics bridge

Refs obs-rust#4285. Stacked on test/4284-video-render-size-extract at 71fc36a. Preserve the original C helper in the oracle and C reference; reuse the unchanged characterization through the Rust static archive. Exact callback parity includes float rounding and signed viewport boundaries. Differential negative control rejected cull mode 0 instead of GS_NEITHER (2).

* build: Split obs-core release codegen units so the render-size fixture links alone

The standalone test_video_render_size_rust target links libobs_rust.lib.
In release, obs_video_set_render_size shared archive members whose
dependencies reached audio_callback/audio_mix and the private audio-seam
adapter, which needs libobs's unexported obs global (MSVC LNK2019).
Local RED: release archive closure from obs_video_set_render_size reached
cgu.5/cgu.7 with undefined obs_audio_seam_*; GREEN: closure is one member.
Same fix as obs-hotkey/obs-scene (obs-rust#4076).

Ci-Attestation: {"at":1794314767,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"a1b8a12c3faed0ed85a59984c5eb04ec","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
Ci-Attestation: {"at":1794314767,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"84687ed9a3666078168676e6447f4d0a","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
Ci-Attestation: {"at":1794314767,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["1211402bf769e960eeb101c736d2336dbc9acab0"],"secs":378,"stamp":"ea0c9a364206902a5528b1e4221720fc","tree":"5d6bfaa35872b4bf34f02cfa385bd2c70848539b","v":1,"via":"run"}
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_hotkeys_get_background_app_id from libobs/obs-hotkey.c to obs-hotkey

1 participant