Skip to content

infra: discover independent native test registrations (Refs #3973) - #4655

Merged
zackees merged 10 commits into
masterfrom
infra/3973-graph-fragments-slot10
Dec 4, 2026
Merged

zackees merged 10 commits into
masterfrom
infra/3973-graph-fragments-slot10

Conversation

@zackees

@zackees zackees commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Independent native test registrations currently edit one shared graph and module list, causing unrelated ports to conflict. Split the canonical graph into one deterministically assembled file per target and discover native registration modules in sorted order. CMake, Rust, Python, sanitizer readers and owner stubs consume the fragments together.

Refs #3973.

RED: original ce2dcc9a1 (rebased cb249b4) fails directory assembly/discovery against the old implementation. GREEN: original 2cc7871d8 (rebased dff134c) implements the migration. The subsequent sanitizer regression b2b2959 and focused import/path/declaration repair preserve the existing import, sys.path and shared-file guards.

Proof against freshly fetched master 2cdc676: retained its exact monolithic JSON as an absolute local audit input. Fresh Python and CMake assembly equal that document in every field and ordered array: 813 targets and 823 tests, preserving dependencies, generated/configured/watch inputs and host conditions. Audited all 773 current tests.d files: unchanged except the mechanical canonical-path substitution where applicable. All 164 explicitly registered native modules remain discovered; the previously dormant locale contract is also discovered. All 276 registration test function multiplicities and both host/feature gates remain intact. Rebase range-diff preserves all four patches exactly.

Validation: the complete native_build category passes, 279 tests, zero failures, 28.20 s execution, using ABSOLUTE OBS_GRAPH_BASELINE captured from that master. This includes six host families with optional registrations both off/on and complete typed/raw graph equality. Fresh independent Git additions combine cleanly via merge-tree. Real Ninja reconfiguration observes fragment addition, content edit and removal. Real Cargo discovery observes module addition, test rename and removal without a shared declaration edit (315 -> 316 -> 316 -> 315 discovered tests).

Test cost: eight graph-host module cases passed 20 reduced-parity debug runs; longest complete module execution 0.70 s, peak measured command-process-tree RSS 48,052 KiB (includes soldr/Cargo, a conservative bound), no own threads in the three new contracts. Command wall time peaks at 6.84 s including tool/build startup. Initial test discovery takes 4.06 s including Cargo startup; add/edit/remove rediscovery includes recompilation (5.54/9.41/9.65 s).

Full lint: exactly one final serial run, SOLDR_PORCELAIN=0, 1,800-second deadline, actual exit 0; final footer == lane lint: ok (230.7s). The original migration left the installed-libobs scan shallow; the focused follow-up below restores coverage of relocated helpers. Local full log: local-test-FUvJVK.log; native category log: local-test-FNU4gu.log.

Limits: no broad workspace runtime suite, full C-reference/hybrid Tier 2 or export-parity run, feature-gated libobs runtime suite, native Windows/macOS execution, packaged application run or hosted CI pass is claimed. The host matrix proves graph selection, not native platform execution. Rust native-graph Cargo invalidation was reviewed statically; live invalidation was exercised for CMake fragments and Cargo module discovery. No C implementation, existing C test, public header, WebSocket plugin, workflow or settings change is included. This PR does not close the issue; hosted checks remain required and queue admission depends on a fresh open backpressure gate.

Focused review repair (coordinator admission remains held): RED c2cc103 adds a nested support/deeper helper regression retaining all three forbidden forms. The shallow scanner returns no offenders (exit 101). GREEN 081dad453 recursively walks sorted directory entries and scans regular Rust files, retaining the package, CMake import and CORE_LIBDIR checks with full diagnostic paths. It does not follow symlinks. Guard implementation and fixture strings remain in native.rs, outside registration/. The regression also validates a clean nested helper and deterministic diagnostics.

Fresh focused guard run: 2 passed, exit 0, 0.01 s. Fresh full native_build: 280 passed, zero failures, 36 other Application cases filtered, exit 0, 26.48 s. This includes registration discovery and all twelve host graph comparisons using the absolute retained baseline, verified byte-identical to both original test base 2cdc676 and current master 5422590. Audit confirms all 39 support helpers are regular Rust files reachable by the recursive walk, and all 813 targets / 823 tests and registration files remain unchanged by this repair. New deterministic regression starts no own threads; full module cost above is not an isolated RSS measurement of this case.

Repair full lint: exactly one serial SOLDR_PORCELAIN=0 ./lint, deadline 1,800 seconds, actual exit 0, final footer == lane lint: ok (223.9s) (local-test-3B34xY.log). Focused RED log local-test-nNJNZ4.log; GREEN local-test-aFhQeU.log; full native category local-test-CnEb5j.log. The focused fix requires independent updated-head review and all hosted checks before coordinator admission; auto-merge remains off. This local proof does not claim a complete review of the migration PR or a hosted CI pass.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Restore installed-libobs guard coverage for relocated helpers before admission. At 324cbe9, graph_runtimes_never_link_an_installed_libobs in rust/obs-build/tests/native.rs:225-245 scans only immediate registration files and skips directories. Moving 39 runtime helpers into registration/support/ therefore leaves them outside its forbidden package/import/CORE_LIBDIR checks. Please recurse through the registration Rust source tree, preserve all existing forbidden-pattern assertions and add a focused nested-helper regression. This is lost enforcement coverage, not evidence that current helpers actually link an installed library. Independent static/semantic review otherwise confirmed exact 813-target/823-test preservation, owner-stub transforms, module/gate retention and the earlier three lint repairs. No builds/tests were run by this reviewer; hosted checks were pending in the review snapshot. Coordinator admission is held for this focused repair.

@vpacher

vpacher commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Coordinator note: two things keep this PR out of the queue.

  1. Windows Rust Tests fail in the test that d84f8de adds. native_build::installed_libobs_guard_checks_nested_rust_helpers (rust/obs-build/tests/native.rs:290) compares paths with different separators. The guard reports ...\\support\\deeper\\a.rs, but the expected value is built as ...\\support/deeper\\a.rs (job log). Build the expected path with Path::join for each component, or normalize both sides before the compare. Linux and macOS pass, so this is the only real failure.
  2. The branch conflicts with master (DIRTY) in code, not in a list. ci/local_gate.py has a content conflict, and test/cmocka/build/test-graph.json is deleted here but master has changed it since. Which side wins depends on the design of this PR, so the coordinator leaves the rebase to you.

Push the fix and the rebase together. The coordinator queues the PR when CI is green.

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: clud agent exited 1: obs-filters/rnnoise/src/rnn_data.c (415 kB)
frontend/settings/OBSBasicSettings.cpp.hpp (218 kB)
rust/obs-build/tests/native.rs (218 kB)
rust/obs-build/tests/native.rs (218 kB)
(102 more)
error: claude not found on PATH. Install Claude Code with: curl -fsSL https://claude.ai/install.sh | bash

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: clud agent exited 1: e HEAD test/cmocka/build/ | head; echo ---; ls test/cmocka/build/test-graph.d | wc -l; echo ---; git ...
[tool] Bash: 56 output lines
[error] API Error: 402 This request would exceed your available credits given your current in-flight requests. Retry after in...
[error] 25 tool calls, 1 edit; failed

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 98 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

1 similar comment
@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 98 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 86 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 98 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

1 similar comment
@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 98 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 86 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

@obs-rust-ai-rebase

Copy link
Copy Markdown

ai-rebase (~deepseek/deepseek-flash-latest): refused: rust/obs-build/tests/native.rs: 98 added lines dropped, e.g. '#[path = "native/registration/canonical_canvas_clear_mix_swap_is_registered.rs"]'

@obs-rust-ai-rebase

obs-rust-ai-rebase Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

ai-rebase: skipped skipped: worker active

@zackees
zackees force-pushed the infra/3973-graph-fragments-slot10 branch from ede5771 to d5ff85b Compare December 3, 2026 19:06
@zackees
zackees enabled auto-merge December 3, 2026 19:07
@zackees
zackees added this pull request to the merge queue Dec 3, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Dec 3, 2026
@zackees
zackees force-pushed the infra/3973-graph-fragments-slot10 branch from 9346902 to f377bc3 Compare December 4, 2026 07:45
@zackees
zackees enabled auto-merge December 4, 2026 07:46
@zackees
zackees added this pull request to the merge queue Dec 4, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to In merge queue in obs-rust Multiview Dec 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Dec 4, 2026
@zackees
zackees enabled auto-merge December 4, 2026 10:49
Refs #3973. Directory loading fails; CMake assembly is absent; discovery stub emits no modules.
Refs #3973. Replace the shared inventory and explicit module append list. Preserve all 813 targets and 823 tests exactly, including ordered sources, dependencies, conditions and generated inputs. Migrate CMake, Cargo, sanitizer tooling, contracts and contributor guidance together. Publication remains held by the coordinator.
Independent native test registrations currently edit one shared graph and module list, causing unrelated ports to conflict. Split the canonical graph into one deterministically assembled file per target and discover native registration modules in sorted order. CMake, Rust, Python, sanitizer readers and owner stubs consume the fragments together.

Refs #3973.

RED: original ce2dcc9a1 (rebased cb249b4) fails directory assembly/discovery against the old implementation. GREEN: original 2cc7871d8 (rebased dff134c) implements the migration. The subsequent sanitizer regression b2b2959 and focused import/path/declaration repair preserve the existing import, sys.path and shared-file guards.

Proof against freshly fetched master 2cdc676: retained its exact monolithic JSON as an absolute local audit input. Fresh Python and CMake assembly equal that document in every field and ordered array: 813 targets and 823 tests, preserving dependencies, generated/configured/watch inputs and host conditions. Audited all 773 current tests.d files: unchanged except the mechanical canonical-path substitution where applicable. All 164 explicitly registered native modules remain discovered; the previously dormant locale contract is also discovered. All 276 registration test function multiplicities and both host/feature gates remain intact. Rebase range-diff preserves all four patches exactly.

Validation: the complete native_build category passes, 279 tests, zero failures, 28.20 s execution, using ABSOLUTE OBS_GRAPH_BASELINE captured from that master. This includes six host families with optional registrations both off/on and complete typed/raw graph equality. Fresh independent Git additions combine cleanly via merge-tree. Real Ninja reconfiguration observes fragment addition, content edit and removal. Real Cargo discovery observes module addition, test rename and removal without a shared declaration edit (315 -> 316 -> 316 -> 315 discovered tests).

Test cost: eight graph-host module cases passed 20 reduced-parity debug runs; longest complete module execution 0.70 s, peak measured command-process-tree RSS 48,052 KiB (includes soldr/Cargo, a conservative bound), no own threads in the three new contracts. Command wall time peaks at 6.84 s including tool/build startup. Initial test discovery takes 4.06 s including Cargo startup; add/edit/remove rediscovery includes recompilation (5.54/9.41/9.65 s).

Full lint: exactly one final serial run, SOLDR_PORCELAIN=0, 1,800-second deadline, actual exit 0; final footer `== lane lint: ok (230.7s)`. All guards remain intact. Local full log: local-test-FUvJVK.log; native category log: local-test-FNU4gu.log.

Limits: no broad workspace runtime suite, full C-reference/hybrid Tier 2 or export-parity run, feature-gated libobs runtime suite, native Windows/macOS execution, packaged application run or hosted CI pass is claimed. The host matrix proves graph selection, not native platform execution. Rust native-graph Cargo invalidation was reviewed statically; live invalidation was exercised for CMake fragments and Cargo module discovery. No C implementation, existing C test, public header, WebSocket plugin, workflow or settings change is included. This PR does not close the issue; hosted checks remain required and queue admission depends on a fresh open backpressure gate.
Ci-Attestation: {"at":1794367832,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["b2b2959d9a6d81628c4e38eee383990c164c488e"],"secs":179,"stamp":"e4a0a14501d626bfde85fce64d4d3432","tree":"82cb57144fd5781c154a8b02902368447898ce5e","v":1,"via":"run"}
Ci-Attestation: {"at":1794367832,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["b2b2959d9a6d81628c4e38eee383990c164c488e"],"secs":179,"stamp":"45a18c262795200eb828b1aa839271d4","tree":"82cb57144fd5781c154a8b02902368447898ce5e","v":1,"via":"run"}
Ci-Attestation: {"at":1794367832,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["b2b2959d9a6d81628c4e38eee383990c164c488e"],"secs":179,"stamp":"a3da8fb3b62c73fd2cdbf4f3bc2cca2d","tree":"82cb57144fd5781c154a8b02902368447898ce5e","v":1,"via":"run"}
…s (Refs #3973)

Ci-Attestation: {"at":1794369105,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["c2cc10310a219513824ad52ad2bcbfab705f46ea"],"secs":143,"stamp":"933d1455bbc026c0a7a87e90e3281041","tree":"d90fcee4d8638d568a508a04a829f977732018c2","v":1,"via":"run"}
Ci-Attestation: {"at":1794369105,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["c2cc10310a219513824ad52ad2bcbfab705f46ea"],"secs":143,"stamp":"52d862f75e1f238b55bbe798396de64e","tree":"d90fcee4d8638d568a508a04a829f977732018c2","v":1,"via":"run"}
Ci-Attestation: {"at":1794369105,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["c2cc10310a219513824ad52ad2bcbfab705f46ea"],"secs":143,"stamp":"28bc6180ba699ae6188d8a47d20581e5","tree":"d90fcee4d8638d568a508a04a829f977732018c2","v":1,"via":"run"}
… to test-graph.d (Refs #3973)

Ci-Attestation: {"at":1796370345,"gate":"general/all/client-lint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"bd0434570a7d65c3abc9eb45678990cb","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370346,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"fbdd3b243adec8814f66cc519ec9e1ab","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370346,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"1a0d60ece47c7d564bad7e0203ac7455","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"f7593ab73e19835ba3684a97cfa8b51b","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"c3ba6bc7f7d63afe4af1034ca4b8f46d","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"699e43003ccae1ff08b7fceae4db6c1e","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"25d91c7475305a93a0bdae1d2432cb5d","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"4a303604df14d339b6dbc544e280a31b","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370346,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"f02f98784965e1cd9ed672055107824a","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"6b1bc2c159d4afbe51ce0e5f46e67a40","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"8b169dccbb06bdde431af8d3c504d8ab","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"edebc5e220e470ca7a6146411ed10c3d","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
Ci-Attestation: {"at":1796370345,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"e8463982629e6fa0abaffc329c0e0df66ec0cb4676e3dfc26734ae705378f75a","lane":"client-lint","parents":["c3e7e665b4bb43ce50592ca1957c8187cea4dbd9"],"secs":221,"stamp":"a96159657cfc708eee3b6f87beeba209","tree":"1db225851de95642dad5af22dca8258b2298d490","v":1,"via":"run"}
@zackees
zackees force-pushed the infra/3973-graph-fragments-slot10 branch from f377bc3 to 6837037 Compare December 4, 2026 11:49
@zackees

zackees commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Coordinator: rebased onto master. The only conflict was rust/obs-build/tests/native.rs: master had appended more native/registration/* modules to the explicit list this PR replaces with the generated include!. I kept the PR side; the non-registration modules are identical on both sides. soldr cargo test -p obs-studio-rust --test obs-tests-app --no-run builds. Auto-merge is still on.

@zackees
zackees added this pull request to the merge queue Dec 4, 2026
Merged via the queue into master with commit 2a9bc33 Dec 4, 2026
51 checks passed
@zackees
zackees deleted the infra/3973-graph-fragments-slot10 branch December 4, 2026 12:37
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In merge queue to Done in obs-rust Multiview Dec 4, 2026
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.

2 participants