Skip to content

rust: port the extracted obs_sceneitem_get_order_position to obs-scene #5285

Closed

Description

@zackees

Phase 6 follow-up to the C-only characterization/extraction prerequisite #5284. Begin only after its prerequisite PR lands.

Replace the extracted libobs/obs-scene-item-order-position.c.h unit with Rust in obs-scene, preserving the public obs_sceneitem_get_order_position API/ABI. PR #2899 already supplies the Rust attached-item predicate; the remaining parent-list traversal, position count and lock boundary still belong to C today.

Mirror the new test_sceneitem_order_position assertions in the existing Core state category binary: zero-based sibling positions and reordering, group-local/nested counting, NULL/no-parent zero and absent-item list length (characterized, not endorsed). Keep the C characterization unchanged against reference and hybrid. Use real private C boundaries for opaque scene/item handles and preserve lock/read ordering. Add original-C differential coverage and a mutation check, and all required layout/export/host registration validation. Rust runs through soldr; use no new test executable. Network Tier 4 does not apply to this local query. No behavior change or edits to the preserved WebSocket plugin.

Baseline caveat from #2899: libobs-c-reference deliberately compiles the legacy attached-item predicate, which always accepts. NULL and detached public calls are undefined on that reference. The prerequisite pins those early returns in an exact C-body probe supplied the hybrid predicate contract, and exercises valid list walks through both real libraries. The swap must preserve this existing intentional difference, cover hybrid public NULL/detached calls through its real adapter, and exclude only those undefined legacy inputs from differential execution.

Activity

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

    @rdoupe
    Collaborator

    /ready

  3. added
    ready
    on Nov 21, 2026
  4. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Claiming: Rust swap of obs_sceneitem_get_order_position into obs-scene (prerequisite #5284 is done by #5296).

    1. RED: Tier 1 cases mirroring every assertion of test_sceneitem_order_position.c in the existing core-state test binary, plus a Tier 3 differential against the extracted C wrapper through the real-named full-lock and the attached-item predicate, with mutants (missing unlock, walk outside the lock, head read moved, off-by-one count), all against a stub core.
    2. GREEN: safe core and shim; the C wrapper moves to a ported group for the C reference only; hidden export fragment and link support registered.
    3. One PR, first push today.
  5. moved this from Triage to In progress in obs-rust Multiviewon Nov 21, 2026
  6. rdoupe commented on Nov 21, 2026

    @rdoupe
    Collaborator

    Done in #5377 (merged 2026-11-21): obs_sceneitem_get_order_position now runs through safe Rust in obs-scene; master push run is green.

  7. 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