Repository navigation
ci: prove Tier 2 ported objects in one Python pass - #4968
Merged
Merged
Conversation
validate.sh proves each ported C object is compiled into libobs-c-reference and kept out of hybrid libobs. It does this with a shell loop that spawns a grep per object per unity group. On the Dell (#4954) a warm build with nothing to rebuild spent 176 of its 385 s in that loop: 469 objects x 2 targets x every group file. ninja -t inputs itself takes 0.2 s per target. The new cases expect rust/tools/linux-validate/ported_proof.py: - to answer the same predicate (own object, unity group, CMake Unity batch) from lists read once; - to print the same FAIL lines; - to serve the obs-nvenc loader check too; - to be what validate.sh runs. Refs #4954
rust/tools/linux-validate/ported_proof.py holds validate.sh's "does <target> compile <source>" predicate: - Ninja lists <target>.dir/<object> among the target's inputs; or - one of its BUILD.md unity groups includes "<source>"; or - one of its CMake Unity batches includes .../<source>. It reads each target's inputs, groups and batches once and answers in memory. validate.sh runs it once for all ported objects (same FAIL lines) and for the four obs-nvenc loader checks. The shell functions are gone, so there is one implementation. Measured on the Dell's kept Tier 2 tree (#4954), 469 ported objects: - shell predicate: 139.5 s; - ported_proof.py ported: 0.8 s; - all 942 answers (libobs and libobs-c-reference per object, plus the obs-nvenc checks) are identical. That loop was 176 s of a 385 s warm build with nothing to rebuild. Refs #4954 Ci-Attestation: {"at":1794912568,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":51,"stamp":"adb811f9491dd299aa8f239d936aa64d","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912568,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":51,"stamp":"870997d9cc350b631c7485e1b4d36f0e","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912568,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":51,"stamp":"7256bfc747bbd6ffea19beedb7b07af9","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912568,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":51,"stamp":"1ac4d665740b9f29bd31084884f712ae","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"general/all/client-lint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"7fd547c8946b8c499279150df5b9a2b9","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912568,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":51,"stamp":"1e3ea477520a897012b1756fe9827e90","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"fbdfd2c91561a2f6be01b3dd8aff30f1","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"ab008a52cdf2e16898428dfde4ec5920","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"d5ee43e70f4cd476aa5eb59e7e9dfd67","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"f8864cf868e17af05e42d5a68d4d68a6","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"81739fac086f1b980b724802f41a8dea","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"e5c4f82ce65ea4a87199b61fb3de4830","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"7e4a6c2369c45a575cf26350cfc81a6f","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"6fa3a23fb0799ec8d61c2a9b99b73149","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"c5f08851394796d1d941df2d5eea9e90","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"ab5844615722ec1c459019ecc2bc25fa","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"67202185f99ce7b52789d5b07fe91d24","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912515,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"1ba31fde6126a2ce2c9070751aab1bf7192793c2a22d6f24fafedc8811853d95","lane":"client-lint","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":10,"stamp":"a75fbee572ffee042771e175a1a3530f","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Ci-Attestation: {"at":1794912843,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"82262efa32df332f01b29fb4bd3dec251c6d15d3432f6f14e385a1358ef9a84d","lane":"client-test-x86_64-unknown-linux-gnu","parents":["bb32017e2320a54945730e89dc383f434c42f40b"],"secs":275,"stamp":"b871e8f3fd4d1ae63beac6f81671f295","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2","v":1,"via":"run"} Client-Checks: {"checks":{"base":"3ea35fc19440a41d82a83791e325baaf8b36ed7f","coverage":"all-tracked-applicable-files","diff":["ci/test_tier2_ported_proof.py","rust/tools/linux-validate/ported_proof.py","rust/tools/linux-validate/validate.sh"],"head":"b00d6575fbc2c8fb1381e8776a18c129622e113a","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":"e76eb57ec81a5ee4280e85283d607ca06b06fb4e16c826eaafd0489ba923b1a2","tree":"76466e4624ca8d0fb4549aa039fae517c72e75c2"}}
zackees
marked this pull request as ready for review
November 17, 2026 10:55
zackees
enabled auto-merge
November 17, 2026 10:55
auto-merge was automatically disabled
November 17, 2026 12:44
Pull request was closed
zackees
enabled auto-merge
November 17, 2026 12:44
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.
validate.sh's ported-object proof drops from 139.5 s to 0.8 s, and its answers are unchanged. Refs #4954.
Why
libobs-c-referenceand kept out of hybridlibobs.grepper object per unity group, so each build spent minutes spawning processes.IDENTICAL (1768 symbols)anddecklink.so imports.ninja -t inputsitself takes 0.2 s per target.Change
rust/tools/linux-validate/ported_proof.pynow holds the predicate. A target compiles a source when any of these holds:<target>.dir/<object>among the target's inputs;"<source>";…/<source>.It reads each target's lists once and answers in memory. validate.sh runs it once for all ported objects, printing the same
FAIL:lines, and for the four obs-nvenc loader checks. The shell functions are removed, so there is one implementation.Evidence
Parity, on the Dell's real kept Tier 2 tree with the 469 ported objects:
ported_proof.py porteddiffempty; 471 true in both)The 942 answers are libobs and libobs-c-reference per object, plus the obs-nvenc checks.
RED:
ci/test_tier2_ported_proof.py(12 cases, with a fake build tree and a stubninja) fails with 11 failures and 1 error before the module exists.GREEN:
test_tier2_native,test_tier2_build_setupandtest_tier2_build_errorspass../lintpasses.