Skip to content

obs-core: Port display state accessors (#3848) - #3849

Merged
zackees merged 7 commits into
masterfrom
port/display-state-accessors
Nov 7, 2026
Merged

zackees merged 7 commits into
masterfrom
port/display-state-accessors

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Fixes #3848

Ports obs_display_set_enabled, obs_display_enabled, and obs_display_set_background_color from C into obs-core. NULL setters remain no-ops, the NULL getter remains false, and background colors retain every bit. No intended behavior differences or user-visible changes.

The adapter projects only the leading scalar fields of private struct obs_display; it never allocates a prefix as a complete display or mirrors native mutexes. Real-header checks measure prefix extent, alignment, every field offset, and accessed scalar sizes. The differential oracle compiles the extracted C bodies unchanged and compares complete C-allocated objects after every operation, including unrelated fields outside the Rust prefix. Invalid pointers and unsynchronized concurrent access remain outside the defined C contract; documented in the parity test and rust/README.md.

RED → GREEN

  • C-only characterization 0326512, then verbatim extraction 050e286 (body/signature byte comparison with starting master passed). Characterization registration fix 336900d adds the private header's caption/uthash dependencies. No pre-existing C test or public header changed; the only later characterization-file change is clang-format on the new file.
  • RED 4dfa276: SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core obs_core::display_state:: exited 101, 0 passed / 3 failed, exactly the three todo!() stubs. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-Gqtv1X.log.
  • GREEN 9873712: same owning category and filter obs_core::display_state exited 0, 6 passed (three safe-core characterization mirrors, layout, NULL/boundary parity, and bounded arbitrary operation sequences). Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-AAVFNA.log.
  • Mutation: temporarily storing value & 0x00ff_ffff instead of the full color exited 101, with both differential behavior tests failing (layout still passed). Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-mcY6eB.log. Exact GREEN source restored; final rerun recorded below.

Tier 2 and exports

Both before the swap and after GREEN, unchanged test_display_state passed 3/3 against C reference and 3/3 against hybrid, no skips. Loader paths verified using ldd; 1,767 dynamic exports, identical. Original C bodies remain in their own reference-only ported group; existing view PCH reused, no new PCH or workflow. Three public Rust ABI functions use their own export fragment; no hidden functions added.

Final log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-SEcBpE.log. C characterization log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-3GRqbJ.log.

Focused reproducer: uv run --no-project /tmp/run-display-tier2.py, using the repository docker_task_command, its image/source mount, and the slot's build volume; configure with the standard Tier 2 flags, build libobs libobs-c-reference test_display_state, compare exports, verify loader paths, and run the exact CTest selector for OFF and ON. The first attempt found no /build/tree; the next caught the new test's missing caption include dependency; both were resolved by configuration/registration. The broad Tier 2 suite and full ./unittest were not run. Hosted PR CI remains the merge gate; no local-gate attestation claimed.

Gates and cost

  • Source-group inventory after staging: uv run ci/test_build_groups.py, 10 passed.
  • GCC and Clang syntax/conversion/prototype checks pass for the new reference unity group. Clang needed -Wno-unused-command-line-argument solely because this host's Nix wrapper injects linker flags into syntax-only invocations; no product warning policy changed.
  • ./lint --fix exited 1 in unchanged test_local_gate_probe: soldr reported no-cache preflight refused to modify .../target/obs-gate-probe-mkojy3by/target while build lock .../debug/.cargo-lock is active. Formatter and earlier Python checks completed; later Clippy/Dylint lanes were not reached. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-p1H7BR.log. Separate format and focused Clippy results recorded below. No safety guard bypassed.
  • Pre-push clud-review: one read-only reviewer, clean; no actionable findings.
  • Test cost: existing obs-tests-core binary only. Each new module passed 25 debug runs at OBS_PARITY_CASES=reduced: Tier 1 longest 0.03 s, peak 10,832 KiB RSS; Tier 3 longest 0.02 s, peak 18,160 KiB RSS. No own threads. Proptest sequences capped at 64 operations; 512 full / reduced via the shared parity helper.
  • Tier 4, real-app run and features ledger are inapplicable: no protocol or observable behavior change. No work in obs-output, obs-service, obs-websocket, excluded parser/transition series, native test files, or other slots.

Separate checks: soldr cargo fmt --check exit 0, log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-CVLAhQ.log; SOLDR_RUSTC_WRAPPER=none soldr cargo clippy -p obs-core --all-targets -- -D warnings exit 0, log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-7MQybL.log. Initial focused Clippy also encountered a soldr lock refusal; a later serial attempt passed. Restored GREEN six-test rerun exit 0, log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-JlM01u.log. Final commit a2f893c25 adds formatting and the mutation-generated minimized 0x01000000 regression seed; same reviewer checked that follow-up, clean. No mutation remains.

Final formatted head a2f893c25: owning-category focused command rerun exit 0, 6 passed (including saved mutation seed), log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-SO9guX.log.

Merge-queue conflict rebase (2026-11-07)

Replaced head a2f893c25b91b44e99b81db2d2bfb6d0393e8c56 with 8fa91f8b1c359b5a6642ffc2cc03960d530fe511, rebased onto master cc28e01f4afde01229fe70b8df78e5f10b35dea5 after #3847. #3857 was still open. Combined disjoint graph entries and ran the repository canonicalizer uv run ci/test_test_graph_sorted.py --fix; all 504 master targets/tests are preserved, plus display state (505 each). Range-diff shows five original commits identical and only graph context differing in characterization. Port source is identical to the old head.

The merged exact-count inventory assertion initially failed (417 != 416); follow-up 8fa91f8b1 increments its expected base by one for the retained display test. uv run ci/test_native_b2_portability.py: 3 passed. Graph ordering checks: 2 + 5 passed. git diff --check: clean. Focused owning-category display tests: 6 passed, exit 0 (SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core obs_core::display_state), artifact /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-sV3v2x.log.

Final SOLDR_PORCELAIN=0 ./lint: exit 1, diagnostic_state unknown. Artifact tail confirms soldr refusing to build the Dylint driver under clud; all earlier lanes (Python, formatting, workspace and feature-set Clippy) passed. No workaround applied; hosted Fast Gate remains authoritative. Artifact /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-MFq21B.log. Full unittest/Tier 2 were not repeated for this behavior-neutral rebase. Auto-merge enabled with the new head pinned; handed off to pool chaperone.

Pool conflict rebase after #3880 (2026-11-07)

Rebased assigned head c26deeb7b7fa510e849deb2469cb707750e42763 onto 58d2c1155f9507da4728576f24f8aa68e2efefae. Kept master's ci/test_native_b2_portability.py exactly and dropped the now-empty count-only commit. Range-diff confirms all six port/test commits unchanged; implementation, oracle and Rust tests are byte-identical to the previous head. Graph entries and all master registrations are retained, and graph sorting was replayed. Moved the existing display-state prose into its C file's port-table row in rust/README.md, preserving the contract and parity record. Added conditional OBS::w32-pthreads to the new private-header C test's graph libraries, without editing the C test. No new link-support stub or oracle logging callback.

Portability preflight: all seven native_build::canonical_rust_static_ exact-list tests pass. Host Clang and GCC syntax checks pass on the new oracle with strict format/conversion flags and -Werror. Native portability (4), graph sorting (2), README placement (1), build groups (10), port metadata (5), and diff checks pass. Latest hosted runs for the replaced head were successful; no latest hosted failure required diagnosis. Earlier exact inventory counts above are superseded by master's relative checks.

The assignment's single serial SOLDR_PORCELAIN=0 ./lint ran on #3870: all earlier lanes (formatting, self-tests, workspace and feature Clippy) passed, then exit 1 / diagnostic_state unknown at the documented soldr Dylint-driver build refusal under clud. Tail confirms the refusal for Dylint v6.2.0 / nightly-2026-05-28; no toolchain/guard workaround. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-hXI1qS.log. Hosted Fast Gate remains authoritative. Full unittest/Tier 2 and native platform runtimes were not repeated for these mechanical rebases.

Final focused SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core obs_core::display_state: exit 0, six tests passed including full-object original-C parity, arbitrary operation sequences, NULL/boundaries and real-header prefix layout. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-qjIq06.log. New head: 569268230bb04154d98252badee9ca73b53f225c.

@zackees
zackees marked this pull request as ready for review November 7, 2026 08:28
@zackees
zackees enabled auto-merge November 7, 2026 08:28
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the pool chaperone. Auto-merge is enabled for verified head a2f893c; required hosted checks / merge queue remain pending. Local six-test GREEN, focused unchanged C Tier 2 OFF/ON, layout, exports, mutation, format, Clippy and review evidence are final in the body. Full unittest/broad Tier 2 and successful full lint are not claimed. Releasing the slot now per pool assignment.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the port/display-state-accessors branch from a2f893c to 8fa91f8 Compare November 7, 2026 09:12
@zackees
zackees enabled auto-merge November 7, 2026 09:13
@zackees
zackees force-pushed the port/display-state-accessors branch from 8fa91f8 to a156c2a Compare November 7, 2026 10:06
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased assigned head 8fa91f8b1c359b5a6642ffc2cc03960d530fe511 onto latest fetched master e53544d8d5d1c857da634e4e659acc8e2bec29d2; new head a156c2a96b49370cf7a6e40aaa8c5460b27ce354. Resolved the three registration conflicts by retaining both display-state and module-failure-info modules/tests in sorted order. All source, export, oracle and README records retained. Range-diff preserves all seven commits with registration-context changes only; display implementation/tests/oracle byte-identical to replaced head.

Graph merged without conflicts; disjoint display entries retained, exact base count automatically rebased from 417 to 418. Graph/build inventory: 16 passed, exit 0 (local-test-IOVT1b.log). git diff --check clean. No port behavior changes.

This assignment also ran SOLDR_PORCELAIN=0 ./lint on #3858: earlier formatting, Python and workspace/feature Clippy lanes passed; exit 1 only at documented soldr Dylint-driver build refusal under clud (local-test-s7DvSb.log). Full unittest/Tier 2/native runtime suites were not repeated for this mechanical rebase; hosted Fast Gate remains authoritative. Existing pool chaperone retains the handoff.

Focused owning category obs_core::display_state: 6 passed, exit 0 (local-test-VonphW.log). Exact force-with-lease push verified remotely; head-pinned auto-merge re-armed and confirmed.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased pool head a156c2a onto current master 19da800; exact force-with-lease pushed and remote head verified as c26deeb. Range-diff preserves all seven patches with only the SDK-enabled native inventory assertion addition (425), retaining all master assertions. Native inventory (3), graph ordering (2), graph slices (1), port metadata (5), build groups (10), diff-check and all six display-state Rust tests including layout/C parity pass. No port behavior changes. Series SOLDR_PORCELAIN=0 ./lint passed on #3870 (exit 0; matching passing Dylint verdict reused). Full Tier 2/native platform suites were not repeated. Head-pinned auto-merge confirmed; existing chaperone retains the handoff.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the port/display-state-accessors branch from c26deeb to 5692682 Compare November 7, 2026 12:48
@zackees
zackees enabled auto-merge November 7, 2026 12:49
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the pool chaperone. Replaced c26deeb with verified remote head 5692682 using an exact force-with-lease; head-pinned auto-merge is confirmed. Dropped the count-only commit and kept master relative inventory checks exactly. Range-diff preserves all six original port/test commits; implementation/oracle/Rust tests are byte-identical. Retained graph registrations, moved the README prose into its C file port-table row, and added conditional Windows pthread dependency to the private-header C test graph without editing the C test. Seven exact-list registration tests, six focused display-state/layout/C parity tests, strict host Clang/GCC oracle checks, native inventory (4), graph sorting (2), README (1), build groups (10), port metadata (5), and diff checks pass. The single serial series lint on #3870 reached only the documented soldr Dylint-driver refusal after earlier lanes passed; hosted Fast Gate remains authoritative. Full Tier 2/native runtime suites were not repeated. PR body is final; retiring from hosted monitoring per assignment.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit e4571c5 Nov 7, 2026
44 checks passed
@zackees
zackees deleted the port/display-state-accessors branch November 7, 2026 15:48
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rust: Port libobs/obs-display state accessors to obs-core

1 participant