Skip to content

libobs: characterize and extract encoder group started-count accessor (Refs #5316) - #5322

Merged
zackees merged 2 commits into
masterfrom
test/5316-encoder-group-num-started
Nov 20, 2026
Merged

zackees merged 2 commits into
masterfrom
test/5316-encoder-group-num-started

Conversation

@zackees

@zackees zackees commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Refs #5316.

The hidden encoder-group started-count accessor remains inside obs-encoder.c.h even though output interleaving already imports it from Rust. This C-only prerequisite pins its current behavior and moves its complete body verbatim into obs-encoder-group-num-started.c.h, in alphabetical core-output unity order. The mutex, count width, snapshot timing, signature and non-NULL group precondition remain the same.

The focused cmocka fixture uses the real private group layout and existing recording-mutex pattern. It covers two distinct groups, counts 0/1/2/32/UINT32_MAX-1/UINT32_MAX, independence from unrelated group state, no writes to group storage, exactly one matched lock/unlock pair, reading after lock and returning the snapshot taken before unlock. It starts no threads. The test explicitly characterizes C source; the separate Rust swap must relink it to the real replacement and adapter, preserving these assertions.

RED commit 21a69e0 (408f6fab2 before client trailers) registers the new fixture against the missing extraction source; the extraction-contract check fails at that missing path, and the canonical CMake compile likewise fails in the generated implementation wrapper with that missing-file diagnostic (the test translation unit compiles). Before moving any production code, both cases passed against the original C body under GCC -Wall -Wextra -Werror and Clang -Wshorten-64-to-32 -Wconversion -Werror. Three scratch-only mutants (read before lock, read after unlock, constant zero) each fail the assertions.

The existing canonical LIBOBS_SOURCES set owns core-output on native CMake and Cargo builds for Linux, Windows and macOS; its unity member list supplies the new implementation. Test registration uses the sorted canonical graph and tests.d pointer, including caption/uthash and conditional w32-pthreads private-header dependencies, as sibling encoder extractions do.

GREEN pre-attestation commit d48a1df62 passes both characterization cases under GCC -Wall -Wextra -Werror and Clang 21 -Wshorten-64-to-32 -Wconversion -Werror. The original and extracted files compare byte-for-byte. Canonical CMake compile commands successfully compile the production core-output unity object and both fixture objects with repository warnings treated as errors; linking the two fixture objects to cmocka passes both cases. The CMake/native common source-set and sorted graph/unity checks pass.

Fresh forced PR-head merge-tree checks are clean with #5246, #5317 (encoder output extraction) and #5306. #5280 reports exactly the same three pre-existing support-file conflicts against unchanged master as against this head; none of those paths is changed here, and both encoder source/unity hunks auto-merge cleanly. Evidence is retained in the worker response artifacts.

The single final full SOLDR_PORCELAIN=0 ./lint passed (exit 0, 335.9 seconds) under a 1,200-second deadline. Its bounded report parser returned unknown, but the retained full artifact explicitly ends with lane lint: ok. Final GREEN head 9cd76f1 is published. The reduced-parity complete host inventory reported 9,263 passes (including the native_build module), one unrelated 30-second timeout in obs-util pipe_parity::process::dead_pipe_write_survives_concurrent_spawns, and six skips. That same pipe test stalled for over 270 seconds on RED before the extraction. No Rust source is changed by this PR. Client lint/clippy/Dylint on all six targets and repository self-tests/validators passed; the failed host gate produced no attestation. ./push reports partial evidence and requires ordinary PR CI. Complete Tier 2 and native runtime coverage remain CI obligations. RED publication completed with partial client evidence after its optional full-parity host proof exceeded 15 minutes with an unrelated pipe test stalled; that local test process was explicitly interrupted, so no host-test pass or complete attestation is claimed. Ordinary PR CI remains required. GREEN publication used the policy's reduced parity level with the entire test inventory retained; the timeout is recorded above, without claiming a complete host pass.

History checked: #1599 introduced this accessor, #1603 ports its interleaver caller, and #2934 uses it for group-move validation; none is an existing extraction or port of this function. The source hunk is separate from encoder weak references (#5246/#5280), add/remove outputs and frame-rate divisor alignment. This PR adds no link-support files. Safe Rust mirrors, differential/layout coverage and existing exact-name fixture/benchmark fakes belong to the separate swap follow-up #5319 (blocked by #5316). Tier 4 is inapplicable to this non-protocol accessor; complete Tier 2 OFF/ON suites, export parity and native Windows/macOS execution are not claimed locally. The GREEN canonical fixture was linked from its objects directly against cmocka; full shared-library linking is left to the selected CI lanes.

Ci-Attestation: {"at":1795137944,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":202,"stamp":"e711c2360914a3842b4cddd97cb02cc7","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137944,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":202,"stamp":"67ef608a69ace7700b86ab6044c0aaf8","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137944,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":202,"stamp":"ec2be14a198b8e26a507f06a2a0c16db","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137944,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":202,"stamp":"9befa76df5cdccc24c4069d9189ce635","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137735,"gate":"general/all/client-lint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"fa647068edc83e7ce468a20b7bf4b34f","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137944,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":202,"stamp":"a7bb79171be35009cb44c3ba24c3b8ab","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137737,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"9ef0c6f38bcfdc06b981e2cebfaf91a3","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137738,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"f54b6ba101a7820218a43f8773c94763","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137737,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"045817c29a71f184d3e8eb41e0206d7a","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137737,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"174409566626f23c490d9ae6f15ab6af","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137735,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"37d02d12be030caf950cf14c9ed2f93a","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137736,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"12f901fce69e3760f087a61395b9c0c4","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137737,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"9f0ea157ed5658e02cf10010bd0bd519","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137737,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"032076d8e7e40e0f58f61a5164977e6e","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137736,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"7998567ae76962d93397dd94751a9836","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137736,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"c00f224f7365c6fe226f09d39e27da7d","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137735,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"a4070bdded248d5fe2acb1d65ce14d9e","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
Ci-Attestation: {"at":1795137735,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"d5bda900661ad573d5008e72ce8caf4e48c6296f552bb4e3bc2ff6ac89401830","lane":"client-lint","parents":["3b8563940504be9c25e19d594fa5667996cb13b6"],"secs":90,"stamp":"208e96a9919d013bb2bbf49529730aba","tree":"6516f0881926e0c01468875f6b63bf683d21013e","v":1,"via":"run"}
@zackees
zackees marked this pull request as draft November 20, 2026 01:44
@zackees zackees added the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@zackees zackees changed the title test: characterize encoder group started-count seam (Refs #5316) libobs: characterize and extract encoder group started-count accessor (Refs #5316) Nov 20, 2026
…5316)

Ci-Attestation: {"at":1795139776,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":275,"stamp":"80f1cb579782bd068f8ffcb626cf6844","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139776,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":275,"stamp":"ed8fbb05d0f432920184cc538199a708","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139776,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":275,"stamp":"c27e53a6047522bc1c1da03a1c103473","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139776,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":275,"stamp":"3958346234958fb2fb4fea4424a5c58e","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139490,"gate":"general/all/client-lint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"bceb37e30e0ca9f2e04a242974d43855","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139776,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":275,"stamp":"bb7971e71004a989a157d5142f9cdc77","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139494,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"212fa427ebc7ca4a680e37afa291b294","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139494,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"75050bc178a7066e374da53549e43633","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139492,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"7c7c5c581824837b321897eead920500","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139492,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"58a7be860a06ad0f12d63c3a69108388","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"ac4df0b34d3cd4358c83309487fc59c2","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"c6990b108933b933190fdbdc86532842","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139492,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"d874c591e5f617a76a2020c1c8ece519","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139493,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"97ed8776f8fa37c4492d7ea20c1ef699","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"8247c8260300455bc8d92b6a1ac16c51","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"46192f5403b831c681b85841bd364259","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"6e3e17c9be083f5ac74772340b858a61","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
Ci-Attestation: {"at":1795139491,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"91825073de189b359e1ddd05420bb3cda487a7a692c49a3056c1c06a51c72ca2","lane":"client-lint","parents":["21a69e071fcba9703ad660e43ab63174c2f3c779"],"secs":75,"stamp":"a0376f9451bb6ff1c3090d8aefb99b8b","tree":"61c7561c17cae51ee2cf8358de9525b65f27e58c","v":1,"via":"run"}
@zackees
zackees marked this pull request as ready for review November 20, 2026 02:12
@zackees
zackees enabled auto-merge November 20, 2026 02:12
@zackees zackees removed the pool-active Pool worker owns this PR; automated rebases must skip it label Nov 20, 2026
@zackees
zackees added this pull request to the merge queue Nov 20, 2026
Merged via the queue into master with commit eb66f4a Nov 20, 2026
46 checks passed
@zackees
zackees deleted the test/5316-encoder-group-num-started branch November 20, 2026 03:39
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