Repository navigation
obs-scene: swap scene-item parent-group query to safe Rust (Refs #5290) - #5318
Merged
Merged
Conversation
…#5290) Tier 1 mirrors every assertion of test_sceneitem_get_group.c against the safe core; Tier 3 compares the original extracted C wrapper with the shim on one fixture through the real-named lock, walk and group-flag boundary, with mutants for a missing unlock, an unlocked walk, locking group items, a second flag read and a dropped result. The shared real-named full-lock stand-in in scene_atomic_update.c now dispatches to an active parent-group probe first. The core and shim are stubs that always return NULL, so: soldr cargo test -p obs-data --test obs-tests-core item_get_group test result: FAILED. 1 passed; 6 failed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
obs_sceneitem_get_group now comes from obs-scene in the hybrid libobs. Safe
Rust rejects a NULL scene or item before any read and a group item (read
through the existing obs_sceneitem_group_scene_flag adapter) before any
lock, then takes the C-owned full lock once around the C-owned walk
(obs_sceneitem_parent_group_lookup, still shared with the reorder callers)
and returns its result as a borrowed pointer. The original wrapper moves to
the libobs.ported-scene-item-get-group group for the C reference build.
soldr cargo test -p obs-data --test obs-tests-core item_get_group
test result: ok. 7 passed; 0 failed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-Attestation: {"at":1795137681,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":94,"stamp":"da860ded63ac467c9cf83c567dba639f","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137681,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":94,"stamp":"0c389a57702fbdc62568259a4dae7617","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137681,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":94,"stamp":"7048fd9b7ac42f1352508e2d737820e3","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137681,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":94,"stamp":"1e08863b727f90be5e9a3a924ddb6cb9","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137585,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"37cfe49363a1176fbb702c4a707df14a","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137681,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":94,"stamp":"3d9dc77840a45f93b6d67b6baa66bb90","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"bd5348b2573edd5ea87ca662ae133cee","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"9c1a276dda417faf502be2256c407bd1","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"fa5721ed25a260a7bed795e858eeceaf","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"b1e3d097f0677c77ea9b3b490b710517","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137585,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"112a54dd02aba35da15cebdc166b61fe","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137585,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"78c272385f5b9e255edb1420175853a4","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"38857d4734d1b0c4f1238c5a07f4f0ef","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"1172c74a4f56f25860c502e3c5667b17","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"ec2c3daff22940c896cc5a92bc7b5c24","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137586,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"e286b851bf5794cad1b5c19b99d49052","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137585,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"24fb535f2cf2fff3dedf25bdcb81d1a2","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137585,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e4de114e7e55e2cfc5dfec3c6b859e0f8cd5ecd15e5898620e2c7dda37453f6c","lane":"client-lint","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":76,"stamp":"55946666aa60602cf1b87cfdd19eb9c9","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Ci-Attestation: {"at":1795137891,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"a4f4bca8fc277273a683223fed952e899635c97ccec4f74cf01f470f22d5d114","lane":"client-test-x86_64-unknown-linux-gnu","parents":["dff036172f3a61e4f0de23e1b3d08f181e1ff4af"],"secs":209,"stamp":"ec7da1f51a98b2b6873903eeb5d965c2","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6","v":1,"via":"run"}
Client-Checks: {"checks":{"base":"3b8563940504be9c25e19d594fa5667996cb13b6","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-scene-item-get-group+.h.c","libobs/build/ported-source-sets/scene-item-get-group.json","libobs/cmake/rust-exports.d/obs-scene-item_get_group.txt","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_scene_item_get_group_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/scene-item-get-group.list","rust/obs-c-oracle/oracle/scene_atomic_update.c","rust/obs-c-oracle/oracle/scene_item_get_group.c","rust/obs-scene/src/ffi/item_get_group.rs","rust/obs-scene/src/ffi/mod.rs","rust/obs-scene/src/item_get_group.rs","rust/obs-scene/src/lib.rs","rust/obs-scene/tests/scene/item_get_group.rs","rust/obs-scene/tests/scene/item_get_group_parity.rs","rust/obs-scene/tests/scene/main.rs"],"head":"96aab97749dd1b990e449adbaf9eafa9c51d81cd","tools":{"orchestrator-python":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]","schema-dependencies":"3.13.16 (main, Oct 14 2026, 01:04:01) [Clang 23.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504-GITv2.15.4\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Regexps Automata RelaxNG Schemas Schematron Modules Debug Zlib"},"tracked-digest":"35a0cd9f4ee6d3dac836568a817c111c6f705a5ec7caf2b26e422be4aed86eb3","tree":"d2738fb520af1cfd3acbf2f753e375fca6f213f6"}}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5290.
Swap only
obs_sceneitem_get_groupintoobs-scene. Safe Rust rejects a NULL scene or item before any read. It rejects a group item (read through the existingobs_sceneitem_group_scene_flagadapter) before taking any lock. It then takes the C-owned full lock once around the C-owned walk and returns the result as a borrowed pointer with no added reference. The walk isobs_sceneitem_parent_group_lookup, which the reorder callers still share. No new adapter is added. The original C wrapper moves to thelibobs.ported-scene-item-get-groupgroup, which builds the C reference only.Tests:
test_sceneitem_get_group.c(from libobs: characterize and extract scene-item parent-group query (Refs #5276) #5289) against the safe core.scene_atomic_update.cnow hands off to the active parent-group probe first.Evidence
RED (
dff036172, core and shim are stubs that return NULL):GREEN (
344794b0c, rebased on3b8563940):The change has no user-visible effect, so it adds no features-ledger line. Native Windows/macOS execution is not claimed. The push had no signed client evidence, so the ordinary PR CI must pass.
🤖 Generated with Claude Code