Skip to content

rust: Port libobs/obs-scene-item-get-group.c.h to obs-scene #5290

Closed

Description

@zackees

Phase 6 libobs core follow-up: port only obs_sceneitem_get_group in libobs/obs-scene-item-get-group.c.h to obs-scene after prerequisite #5276 lands. Keep the shared static get_sceneitem_parent_group implementation and reorder users in C, reachable through the real callable obs_sceneitem_parent_group_lookup seam. Respect the current hold on adapter-adding swaps; this issue is future work, not authorization to start a held swap.

The prerequisite adds test/cmocka/test_sceneitem_get_group.c, which becomes an unchanged Tier 2 contract. Mirror every assertion in the existing core-state category binary, add an oracle and differential/mutation coverage, and wire its recorder to the separately linked Rust wrapper. Preserve NULL scene/item and group-item rejection before field access/locking; exactly one balanced C-owned full-lock around lookup; first-match parent-group pointer identity; foreign/absent group results; and the borrowed return with no added reference. Characterized details include ignoring the removed flag and matching NULL parent/context pointers.

Keep layouts, locking, traversal and source context ownership in C through narrow real seams. Every standalone Rust-static consumer must link any needed real C adapter source, never an aborting stub. Prove Darwin fake bindings if introduced (#5226), build EVERY Linux *_rust cmocka target and run both Windows MSVC and Darwin pre-queue links, plus all applicable test tiers and repository validation. Preserve public headers, existing C tests, WebSocket compatibility, sorted unity groups and canonical test registrations. New Rust cases belong to the existing amalgamated category binary.

The prerequisite branch/PR and final validation are recorded on #5276. Claim and implement this follow-up only after the prerequisite is merged and the hold permits its adapters.

Prerequisite READY PR: #5289 (Refs #5276), published head 4e5dc34be5516f9ea45c274def061fecc8551900. It passed 322 native-build cases, Linux Tier 2 with all 66 Rust-static targets and new characterization repeated 25 times per library, unchanged related suites, equal 1,769-symbol export sets, all eight Windows category links, all 57 Rust-static fixtures on each of Windows MSVC and Darwin arm64, explicit new C-fixture links for both, one full lint and one-primary-agent review. Ordinary hosted PR/queue checks remain required after optional repeated client self-tests timed out. Native Windows/macOS runtime is not claimed.

Activity

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

    @rdoupe
    Collaborator

    Claiming: Rust swap of obs_sceneitem_get_group into obs-scene, branch port/5290-sceneitem-get-group.

    1. RED: safe-core and parity tests in the existing core-state category binary, against stubs.
    2. GREEN: thin ABI shim calling the Rust core; locking, traversal and the shared get_sceneitem_parent_group stay in C behind the obs_sceneitem_parent_group_lookup seam. Oracle plus differential and mutation coverage; the unchanged test_sceneitem_get_group passes against both libobs builds.
    3. Lint, Tier 2, Windows MSVC and Darwin links, then a PR.
  3. moved this from Ready to In progress in obs-rust Multiviewon Nov 20, 2026
  4. rdoupe commented on Nov 20, 2026

    @rdoupe
    Collaborator

    Done by #5318 (merged as 5d0944d): obs_sceneitem_get_group is safe Rust in obs-scene, with Tier 1, Tier 3 differential and Tier 2 coverage.

  5. moved this from In progress to Done in obs-rust Multiviewon Nov 20, 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