Skip to content

obs-core: Port public canvas flags getter (#3940) - #3943

Merged
zackees merged 5 commits into
masterfrom
port/3940-canvas-flags-getter
Nov 7, 2026
Merged

zackees merged 5 commits into
masterfrom
port/3940-canvas-flags-getter

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_canvas_get_flags to obs-core while preserving every stored uint32 bit, including private and unknown flags. The original non-null canvas requirement and lock-free field read are unchanged. Rust owns the read; a private C adapter supplies the borrowed field address without mirroring the canvas layout.

Fixes #3940, native child of #444. The accepted claim is assigned to zackees and the earlier claim blocker is cleared. This behavior-preserving port needs no features-ledger entry; Tier 4 is inapplicable.

The preserved sequence is C-only characterization, verbatim extraction, Tier 1 RED, then Rust GREEN. Original RED commit dd75ba9 deliberately fails both safe-core tests at the issue stub with exit 101; after rebase it is a12f366. Range-diff confirms all four previous commits are unchanged. GREEN is 7c4bd7f. The rebased branch replaces 63d1fd8 with an exact force-with-lease; the remote head was independently verified.

Real-header checks measure the private field view's size, alignment and every offset, plus the actual canvas flags width. Tier 3 compiles the original extracted getter and automatically discovered field adapter against obs-internal.h, without direct calls to production libobs functions. Exact parity covers the characterization, every single bit and its complement, and arbitrary uint32 values with proptest persistence disabled. There are no exclusions or intentional differences. Clearing the high bit kills both differential tests with exit 101; the minimized input is 2147483648. The exact GREEN source was restored and all five new tests pass at full parity.

The unchanged C characterization passes three repeats against each actual library after the swap, through docker_task_command and this slot's warm volume. ldd proves C-reference and hybrid library selection. Complete dynamic export sets match exactly at 1,767 symbols. The original baseline and extraction evidence remains in the previous worker's report.

Validation passes with exit zero: complete native_build module, 149 tests; obs-util, 914 unit tests and both doctests; field-adapter discovery, per-port registration entries, native B2 portability, graph ordering, README policy and build-group inventory. GCC and Clang in the sanitizer Nix shell accept the adapter, original getter, oracle and unchanged characterization with format-nonliteral warnings treated as errors. Clang ignores only unused injected linker arguments during syntax-only checks. Formatting passes, and serial full lint passes in 290.4 seconds, including repository checks, workspace and feature Clippy, and Dylint. One clud-review primary reviewer found no actionable issues.

Test cost: 25 debug runs per new module at reduced parity; longest run 0.078 seconds, peak child RSS 15,604 KiB, no own threads. Inputs and fixture allocations have fixed size.

Evidence directory: /tmp/finish-3943-XXXXXX. Full lint artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-bVqwD4.log. Obs-util artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-qBC2SJ.log. Early parallel Rust attempts met soldr's active-build-lock refusal and were rerun serially after the active command completed. A process-inspection command was refused by clud's process-scan guard; no override was used.

Public C headers, existing C tests, WebSocket and workflows are unchanged. New implementations and tests use new files with minimal shared registration lines. The full Tier 2 suite, local-gate attestation, hosted CI and native macOS/Windows runtime checks were not run locally. Hosted required checks remain the merge gate.

🤖 Generated with Claude Code

@zackees
zackees force-pushed the port/3940-canvas-flags-getter branch from 63d1fd8 to 7c4bd7f Compare November 7, 2026 21:16
@zackees
zackees marked this pull request as ready for review November 7, 2026 21:17
@zackees
zackees enabled auto-merge November 7, 2026 21:17
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit ac51f4c Nov 7, 2026
41 checks passed
@zackees
zackees deleted the port/3940-canvas-flags-getter branch November 7, 2026 22:46
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Nov 8, 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-canvas.c.h public flags getter to obs-core

1 participant