Repository navigation
obs-core: swap core type-catalog enumeration to safe Rust (Refs #5202) - #5211
Merged
Merged
Conversation
zackees
enabled auto-merge
November 19, 2026 08:02
Ci-Attestation: {"at":1795084865,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":156,"stamp":"c7280e301cb64bd778e2ee19a5671b4b","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084865,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":156,"stamp":"ea2307feb6077a9cafdb5f074ff7037f","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084865,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":156,"stamp":"09dd43e85779d9a751ca8bc35f058489","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084865,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":156,"stamp":"0a4293c7d7b92209b1e656b03341afa7","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"general/all/client-lint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"67a81fdf6aacd1ce97c995291e9a398d","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084865,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":156,"stamp":"18a22b8fc447dd8eaed986a4eb25d469","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"2a3591f6a273f7ebbd322ed232a9097b","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084709,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"311724f7ac117ea67da667245e8d4e9a","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"77ba51b59c38308cd9f1b7c91c639aee","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"2ebfa27a8324e164bf2604d713b39ea7","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"55b1f6fd926bee4df21a892e441c7f62","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"9bcb6fa1528fdd3157e75fda63bf82dc","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"23f4c5df461142d6325bb40fb9cb8e5b","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"f0c85ae578b694968a8b561624929895","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"dec52f7704cefa5da7111702758296cc","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"f7c260f5d55cca038b5f2eb4abc19d47","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"f2fa977c88d826e12b729d48f50bece4","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795084708,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"893e9e1419b08eb95677079072b074710011c49c67d600e7375a71aaee7ba880","lane":"client-lint","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":185,"stamp":"55aaebff2cc936b5f0483610488093c3","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Ci-Attestation: {"at":1795085618,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"92275d51d2a2c4976b03ea63f259ce536fbf3568034feeb6e05ab5f736bc46f9","lane":"client-test-x86_64-unknown-linux-gnu","parents":["5ef60c5af703cd31cf7dc146991b93bb8762c2f3"],"secs":751,"stamp":"752e99149229eefe7929d6593cf02e23","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e","v":1,"via":"run"}
Client-Checks: {"checks":{"base":"d8f5045f0882951a2806b9decaf82b97cac656b6","coverage":"all-tracked-applicable-files","diff":[".github/workflows/build-project.yaml","ci/test_ci_job_timeouts.py","ci/test_tier2_apt_cache.py","libobs/build/libobs.core+.h.c","libobs/build/libobs.graphics-image-max-size+.h.c","libobs/build/libobs.media+.h.c","libobs/build/libobs.media-image-orientation-fields+.h.c","libobs/build/libobs.media-texture-file-data-convert+.h.c","libobs/build/libobs.media-texture-file-data-session+.h.c","libobs/build/libobs.ported-hotkey-unregister-entry+.h.c","libobs/build/libobs.ported-type-catalog-enum+.h.c","libobs/build/libobs.ported-video-level-queries+.h.c","libobs/build/modules.d/graphics.json","libobs/build/modules.d/media.json","libobs/build/ported-source-sets/hotkey-unregister-entry.json","libobs/build/ported-source-sets/type-catalog-enum.json","libobs/build/ported-source-sets/video-level-queries.json","libobs/build/source-sets.d/LIBOBS_SOURCES.json","libobs/cmake/rust-exports.d/obs-core-type_catalog_enum.txt","libobs/cmake/rust-exports.d/obs-core-video_level_queries.txt","libobs/cmake/rust-exports.d/obs-hotkey-unregister_entry.txt","libobs/cmake/rust-hidden.d/obs-core-video_level_queries.txt","libobs/cmake/rust-hidden.d/obs-hotkey-unregister_entry.txt","libobs/graphics/graphics-ffmpeg.c.h","libobs/graphics/graphics-image-max-size.c.h","libobs/graphics/graphics-texture-file-data-adapter.c.h","libobs/graphics/graphics-texture-file-data-convert.c.h","libobs/graphics/graphics.c.h","libobs/obs-hotkey-unregister-entry-fields.c.h","libobs/obs-type-catalog-enum-fields.c.h","libobs/obs-video-level-queries-fields.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_type_catalog_enum_swap_is_registered.rs","rust/obs-build/tests/native/registration/headless_characterizations_expected.json","rust/obs-build/tests/native/registration/portal_output_expected.json","rust/obs-build/tests/native/registration/rust-static/cases/core-relinked/test_video_level_queries.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_unregister_entry.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json","rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json","rust/obs-build/tests/native/registration/rust_static_entries.rs","rust/obs-c-oracle/oracle.d/hotkey_unregister_entry.list","rust/obs-c-oracle/oracle/hotkey_unregister_entry.c","rust/obs-c-oracle/oracle/hotkey_unregister_entry_links.c","rust/obs-c-oracle/oracle/source_deinterlace_links.c","rust/obs-c-oracle/oracle/type_catalog_enum.c","rust/obs-c-oracle/oracle/video_level_queries.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/type_catalog_enum.rs","rust/obs-core/src/ffi/video_level_queries.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/type_catalog_enum.rs","rust/obs-core/src/video_level_queries.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/type_catalog_enum.rs","rust/obs-core/tests/obs_core/type_catalog_enum_parity.rs","rust/obs-core/tests/obs_core/video_level_queries.rs","rust/obs-core/tests/obs_core/video_level_queries_parity.rs","rust/obs-hotkey/src/ffi/mod.rs","rust/obs-hotkey/src/ffi/unregister_entry.rs","rust/obs-hotkey/src/lib.rs","rust/obs-hotkey/src/unregister_entry.rs","rust/obs-hotkey/tests/hotkey/main.rs","rust/obs-hotkey/tests/hotkey/unregister_entry.rs","rust/obs-hotkey/tests/hotkey/unregister_entry_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_image_max_texture_size.c","test/cmocka/tests.d/test_image_max_texture_size.cmake","test/cmocka/tests.d/video_level_queries_link_support.cmake","test/cmocka/video-info-query-link-support.c"],"head":"6fecfcb5ee28b234ad1b9f2b85a3fac1e5e3567d","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.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\n compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"e7bb6e30cb71e420ac294fdcc74e9f37bd464d161d400636c8c5bf524ef9c18e","tree":"9f2cadadcadfdfb8b938e574df7c5b5b5c61fe7e"}}
zackees
force-pushed
the
port/5202-type-catalog-enum
branch
from
November 19, 2026 10:53
53a1fa7 to
543b6c9
Compare
zackees
enabled auto-merge
November 19, 2026 10:54
This was referenced Nov 19, 2026
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.
This swaps the six legacy type-catalog enumeration functions into safe obs-core logic while preserving the libobs C API and borrowed ID pointers. Each catalog retains its own registration order and count. Out-of-range indices return false without writing the output, including a NULL output on failure.
Refs #5202. The other source enumeration queries, registration paths, public headers, existing C tests and C++ WebSocket plugin are unchanged. The private C field adapters reuse #5190's existing shared demand-linked support archive and canonical wrapper instead of adding per-target consumer lists. The original six C bodies remain in a reference-only unity group. No intentional behavior differences or new Rust test executable.
RED commit a6711a2 mirrors the unchanged characterization against a todo stub; both tests failed at that stub (exit 101). GREEN commit 53a1fa7 delegates bounds and output writes to the existing source_type_enum machinery. Safe mirrors cover empty and independent catalogs, insertion order, first/last entries, num/num+1/SIZE_MAX, distinct no-write sentinels, borrowed pointer origin and NULL output only on failure. The original-C differential compares all six ABI exports with the safe core over bounded edge/random cases and checks core/registry immutability and real-header field addresses.
Rebased after #5210 onto master c037c2b. Resolved the native.rs registration conflict by retaining both update-properties and type-catalog entries in order. Verified both README entries, sorted obs-core module/FFI/test lists and registrations;
uv run ci/test_test_graph_sorted.py --fixmade no changes. The RED/GREEN patch pair is preserved; range-diff shows only rebase context changes. No swap behavior changed.Fresh validation after rebase: formatting passed; all 319 native_build tests and 1,329 obs_core tests passed. Focused Linux Tier 2 built all 64 configured *_rust targets. The seven unchanged type_catalog_enum/source_registration/source_type_enum/register_short_info/module_type_rules_steps/encoder_type_info/output_type_info fixtures passed three repeats against both C-reference OFF and hybrid ON, with identical 1,769 exported symbols. ci/windows_link_check.py passed all eight Windows MSVC Rust category links, then hybrid libobs and all 55 configured Rust cmocka fixtures on each of Windows MSVC x64 and Darwin arm64. Full SOLDR_PORCELAIN=0 ./lint passed once (471.8 s). A final merge-tree against newer master d8f5045 is clean.
The original worker's always-false core mutation failed the original-C differential with exit 101, then restoration passed; its primary clud-review was clean. This mechanical rebase leaves the swap implementation unchanged. The focused Linux replay needed the documented cached-wrapper environment repair: expose the managed soldr binary and use the writable /build Cargo target. No tracked environment/tooling files changed.
Test cost: 25 reduced-parity debug module runs, longest 0.071 s, peak RSS 21,844 KiB; no test-owned threads. Tier 4 does not apply to this non-protocol metadata swap. Native macOS/Windows runtime execution and hosted PR/queue checks remain merge-queue acceptance.
Publication: ./push replaced original head 53a1fa7 with exact force-with-lease and published signed head 543b6c9. Complete client attestation passed six-target clippy/Dylint, repository self-checks/validators, 9,162 workspace host tests (6 existing skips), workspace doctests, the 920-test utility feature configuration, and Windows GNU category linking. The final signature verifies.