Skip to content

test: Characterize and extract hotkey dispatch before Rust swap #5327

Closed

Description

@zackees

obs_hotkey_dispatch remains in libobs/obs-hotkey.c.h:457-463 and is imported by Rust binding-press code. Before its Rust swap, characterize its current C behavior and extract its body verbatim into libobs/obs-hotkey-dispatch.c.h, following #5287, #5305 and queued #5320.

Scope: C-only prerequisite. Preserve callback versus router selection, exact callback arguments, press/release forwarding, the no-router no-op, and the existing unchecked pointer preconditions. Dispatch does no binding lookup: test a real binding and an empty binding inventory/unknown ID. A zero-initialized hotkey subsystem can dispatch a valid callback; NULL hotkey is safe only in the rerouted/no-router branch. NULL core and NULL callback on a direct dispatch are undefined behavior, characterized in documentation rather than invoked.

Register the extraction alphabetically in the existing core unity group, all eleven isolated monolith consumers, their expected inventories, the canonical cmocka graph and tests.d. Add a portable, warning-clean cmocka C-source fixture with the sibling external seam. Do not modify existing C tests, public headers, Rust, WebSocket, workflows or link-support files.

Acceptance: original C characterization passes; RED missing-extraction commit precedes GREEN verbatim extraction; focused OFF/ON cmocka coverage, manifest checks and ./lint. Rust Tiers 1/3 are for a separate follow-up issue; network Tier 4 does not apply. No user-visible behavior changes.

Activity

  1. added
    port
    ready
    P2
    size:S
    on Nov 20, 2026
  2. zackees commented on Nov 20, 2026

    @zackees
    MemberAuthor

    Claiming: C-only characterization and verbatim extraction of obs_hotkey_dispatch in branch test/5327-hotkey-dispatch (pool slot obs-studio4, g6-hotkey-dispatch). 1. Pin callback/router, binding-independent and press/release behavior, including valid zero-state/NULL branches and documented unchecked preconditions. 2. Commit RED then extract verbatim and register every sibling manifest. 3. Run focused C/manifest checks and ./lint, publish a PR this session, and file the separate Rust swap issue.

  3. zackees commented on Nov 21, 2026

    @zackees
    MemberAuthor

    Done: characterization and extraction of obs_hotkey_dispatch merged in #5337 (4019645). The Rust swap needs its own follow-up issue.

  4. moved this from In progress to Done in obs-rust Multiviewon Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2portreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions