Skip to content

obs-scene: Port synchronized scalar bounds getters (#3897) - #3901

Merged
zackees merged 7 commits into
masterfrom
port/3897-scene-bounds-getters
Nov 7, 2026
Merged

zackees merged 7 commits into
masterfrom
port/3897-scene-bounds-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_sceneitem_get_bounds_type, obs_sceneitem_get_bounds_alignment and obs_sceneitem_get_bounds_crop into obs-scene. NULL defaults, detached items and captured-parent recursive video-mutex synchronization retain C behavior; every lock path unlocks that same parent, through the existing item_fields_lock/item_fields_unlock helpers. Other transform/bounds getters remain for follow-up. Refs #3897.

Commit sequence: preserved C characterization dd751cfff; repaired standalone verbatim extraction 40c54e5d8; Tier 1 RED 60bef96f3 (both safe tests fail at todo!("#3897"), exit 101, local-test-JVPz53.log); GREEN 7c145e4dc plus reviewed integration-link repair and formatting 19b79a099. No intended behavior differences.

The shims read only the requested initialized field without borrowing the item. Real-header tests measure the prefix span, alignment, every offset and enum widths; existing nested-prefix tests retain LLP64 coverage. C owns complete items and compares every byte after calls, including arbitrary float-neighbor bits, signed zero, infinities and NaN payloads. Proptest persistence is disabled. The concurrent fixture checks all three C and Rust getters block on the parent's video mutex and see fields published before unlock; recursive and detached reads are covered too.

Standalone scene archive consumers supply the hidden mutex adapters: pure-rule tests use abort-only link support, while the real crop integration executable uses real captured-parent locks and libobs logging. The graph-consumer check covers this distinction and exact native source lists retain every assertion. One clud-review reviewer found the initial crop abort-only stub mistake; fixed and re-reviewed clean. No existing C test, public header, WebSocket file or workflow was edited. No new Rust test executable.

Validation:

  • All 357 reduced-parity scene tests pass, including six new safe/layout/differential/concurrent cases (local-test-TbRHOs.log; initial focused local-test-QroxGn.log). The final six-case rerun after formatting also passes (local-test-qYeKdD.log).
  • Mutation: XOR one returned type bit; differential characterized_edges fails immediately with mismatch bits 9, exit 101. Exact GREEN source restored (local-test-DfajmD.log).
  • Extraction: unchanged characterization/canvas pass three repeats against both actual libraries via docker_task_command; ldd proves loader paths and all 1,767 exports match (local-test-gwBvwM.log).
  • GREEN: bounds and unchanged canvas characterization each pass 100 consecutive repeats against each actual library; all eight standalone scene targets pass three repeats against both libraries under Xvfb, including all 11 unchanged crop cases each time with no startup skips. ldd proves both paths; all 1,767 exports match (local-test-dwTcSm.log). The initial integration stub error was observed as crop startup abort (local-test-76E7HK.log), then repaired before the definitive pass. Reproducer: pool port-3897b/tier2.py.
  • All seven native_build::canonical_rust_static_ registration tests pass (local-test-uj1ssw.log). Native portability (7), sorted graph (2), README (1), build groups (10) and port metadata (5) pass.
  • Host GCC and Clang accept the extracted group, oracle, characterization and both new link-support sources with -Wformat-nonliteral -Werror -Wconversion -Wsign-conversion -Wfloat-conversion; Nix Clang uses -Qunused-arguments and the shell's SIMDe include root. The logger inherits its portable printf annotation from the real base header; no new log callbacks.
  • The full lint run passes formatting, CI self-tests, workspace Clippy and every feature Clippy lane, then exits 1 only at the documented soldr refusal to build the Dylint driver under clud. The final three artifact lines were inspected; no workaround attempted. Hosted Fast Gate must validate Dylint (local-test-p0y8mz.log). The first lint attempt caught a multiline-CMake regex issue during formatting; the checker was fixed before the definitive run.
  • Final fetch/rebase onto origin/master 58d2c1155 is a no-op; merge-tree exits 0 (tree c8851e576e7f7c5950759eff7e1fc437b9836fa1). obs-scene: Port the scene item ID getter (#3865) #3869 and obs-scene: Port scale filter and blending getters (#3889) #3891 remain open. Range-diff preserves RED exactly and limits extraction repair to removing premature empty metadata and adding the missing module registration. Final head: 19b79a099420979c3fc6e425726f73e3ac76890e.

Test cost: 25 debug runs of the six new tests, reduced parity, longest 0.243 seconds, peak RSS 15,220 KiB. The concurrency case starts six C workers sequentially (one at a time); other new cases start none. Allocation-driving sizes are fixed complete C objects.

Not verified locally: full ./unittest, native macOS/Windows runtime, or a local-gate attestation. Focused TSan was attempted using nix-shell rust/tools/sanitize/shell.nix, SOLDR_PORCELAIN=0, OBS_BUILD_NUMBER=3897, the harness configure command and a focused target. Configuration exceeded its 240-second deadline before test compilation, with missing sysprof-capture-4.pc warnings; no sanitizer pass is claimed. Reproducer/log: pool port-3897b/tsan.py and tsan.log. Tier 4 does not apply. Hosted PR CI remains the merge gate.

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

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator per pool instructions. Verified GREEN head 19b79a0 is pushed, the PR is ready, and auto-merge is enabled with that head pinned. No claim refusal or conflicting claim was visible immediately before arming. Final validation and limitations are in the PR body: both-library 100-repeat bounds/canvas replay, all eight standalone consumers including real crop integration, 1,767 matching exports, 357 scene tests, mutation, native registration and strict GCC/Clang. Hosted Fast Gate must supply Dylint; local TSan did not reach compilation. Not waiting on hosted CI as instructed. Both scene sibling PRs remain open; retain their logging/registration changes alongside the private mutex support if rebasing after either lands.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

The MSVC logging-link fix added scene-getter-log-link-stub.c to the legacy bounds-placement executable, leaving its exact registration assertion stale. Updated the expected registration to include that source in order; kept the stub and exact match. RED: full native_build:: run at 19b79a0 had 112 pass / 1 fail. GREEN at 12a20a6: all 113 native_build:: tests pass; test_native_b2_portability.py, test_test_graph_sorted.py, test_rust_readme.py, self-test lane and Rust formatting all exit 0. Fast-forward push verified; auto-merge remains enabled.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased after the 14:43 UTC merges onto origin/master 5de5b53, replacing 12a20a6 with 1e617b1. Retained both independent scene module registrations, logging/mutex support and portability assertions; kept the existing formatted CMake registration. No semantic overlap. Passed the whole native_build:: module (113), native portability (7), sorted graph (2), README (1), full CI self-test gate, obs-c-oracle build and six reduced bounds getter Rust/layout/parity tests. Range-diff reviewed; lease-protected push verified; auto-merge remains enabled. Handed off to the pool manager for hosted checks and queue observation.

The rebase onto master placed item_bounds_getters after
item_render_getters, which rustfmt rejects (macOS and Windows Rust
Tests ran fmt --check).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 4251401 Nov 7, 2026
44 checks passed
@zackees
zackees deleted the port/3897-scene-bounds-getters branch November 7, 2026 17:09
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.

1 participant