Skip to content

obs-source: port obs_source_restore_filters to Rust (Fixes #5801) - #5802

Merged
vpacher merged 4 commits into
masterfrom
port/5801-restore-filters
Nov 27, 2026
Merged

vpacher merged 4 commits into
masterfrom
port/5801-restore-filters

Conversation

@rdoupe

@rdoupe rdoupe commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5801.

Rebased onto master after the obs_source_filter_remove port (#5796) and the filter-copy port (#5794) merged; the only conflict was the obs-source crate description line. Re-verified on the rebased head 6ce0fca: ./lint clean; soldr cargo test -p obs-data --test obs-tests-core -- source::restore_filters 8 passed; soldr cargo test -p obs-studio-rust --test obs-tests-app -- source_restore_filters 1 passed; Tier 2 uv run rust/tools/linux-validate/run.py --repeat 1 --tests 'test_source_restore_filters|test_source_filter_': symbols IDENTICAL (1769), 1129/1129 on both libraries, selected set 9/9.

Ports obs_source_restore_filters() to obs-source. The safe core restore_filters::restore runs over a RestoreList trait and reuses source_filter_chain's restore_matches and restore_step. The exported entry is the shim in ffi::source_restore_filters (listed in rust-exports.d); it rejects NULL before any adapter runs.

What stays C: the lock, the count and entry reads, the parent and target writes (the unlink and the relink), da_free(), the move of the new list into the source, the name read, obs_source_get_ref(), obs_load_source() / obs_load_private_source(), obs_source_release(), and the obs_data array and item calls (count, item, "name" string, release). The Rust core reaches them through hidden, non-EXPORT adapters in libobs/obs-source-restore-filters-fields.c.h, in the live core-source group. The extracted C builds in the reference group libobs.ported-source-restore-filters for Tier 3.

One note on the issue's contract: it says an unmatched item is loaded with obs_load_source(). That is the C reference. Hybrid libobs already asks obs_source_filter_chain_restore_step(), which is Rust and returns LOAD_PRIVATE (the intentional difference of #2981), so hybrid loads with obs_load_private_source(). The port keeps that: it follows restore_step, and the adapter file has both loads. The characterization doesn't check whether a load is public or private, because the two libraries differ there by design.

The four commits, in order:

  1. Extract: obs_source_restore_filters() moves unchanged into libobs/obs-source-restore-filters.c.h, still in the live core-source group. No behavior change.
  2. Characterize: new cmocka test test_source_restore_filters, through the real core against both hybrid libobs and the C reference. It covers:
    • NULL source or array: the validity line once (source checked first), logged with filter_mutex free; nothing changed.
    • Reuse: a reordered, shortened array reuses the same filters (whatever the item's id) and drops the rest. Nothing logs and no filter signal fires.
    • Load: an unmatched item is loaded while the source's list is empty, the old filters have no parent and no target, and filter_mutex is free (probed from a second thread inside the filter type's create callback).
    • Parents are set only after every target (libobs: A filter's size query can follow a NULL target during filter restore or removal #2172): while a later item loads, an earlier filter already targets its successor but has no parent yet.
    • Old filters are released once each, in old order, after the new list is in place and with the lock free (observed through a child filter's filter_remove on each old filter's destruction). A filter that isn't reused goes away.
    • Empty array: every filter dropped and unlinked.
    • Duplicate names: the same filter is listed twice and holds two list references.
    • An unnamed (NULL-name) current filter never matches. An item named "" matches nothing either, since no filter can have a blank name (libobs gives it a generated one).
    • A current filter that can't be referenced (its last reference gone) can't be reached through the real core: a listed filter holds the list's reference until the restore releases it. Tier 1 and Tier 3 cover that case.
  3. RED: Tier 1 mirrors over a todo!() core.
  4. GREEN: the swap, the Tier 3 differential and the registration test.

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

RED

soldr cargo test -p obs-data --test obs-tests-core -- source::restore_filters::
test result: FAILED. 0 passed; 7 failed
panicked at rust/obs-source/src/restore_filters.rs:104:5: not yet implemented: #5801

GREEN

Tier 1 and Tier 3, on the pushed head:

soldr cargo test -p obs-data --test obs-tests-core -- source::restore_filters
test source::restore_filters_parity::restore_filters_matches_c ... ok
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 6920 filtered out; finished in 1.87s
  • What Tier 3 compares: restore_filters_parity, with oracle/source_restore_filters.c, runs the original C and the Rust export on noise-filled sources built from the real headers. Both sides get the same stand-in obs_data array and the same recording obs_source_get_ref(), loads and obs_source_release(). It compares: the new list; every target and parent, current and loaded; each item read, name read, item release, reference, load (public or private) and release, in order, with the lock state and a digest of the list and every link at that moment; the NULL log lines; every other fixture byte; the lock afterwards; and the item hold balance.
  • What Tier 3 covers: every chain of 0 to 6 current filters (one unnamed, one repeated name); every array of up to 3 items over 7 names, plus longer patterns (reusing, loading, duplicating and dropping filters); no filter or each listed one unreferenceable; NULL source and array; and a proptest of up to 6 items.
  • Mutants: Tier 3 rejects seven, built into the test: no unlink, the source as every target, a public load, release under the lock, every name read as NULL, no release, and parents set with the targets. By hand it also rejected two core mutants (old filters released in reverse order, and a parent set inside the item loop, the libobs: A filter's size query can follow a NULL target during filter restore or removal #2172 order); both were reverted.

Tier 2, the C test against both libraries (full suite, then the repeat):

OBS_CTEST_JOBS=10 uv run rust/tools/linux-validate/run.py --repeat 1 --tests '^test_source_restore_filters'
libobs exported symbols, C vs Rust: IDENTICAL (1769 symbols)
[OFF] 100% tests passed, 0 tests failed out of 1128
[OFF] repeat: 100% tests passed, 0 tests failed out of 1
[ON]  100% tests passed, 0 tests failed out of 1128
[ON]  repeat: 100% tests passed, 0 tests failed out of 1

Run directly under xvfb-run in the kept build volume, test_source_restore_filters shows [ PASSED ] 8 test(s) against hybrid libobs and against libobs-c-reference, none skipped.

Registration:

soldr cargo test -p obs-studio-rust --test obs-tests-app -- source_restore_filters
test native_build::canonical_source_restore_filters_swap_is_registered::canonical_source_restore_filters_swap_is_registered ... ok

./lint passes. ci/windows_link_check.py linked the workspace test binaries for x86_64-pc-windows-msvc and all Tier 2 win-x64 binaries; I stopped it before its later stages. ./push ran prooft's client lanes (clippy and Dylint on all six targets, 10172 host tests passed), but the final commit isn't signed here, so the PR runs the full selected CI.

Test cost: obs-tests-core gains 8 cases (restore_filters + restore_filters_parity with its proptest), 1.91 s wall locally (soldr cargo test -p obs-data --test obs-tests-core -- restore_filters); the new cmocka test_source_restore_filters takes 0.08 s in the Tier 2 Linux job.

🤖 Generated with Claude Code

@rdoupe
rdoupe requested a review from zackees as a code owner November 27, 2026 03:09
@rdoupe
rdoupe changed the base branch from master to port/5799-filter-add November 27, 2026 03:09
Base automatically changed from port/5799-filter-add to master November 27, 2026 03:41
@rdoupe
rdoupe force-pushed the port/5801-restore-filters branch from 6de53cc to 0fd4cff Compare November 27, 2026 04:44
@rdoupe
rdoupe added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 27, 2026
@rdoupe
rdoupe force-pushed the port/5801-restore-filters branch from 0fd4cff to 6ce0fca Compare November 27, 2026 06:52
@rdoupe
rdoupe enabled auto-merge November 27, 2026 06:58
@rdoupe
rdoupe added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 27, 2026
@rdoupe
rdoupe force-pushed the port/5801-restore-filters branch from 6ce0fca to 5f9c735 Compare November 27, 2026 08:31
@rdoupe
rdoupe added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 27, 2026
rdoupe and others added 4 commits November 27, 2026 11:49
Move obs_source_restore_filters() unchanged out of obs-source.c.h into
obs-source-restore-filters.c.h, still compiled in the live core-source
group. It is EXPORT and declared in obs.h, and the filter chain rules it
asks are declared in obs-source-filter-chain.h (in the precompiled
header), so the earlier position in the unity group needs no new
declaration. No Rust, no behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New cmocka test through the real core (xvfb-run, skips without a
display), against hybrid libobs and the C reference: a NULL source or
array logs the validity check's line once (the source first) with
filter_mutex free and changes nothing. Otherwise each array item reuses
the first current filter whose name matches (the same filter, whatever
the item's id; an unnamed filter never matches, not even an item named
"", since no filter can have a blank name) or is loaded from its data,
while the list is empty, the old filters have no parent and no target,
and filter_mutex is free (probed from a second thread when a filter
type's create callback runs). Each restored filter targets the next, the
last the source; while a later item loads, an earlier one already
targets its successor but has no parent yet: the parents are set once
every target is (#2172). The new list holds one reference per entry, so
a duplicated name lists the same filter twice with two references; the
old filters are released once each, in old order, after the new list is
in place and with the lock free, and one not reused goes away. No filter
signal fires, and nothing logs when every item is reused. Whether a load
is public or private is not checked (the C reference loads public,
hybrid libobs private, a difference of the filter chain rules, #2981); a
current filter whose last reference is gone can't be listed, so it goes
to Tier 1 and Tier 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New obs-source module restore_filters with a todo!() core over a
RestoreList trait, and Tier 1 mirrors of test_source_restore_filters.c
on a model that records every call and checks the lock state of each:
the NULL lines (source first) with nothing touched; on every chain of up
to 6 current filters (an unnamed one, an empty name, a repeated name)
with every array of up to 3 items, with no filter or each listed one
unreferenceable, the C's order: under the lock each filter read and
unlinked and the list freed; with the lock free, per item the item and
its name, each current name until the first match and its reference,
the load (private, by the chain rule) when there is none or the
reference fails, the previous filter's target, the item's release; then
the last target, every parent, the new list stored under the lock, and
each old filter released in old order. Also the end state: the chain of
targets, the parents, one reference per listing, the old filters
unlinked and released, every item released.

    soldr cargo test -p obs-data --test obs-tests-core -- source::restore_filters::
    test result: FAILED. 0 passed; 7 failed
    panicked at rust/obs-source/src/restore_filters.rs:104:5: not yet implemented: #5801

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Safe core restore_filters::restore over the RestoreList trait, with
source_filter_chain's restore match and restore step, and the shim in
ffi::source_restore_filters: the exported obs_source_restore_filters()
(rust-exports.d). The shim rejects NULL before any adapter runs; the
lock, the list reads, the unlinks, da_free(), the name reads,
obs_source_get_ref(), obs_load_source() and obs_load_private_source(),
the target and parent writes, the move of the new list into the source,
obs_source_release() and the obs_data array and item calls stay C in the
new obs-source-restore-filters-fields.c.h (live core-source group, no
EXPORT). The extracted C moves to the reference-only group
libobs.ported-source-restore-filters.

Tier 3 (restore_filters_parity, oracle source_restore_filters.c): the
original C and the Rust export on noise-filled real-header sources with
a stand-in array and recording references, loads and releases, over
every chain of 0 to 6 current filters (an unnamed one, a repeated name)
with every array of up to 3 items over 7 names plus longer patterns
(reusing, loading, duplicating and dropping filters), with no filter or
each listed one unreferenceable, and a proptest of up to 6 items. It
compares the new list, every target and parent, each item read, name
read and item release, reference, load and release in order with the
lock state and a digest of the list and every link at that moment, the
NULL lines, every other byte, the lock after and the item holds, and
rejects seven mutants. Registration test in obs-build; rust/README row.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Ci-Attestation: {"at":1795768045,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":95,"stamp":"92eba974e1ece5c8891f92c0beca9581","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795768045,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":95,"stamp":"0c5b3123b94f39ab68d033c2782bd5ad","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795768045,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":95,"stamp":"c5b1a844764aa1233b96083dfc054af8","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795768045,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":95,"stamp":"e7f0306f8bb64b3b65d5d9db3ab07cf2","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767948,"gate":"general/all/client-lint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"932c69a5bd4c3e05d56ac7ab43ff590c","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795768045,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":95,"stamp":"0f8e186c499bd4635e9122f272b4f648","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"0e7a26dd59cba6ceec2c72d421a19b3d","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"348dca7d135c5c08f39e95e823f5d9dd","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"597967026e038b02160ea166a5d3a1f3","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"95482b3a3342c8c9d71d27352c5b3c0f","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"77a64358b37aed9c1f06daeba44e66d0","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"0f95cded713930eca10005e392f16328","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"f8a017f5830c53988be4d7889605b607","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"515e1dc4ad39b45da879d4f3a321f9dc","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"6d57232f5533ce0dd42d09c972f6a702","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767949,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"d7158e2e0fd273d9107426d3ed56ae2c","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767948,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"bb95a366de0d7329f0d5d59be55a37e7","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795767948,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"654254869fdde294ac20c0aa79f7e78803489e5e7d1d8a2b11b4531529206646","lane":"client-lint","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":65,"stamp":"810a9aa9139f264a126627142eb4df6f","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}
Ci-Attestation: {"at":1795768305,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"c0a1b8675b84ad7474fd7c46d9143975033a8a667335d09f5ebcd30401ac9393","lane":"client-test-x86_64-unknown-linux-gnu","parents":["09be301526b7cfe0aea40c00a169db7b1d6613b2"],"secs":260,"stamp":"74d5869676e4d0bfb954ca3a78c98e16","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"723cd1c803bdee2e57f782a969203de768d45677","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source+.h.c","libobs/build/libobs.ported-source-restore-filters+.h.c","libobs/build/ported-source-sets/source-restore-filters.json","libobs/cmake/rust-exports.d/obs-source-source_restore_filters.txt","libobs/obs-source-restore-filters-fields.c.h","libobs/obs-source-restore-filters.c.h","libobs/obs-source.c.h","rust/README.md","rust/obs-build/tests/native.rs","rust/obs-build/tests/native/registration/canonical_source_restore_filters_swap_is_registered.rs","rust/obs-c-oracle/oracle.d/source-restore-filters.list","rust/obs-c-oracle/oracle/source_restore_filters.c","rust/obs-source/Cargo.toml","rust/obs-source/src/ffi/mod.rs","rust/obs-source/src/ffi/source_restore_filters.rs","rust/obs-source/src/lib.rs","rust/obs-source/src/restore_filters.rs","rust/obs-source/tests/source/main.rs","rust/obs-source/tests/source/restore_filters.rs","rust/obs-source/tests/source/restore_filters_parity.rs","test/cmocka/build/test-graph.json","test/cmocka/test_source_restore_filters.c","test/cmocka/tests.d/test_source_restore_filters.cmake"],"head":"04b12d50daddfd4a758c3283cfa4ed7ad3e49d4e","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":"663cce4d0285db6663ba0457beeefc38ed2915f544fd3158f3dc0ea061726ed2","tree":"a17d3dc91777467c45032df16f9c8ac3dcd7be76"}}
@vpacher
vpacher force-pushed the port/5801-restore-filters branch from 5f9c735 to 000eb16 Compare November 27, 2026 10:49
@vpacher
vpacher enabled auto-merge November 27, 2026 10:49
@vpacher

vpacher commented Nov 27, 2026

Copy link
Copy Markdown
Member

Coordinator: rebased onto master after #5812 landed. The only conflict was the rust/obs-source/Cargo.toml description list; I kept both entries (obs-source-activate.c.h from #5812 and obs-source-restore-filters.c.h from this PR). The other files merged automatically, and the four commits are unchanged otherwise. Auto-merge is on again, so the PR enters the queue when CI is green.

@vpacher vpacher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Coordinator review of 000eb16 (after my rebase onto #5812).

  • The structure follows the testing policy: a verbatim extract, the cmocka characterization against both libraries, RED over a todo!() core, then GREEN with the swap, the Tier 3 differential (restore_filters_parity with oracle/source_restore_filters.c) and the registration test. Tier 2 and Tier 3 are both present, and the Tier 3 mutants are a good check.
  • The hybrid public-versus-private load difference comes from restore_step (#2981), and the PR body explains it. The characterization correctly does not assert that difference.
  • No public header, existing C test or workflow changes. No user-visible change, so no features ledger line is needed.

One request (obs-worker §4, #2888): the PR adds Rust tests (Tier 1 restore_filters, Tier 3 restore_filters_parity with a proptest), but the body has no "Test cost" line. Please add one (the added wall time of obs-tests-core and the new cmocka test). It is a body edit only, so auto-merge stays on.

@vpacher
vpacher added this pull request to the merge queue Nov 27, 2026
@rdoupe

rdoupe commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Added the Test cost line to the body: 8 obs-tests-core cases, 1.91 s locally; test_source_restore_filters 0.08 s in Tier 2 Linux.

Merged via the queue into master with commit e1df443 Nov 27, 2026
47 checks passed
@vpacher
vpacher deleted the port/5801-restore-filters branch November 27, 2026 11:59
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_restore_filters to obs-source

2 participants