Skip to content

libobs: extract and characterize obs_sceneitem_get_order_position before its Rust port #5284

Open

Description

@zackees

Phase 6 C-only prerequisite for obs_sceneitem_get_order_position in libobs/obs-scene.c.h:2277-2296, before a later Rust implementation swap in obs-scene.

Issue #2895 and merged PR #2899 ported the attached-item guard and order decisions; the getter's parent-list traversal and locking remain C. No open PR touches obs-scene.c.h at this check (2026-11-19).

Extract the function body verbatim into its own scene-item .c.h in the existing sorted core-source unity group. Register all CMake and Cargo native source manifests consistently across Linux, macOS and Windows. Add a focused cmocka characterization of zero-based sibling position counting, nested group-local counting, and NULL/detached results, using the current C implementation. Preserve the public headers, existing C assertions and behavior. No Rust implementation belongs in this prerequisite.

Acceptance: characterization passes before and after extraction; focused native source registration checks and ./lint pass. File a separate dependent Rust-swap issue carrying Tier 1 mirrors, unchanged Tier 2, original-C differential coverage and mutation testing. Network Tier 4 is inapplicable to this local query. Do not add Rust-static support or link-support files while #5246 is held.

Rust-swap follow-up: #5285. Existing #2899 difference: the reference library's legacy attached predicate always accepts, so NULL/detached public calls are undefined there. The new prerequisite fixture will document that distinction, pin the exact getter body's early return under the hybrid predicate contract, and exercise valid walks through both real libraries. Actual hybrid public NULL/detached calls will also be checked locally; the follow-up must retain real-adapter coverage.

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    readyMeets the definition of Ready; claimable
    P2Normal priority
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: C-only characterization and extraction in branch test/5284-sceneitem-order-position (pool slot obs-studio8, g7-order-position). 1. Pin the existing getter behavior with focused cmocka assertions. 2. Extract verbatim and register the native inputs on all hosts. 3. Validate, publish the prerequisite PR this session, and file the dependent Rust swap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal priorityportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimablesize:SHours

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions