Skip to content

obs-source: port obs_source_copy_filters and obs_source_copy_single_filter to Rust (Fixes #5792) - #5794

Merged
rdoupe merged 5 commits into
masterfrom
port/5792-copy-filters
Nov 26, 2026
Merged

rdoupe merged 5 commits into
masterfrom
port/5792-copy-filters

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5792.

Ports obs_source_copy_filters() and obs_source_copy_single_filter() to obs-source, together with duplicate_filters(). obs_source_duplicate() still calls that helper, now through the hidden obs_source_duplicate_filters(). get_new_filter_name(), filter_compatible(), obs_source_duplicate(), obs_source_filter_add(), the lock and the references stay C. The Rust core reaches them through hidden, non-EXPORT adapters in libobs/obs-source-copy-filters-fields.c.h, in the live core-source group. The extracted C builds in the reference group libobs.ported-source-copy-filters for Tier 3.

The four commits, in order:

  1. Extract (libobs: extract … verbatim): both entries and their helpers move unchanged into libobs/obs-source-copy-filters.c.h. No behavior change.
  2. Characterize (test: characterize …): new cmocka test test_source_copy_filters, run through the real core against both hybrid libobs and the C reference. It covers:
    • NULL arguments: one log line, destination checked first.
    • Order and names: the copies go in front of the destination's own filters, in the source's order, each named with the next free number.
    • Settings and enabled state are copied, and the copies are always private.
    • Edge cases: a source with no filters, a copy onto itself, an incompatible filter, and a single copy that leaves the original in place.
  3. RED (test: RED … safe core): Tier 1 mirrors over a todo!() core.
  4. GREEN: the swap and the Tier 3 differential.

No public-header, existing-C-test, WebSocket or workflow edits. Tier 4 does not apply. No user-visible change.

RED

soldr cargo test -p obs-data --test obs-tests-core -- source::copy_filters::
test result: FAILED. 0 passed; 8 failed
panicked at rust/obs-source/src/copy_filters.rs:96:5: not yet implemented: #5792

GREEN

Tier 1 and Tier 3, on the pushed head:

soldr cargo test -p obs-data --test obs-tests-core -- source::copy_filters
test result: ok. 14 passed; 0 failed
  • What Tier 3 compares: copy_filters_parity, with oracle/source_copy_filters.c, runs the original C and the Rust exports on noise-filled sources built from the real headers. It records every libobs call in order, with its arguments and the lock state at that call. It then compares those calls, every fixture byte, the lock afterwards and the log line.
  • What Tier 3 covers: 4608 fixed cases plus a proptest. The cases cover every filter count up to 7, both private flags, every NULL argument pair, and failing references, disabled filters, incompatible filters and failing duplicates.
  • Mutants: Tier 3 rejects two mutants, a first-to-last copy and a missing compatibility check.
  • Mutation check: dropping the last-to-first order in the core fails 4 Tier 1 and 3 Tier 3 tests.

Tier 2, the C tests run unchanged against both libraries:

OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 1 --tests 'test_source_copy_filters|test_filter_clipboard|test_source_duplicate|test_scene_dup'
[OFF] (C reference)  100% tests passed, 0 tests failed out of 1125
                     repeat of the filtered set: 100% tests passed, 0 tests failed out of 8
[ON]  (hybrid)       100% tests passed, 0 tests failed out of 1125
                     repeat of the filtered set: 100% tests passed, 0 tests failed out of 8

Run directly, test_source_copy_filters shows [ PASSED ] 8 test(s) against both libraries, none skipped. The Tier 2 run was on the tree before a rebase over two unrelated commits (#5789, #5791). Tier 1/3 above was rerun after the rebase.

Registration:

soldr cargo test -p obs-studio-rust --test obs-tests-app -- canonical_source_copy_filters
1 passed

./lint passes.

🤖 Generated with Claude Code

rdoupe and others added 4 commits November 26, 2026 17:13
…lter verbatim (Refs #5792)

Move obs_source_copy_filters() and obs_source_copy_single_filter() with
duplicate_filters() and duplicate_filter() unchanged out of obs-source.c.h
into obs-source-copy-filters.c.h, still compiled in the live core-source
group. duplicate_filters() keeps its body and becomes the hidden
obs_source_duplicate_filters(), which obs_source_duplicate() calls as
before. get_new_filter_name() and filter_compatible() stay in
obs-source.c.h; they lose their `static` and obs-internal.h declares them,
because the new file comes before obs-source.c.h in the unity group.
Hidden visibility keeps all three out of the exported symbols. No Rust, no
behavior change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_filter (Refs #5792)

New cmocka test through the real core (xvfb-run, skips without a display),
against hybrid libobs and the C reference: a NULL destination, source or
filter logs the validity check's line once (the destination first) and
copies nothing. obs_source_copy_filters() puts copies of every filter in
front of the destination's own, in the source's order, each with the
filter's settings and enabled state, named with the next free number
("b 3" when "b" and "b 2" are taken), and private whatever the destination
(libobs creates every filter private); a source without filters copies
nothing, a copy onto itself copies the filters it had once, and a filter
the destination can't take is refused by obs_source_filter_add().
obs_source_copy_single_filter() copies one filter the same way, only when
it is compatible, and leaves the original on its source. The listings
read from the last filter added to the first, as obs_source_enum_filters()
walks them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…afe core (Refs #5792)

New obs-source module copy_filters with todo!() cores (copy_filters,
duplicate_filters, copy_single_filter) over a FilterCopy trait, and Tier 1
mirrors of test_source_copy_filters.c on a model that records every call:
the NULL lines (destination first), the snapshot under filter_mutex (the
count read before each entry, a reference to each, a dying filter
skipped), then after the unlock each filter copied from the last (name,
enabled read, duplicate private as the destination or the caller says,
enabled set, name freed, add, both releases), a failed duplicate passed on
as NULL, and the single copy: compatible check first, always private, no
lock and no reference on the filter.

    soldr cargo test -p obs-data --test obs-tests-core -- source::copy_filters::
    test result: FAILED. 0 passed; 8 failed
    panicked at rust/obs-source/src/copy_filters.rs:96:5: not yet implemented: #5792

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ilter to Rust (Fixes #5792)

obs_source_copy_filters(), obs_source_copy_single_filter() and
duplicate_filters() (the hidden obs_source_duplicate_filters() that
obs_source_duplicate() calls) move to obs-source's copy_filters module. A
NULL destination, source or filter logs one LOG_DEBUG line (the
destination first) and does nothing. The filter copy takes a reference to
each of the source's filters under its filter_mutex (the count read before
each entry, a filter whose reference fails skipped), then after the unlock
copies them from the last to the first: a free name, the enabled state,
the duplicate (private as the destination is, or as obs_source_duplicate()
says), the copy's enabled state, the name freed, the add, the copy and the
reference released; a failed duplicate goes through the same calls as
NULL. The single copy checks filter_compatible() first and copies once,
always private, with no lock and no reference on the filter.

The shims reject NULL before calling the adapters of
obs-source-copy-filters-fields.c.h (live core-source group, no EXPORT):
the private flag, lock, count, entry, reference, unlock, compatibility,
name, enabled state, duplicate, enabled setter, bfree(), add and release.
get_new_filter_name() and filter_compatible() stay in obs-source.c.h. The
extracted C builds in the reference group libobs.ported-source-copy-filters.

Tier 3 (copy_filters_parity, oracle/source_copy_filters.c) runs the
original C and the Rust exports on noise-filled real-header sources, with
recording stand-ins for every libobs call they make, over every count up
to 7, private flag, argument pair and pattern of failing references,
disabled, incompatible and failing duplicates (4608 cases) and a proptest,
comparing every call in order with its arguments and the lock state at it,
every fixture byte, the lock afterwards and the log line; it rejects two
mutants (first-to-last copy, no compatibility check). Mutation check:
dropping the last-to-first order in the core fails Tier 1 and Tier 3
(reverted).

    soldr cargo test -p obs-data --test obs-tests-core -- source::copy_filters
    test result: ok. 14 passed; 0 failed

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1795731554,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":95,"stamp":"12af1896250e9c4e21dd70dc010bebe8","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731554,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":95,"stamp":"b41557baaa1cbba3c7b5d9bc853b12ab","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731554,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":95,"stamp":"bb73e9ea3acb51b90cae3d517bff8f50","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731554,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":95,"stamp":"c7bed4705cf0ccb8699a5d9138b6807a","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731457,"gate":"general/all/client-lint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"05eeaa297f0c16a0566442c444884a72","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731554,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":95,"stamp":"4fd91eb344d90e9888641dae43081fac","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"c2ac5f5550b2487da9648964e7dd2db0","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"1f2f086b2e43b6a9b27afd5086b70580","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"72ddaf1934dac0e42c19aee5f04928cf","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"7660a341bb90b768dd6061ba5be31d15","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"e7247b3b263d67fb6387f52beba89e94","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"f044209241b4f2c4bacb992b7a51875e","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"8e93cc743ab457446d07a5f169fbb036","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"1407259e890b09d8bede4f5dbd71d222","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"0479d089fa85562ff8db71f0d48f6ff8","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"939ad84ab247e6552a601e377fdfc0dd","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"91490b2200772a4a588523a15cf899ba","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731458,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"9f1edea136221f6039140d6caee89bcde479f94f0a6ba160a80dcbc7d0e6d7cd","lane":"client-lint","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":131,"stamp":"8da6ebcf2f879e6a1b1978cf473dd610","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}
Ci-Attestation: {"at":1795731818,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"2f20608f805f0545827819d4afe7cbc3650f1925f3dfdd65cd468169fd546476","lane":"client-test-x86_64-unknown-linux-gnu","parents":["b94e2cacbc39619863338ff4141a38c3edcde820"],"secs":263,"stamp":"1c24882cb7f85b7b80146f7287a6ad91","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"0ce0eb4f10e9ae4e2d80d53b21ee8758be84ea37","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-copy-filters+.h.c","libobs/build/ported-source-sets/source-copy-filters.json","libobs/cmake/rust-exports.d/obs-source-source_copy_filters.txt","libobs/cmake/rust-hidden.d/obs-source-source_copy_filters.txt","libobs/obs-internal.h","libobs/obs-source-copy-filters-fields.c.h","libobs/obs-source-copy-filters.c.h","libobs/obs-source-duplicate.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_copy_filters_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-copy-filters.list","rust/obs-c-oracle/oracle/source_copy_filters.c","rust/obs-source/Cargo.toml","rust/obs-source/src/copy_filters.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_copy_filters.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/source/copy_filters.rs","rust/obs-source/tests/source/copy_filters_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_copy_filters.c","test/cmocka/tests.d/test_source_copy_filters.cmake"],"head":"54246c68d17aafeadc0fae16e6356bc04507a6f2","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":"8bc56d779ca6d8980c9ec0a4ac4912452b0f3ca5955dd5fd646f78749c87d9e2","tree":"37073c5a6c238f62ca95d318e5680d92d532ed91"}}
@rdoupe
rdoupe requested a review from zackees as a code owner November 26, 2026 22:24
@rdoupe
rdoupe enabled auto-merge November 26, 2026 22:25
)

The copy-filters oracle tags each name by the first matching pointer in
the list of every name allocated so far. When the heap hands a freed
name's address to the next name, as the Windows CRT did in PR CI, the C
run matched the stale entry and the Rust run did not, so the parity
test failed on Windows only. Search newest first: the live name is the
latest allocation at that address. Keep the failing seed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ci-Attestation: {"at":1795733013,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":93,"stamp":"6776e4750ca72087c829d024bc6d4d1b","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795733013,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":93,"stamp":"f668f5e72959f350f825d409e60e8f29","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795733013,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":93,"stamp":"49c3136c52a2c971ee9689ba48de0e9c","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795733013,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":93,"stamp":"e02d9d02ead7855ccbb2956e86230f22","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"general/all/client-lint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"b0948af224b571790fec21536144e178","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795733013,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":93,"stamp":"5c074d79253aa946f466adab6ac65404","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"a4e4c2aa924669cc1379a7aae91a9126","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"012c3e7e234ce6ab1eb4524c3d0a3e54","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"75db8c0ca94e3e88070d4266b5934481","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"152a9dea6bd48cb5c38049c844e488ef","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"f8faef2a946ba898e6f67e94b37595ae","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"fcfd767f85d31fa13c12cae3ad47c34e","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"3c660ac46f33360d6dea913a0161d1fe","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"18474e1fe31e4ae94b41c808a5357210","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"419c5723afe297d10394cc747325ab57","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"9c5d764e02dd63b77aa814ad46568495","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"d336926de8abfbc60f3d0da19fa09641","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795732919,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"96f9c6d36ff0a48d826c59e6aaa283f0a3f5e2b55a3c03b848cc4ff2c37c98de","lane":"client-lint","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":64,"stamp":"9dea438c27769730719ccb9aaa6513df","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}
Ci-Attestation: {"at":1795733199,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"fef8bab3e8642ab2c830d8e3c2bd1ba60c9b521eb60e77d47fcd6c0f3d2e7088","lane":"client-test-x86_64-unknown-linux-gnu","parents":["79b362757fbef8ae54978f28274e67f9b3de5ae0"],"secs":185,"stamp":"b77e0215c49629680e6ca5778fb05585","tree":"c9b0e029435f446bfe68e57c786d066bf101949d","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"0ce0eb4f10e9ae4e2d80d53b21ee8758be84ea37","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-copy-filters+.h.c","libobs/build/ported-source-sets/source-copy-filters.json","libobs/cmake/rust-exports.d/obs-source-source_copy_filters.txt","libobs/cmake/rust-hidden.d/obs-source-source_copy_filters.txt","libobs/obs-internal.h","libobs/obs-source-copy-filters-fields.c.h","libobs/obs-source-copy-filters.c.h","libobs/obs-source-duplicate.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_copy_filters_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-copy-filters.list","rust/obs-c-oracle/oracle/source_copy_filters.c","rust/obs-source/Cargo.toml","rust/obs-source/src/copy_filters.rs","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_copy_filters.rs","rust/obs-source/src/lib.rs","rust/obs-source/tests/proptest-regressions/copy_filters_parity.txt","rust/obs-source/tests/source/copy_filters.rs","rust/obs-source/tests/source/copy_filters_parity.rs","rust/obs-source/tests/source/main.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_copy_filters.c","test/cmocka/tests.d/test_source_copy_filters.cmake"],"head":"1ac6e7a46ec42db4e1c2873aca8525161625de91","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":"addfe16306f209481a12945a5fe76db7111328b6afc4961bfb2c19c32ef8dd18","tree":"c9b0e029435f446bfe68e57c786d066bf101949d"}}
@rdoupe

rdoupe commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

The Windows Rust Tests failure (run 45904563735) was in the oracle harness, not the port: scf_name_id() matched a name pointer to its first allocation, and on Windows the CRT handed a freed name's address to the next name, so the C run hit the stale entry (name id 0) while the Rust run got a fresh address (id 1). Both every_case_matches_c and random_cases_match_c failed only there.

Fix in 5393e5e: search newest first, so a live name maps to its own allocation; the CI seed is kept in proptest-regressions/copy_filters_parity.txt.

Local after the fix: soldr cargo test -p obs-data --test obs-tests-core -- copy_filters → 14 passed, 0 failed. ./lint ok.

@rdoupe
rdoupe added this pull request to the merge queue Nov 26, 2026
Merged via the queue into master with commit 5e2b9df Nov 26, 2026
46 checks passed
@rdoupe
rdoupe deleted the port/5792-copy-filters branch November 26, 2026 23:46
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.

rust: Port obs_source_copy_filters and obs_source_copy_single_filter to obs-source

1 participant