Skip to content

rust: Port util/platform-nix-portal.c to obs-util #1631

Closed

Description

@nathan-v

Unit

Port libobs/util/platform-nix-portal.c.h to obs-util, preserving the portal sleep inhibitor and its GIO feature gate.

Phase and position

Phase 4 platform-nix work, tracked by #153, following the platform-nix-inhibit port (#1500). The separate session D-Bus fallback is claimed in #1576 / #1577 and is outside this unit.

Dependencies and existing tests

test_inhibit_sleep_dbus.c already covers the public sleep-inhibitor path, basic portal calls, repeated activation and destruction. First land a separate characterization PR for the portal-specific request/response and asynchronous lifecycle behavior, keeping the existing tests and production C unchanged. Then port with Tier 1 RED/GREEN, C ABI compatibility and Tier 3 parity.

Notes

Linux/FreeBSD GIO host behavior stays within the Rust platform/FFI boundary. Preserve public headers. Tests must use an isolated fake bus or deterministic transport, never the user's desktop session. Explicitly distinguish source-only characterization of hidden portal symbols from the existing public-API OFF/ON integration coverage. No intended behavior change.

Activity

  1. nathan-v commented on Oct 21, 2026

    @nathan-v
    ContributorAuthor

    Claiming: libobs/util/platform-nix-portal.c.h (#1631).

    1. Add a separate C characterization PR for portal discovery, request arguments, response handling, repeated activation, cancellation and async teardown, preserving production C and existing tests.
    2. Validate the new cases and existing OFF/ON integration coverage; document hidden-symbol/source-only boundaries.
    3. Leave the Rust RED/GREEN implementation for the subsequent port PR.

    First characterization PR expected today. The session D-Bus fallback (#1576 / #1577) is outside this claim.

  2. added
    claimed
    on Oct 21, 2026
  3. nathan-v commented on Oct 21, 2026

    @nathan-v
    ContributorAuthor

    Characterization PR: #1633 (commit 647df0f). Nine original-C cases pass locally, including ASan/UBSan; a temporary flags mutation fails as expected. Linux OFF/ON validation and required PR CI are in progress. Rust implementation remains a subsequent PR.

  4. nathan-v commented on Oct 21, 2026

    @nathan-v
    ContributorAuthor

    Characterization PR #1633 is ready for review at 647df0f. Required CI Gate is green, including all four OFF/ON Tier 2 shards. Locally, nine characterization cases pass with ASan/UBSan and 100 Linux repeats per mode; the unchanged public integration suite passes 10/10 per mode. The Rust port remains outstanding and this PR uses Refs #1631.

  5. nathan-v commented on Oct 21, 2026

    @nathan-v
    ContributorAuthor

    Draft PR is up: #1660

    RED e1891544e is on that branch. Ten Tier 1 tests panic not yet implemented in the portal core. GREEN is next on the same PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions