Skip to content

libobs: characterize and extract core type-catalog enumeration (Refs #5170) - #5201

Merged
zackees merged 4 commits into
masterfrom
test/5170-type-catalog-enum
Nov 19, 2026
Merged

zackees merged 4 commits into
masterfrom
test/5170-type-catalog-enum

Conversation

@zackees

@zackees zackees commented Nov 19, 2026

Copy link
Copy Markdown
Member

Refs #5170.

The six legacy core type catalogs still share obs.c.h, preventing an independent whole-file Rust swap. This prerequisite adds a C characterization and moves exactly obs_enum_input_types, obs_enum_filter_types, obs_enum_transition_types, obs_enum_output_types, obs_enum_encoder_types and obs_enum_service_types verbatim into obs-type-catalog-enum.c.h in the existing sorted core unity group. Signatures, array reads, bounds and borrowed-ID behavior are unchanged. The existing source-set and core-module ownership already cover that group.

The new fixture checks empty catalogs at the established startup log seam, distinct untouched sentinels and NULL outputs on failure, num/num+1/SIZE_MAX, independent catalog counts, insertion order and stable borrowed pointers. It registers its own types and measures initial counts, so it does not assume which modules a CMake or Cargo-native reference library registered. Existing C tests, public headers and the WebSocket plugin remain unchanged.

RED commit 722f49b records the missing extraction seam: the contract fails because obs-type-catalog-enum.c.h is absent. The characterization is first validated against the original C bodies before extraction. After correcting a missing required transition callback in the new fixture (71ca138), the original C baseline passes against both libraries. Extraction commit 9b7bb92 makes the six-body verbatim/inventory contract GREEN; a572cc2 additionally pins caller versus source-owned ID pointers.

This is C-only characterization and extraction. Rust Tier 1 and Tier 3 differential/mutation coverage belong to the separately filed follow-up swap. Tier 4 does not apply to these non-protocol catalog readers. Native macOS/Windows runtime and the complete cmocka suite remain for merge-queue validation.

Whole native_build:: validation passed all 314 tests. Focused Linux Tier 2 rebuilt both libraries and passed the new characterization plus six unchanged caller tests and two unrelated Rust-static targets (test_async_conversion_plan_rust and test_deinterlace_pacing_steps_rust), three repeats per target per library, with identical 1,769-symbol exports. The first GREEN attempt hit XOpenDisplay failure in unchanged test_encoder_type_info setup; the final rerun using Xvfb -noreset passed every selected test. Windows MSVC workspace test linking passed. The one-reviewer local review is clean.

Prepublication merge-tree checks use forced fetches of every open PR touching the three shared append points, deleting the temporary refs afterwards. Publication was held when queued #5191 conflicted while remaining clean against master. After #5180 merged, this branch rebased cleanly; all four patches are unchanged by range-diff. The refreshed merge-tree shows #5191 now conflicts with master too, so the assignment's DIRTY exception applies. At final publication #5191 is DIRTY and no longer queued. The existing master conflicts with #4124, #4655 and #5061 are also noted. #5196 and the other fetched heads merge cleanly with this branch.

Full SOLDR_PORCELAIN=0 ./lint passed once (198.0 seconds). No new Rust test executable or Rust test cases were added. Native macOS/Windows runtime remains unverified locally; the merge queue owns that execution.

After rebasing onto master 91b0cdf, the focused nine-target Linux Tier 2 matrix passed again (three repeats against each library, identical 1,769 exports), and the extraction/inventory contract remains GREEN. The push runs fresh complete client proofs on this rebased head.

The final push passed complete six-target Clippy/Dylint (client-lint, 815.3 seconds), repository validators/self-tests, 9,130 host tests with six skipped, 920 feature tests, doctests, and Windows GNU test linking (client-test, 816.2 seconds). Final head a572cc2 is signed and GitHub reports its signature valid. Optional Swift proof was unavailable because swift-format is absent; this PR changes no Swift files. Master advanced only through the unrelated #5195 CI change during these proofs; final merge-tree checks against current master and all matching open PR heads passed the publication rule.

Record missing-extraction RED: the six catalog readers still live in obs.c.h; build_ci_audit/5170/contract.py fails because obs-type-catalog-enum.c.h does not exist. New test registers only test-owned types and preserves all existing C tests.
The original C rejects a transition without audio_render. With the required unused callback, nine focused targets pass three repeats against both original-C-reference and hybrid libobs; 1769 exported symbols agree.
Move only the six index-to-ID catalog readers into the existing sorted core unity group. Existing source-set and module membership covers the extracted implementation. The extraction/inventory contract is now GREEN.
…efs #5170)

Ci-Attestation: {"at":1795067244,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":181,"stamp":"c3ab5f6e0f90447bf18b54816636ba76","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067244,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":181,"stamp":"1384b61b95aa73e26f332a14da2286af","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067244,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":181,"stamp":"37868e093c846fb5734ff086dc152e12","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067244,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":181,"stamp":"db61fd5383bc5605b8e68578f721f468","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067060,"gate":"general/all/client-lint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"923bdc347caaacd2221d6b5fc1b163c2","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067244,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":181,"stamp":"ba2107fb49c7548f2223d6be7e2a36bc","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"eaf67cd74d87bed03df87f124e8c5b6c","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"267aae2e6d77f5150b06107c8a4a276b","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"f157496b021f45f694f0fc2e8743c2fc","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"b30b30d0c447dbbdf4d914b1dd262644","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"40f7d04bcb7d3cb961af730c51922937","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"dc5c3d1cde463f99be5e9ec6b31f988b","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"5e96818f956d3834ad10d9380f7f6df8","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"2084ba3529b6ab5a76fce4df5aa8ecca","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"e71ccb8bad574594c68d258fe3289e8c","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"4499e45768fb3f030de005a1167950e1","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067060,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"79a665db453ed776ad89ce5f9f0916ed","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795067061,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1af45ac14bec91eb989805fb6aacac42d8e01803f324466a27ee650400dd4ec6","lane":"client-lint","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":815,"stamp":"b0b2552caf283b53d2838c3937e7b212","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}
Ci-Attestation: {"at":1795068061,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"d8df5b44e9b83173042a0e0cf17d8d2a57025fb5fd64e5423bd2fe3d710c9148","lane":"client-test-x86_64-unknown-linux-gnu","parents":["9b7bb92a109c9145ddc0bd46fc1a56366e171dbd"],"secs":816,"stamp":"19c1be5cbc1b9e22ed58cdc105a10adc","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"91b0cdf8785961f0ba0e825858d0a6a3a18780c6","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core+.h.c","libobs/obs-type-catalog-enum.c.h","libobs/obs.c.h","test/cmocka/build/test-graph.json","test/cmocka/test_type_catalog_enum.c","test/cmocka/tests.d/test_type_catalog_enum.cmake"],"head":"bae6db805def2efca1ae951548b5e3394ca84cd5","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":"4400e84b26e75b0543f00d0b5fcf930bcd11630a299ea2314efc166c702004d0","tree":"ab237533ea9a99ac0bb397bd5835da6ae0864794"}}
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees enabled auto-merge November 19, 2026 06:03
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 19, 2026
@zackees
zackees added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit 8d32f4c Nov 19, 2026
41 checks passed
@zackees
zackees deleted the test/5170-type-catalog-enum branch November 19, 2026 06:53
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