Skip to content

obs-output: Port encoder instance metadata getters (#3878) - #3879

Merged
zackees merged 7 commits into
masterfrom
port/encoder-metadata-getters
Nov 7, 2026
Merged

zackees merged 7 commits into
masterfrom
port/encoder-metadata-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports five instance encoder metadata getters to obs-output: codec/type read current info; ID/type data/caps read orig_info. Preserves NULL defaults and exact diagnostics, borrowed pointer identity, full-width caps and unchanged state. No intended behavior or public ABI differences.

Fixes #3878 (native sub-issue of #444).

Commit sequence (rebased, range-diff identical): C-only actual-library characterization 7f1cd3e, verbatim extraction ef54406, Tier 1 RED 1ad09e0, Rust GREEN 5b1bcee. RED command SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core output::encoder_metadata:: exited 101: both tests failed at todo!("#3878"). Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-ryhRQa.log.

Rust owns the five public getters, NULL/default decisions and logging. C supplies only borrowed field addresses through a private view, avoiding a Rust mirror of the private encoder layout. No locks, added references or plugin callbacks. Real obs-internal.h supplies view size/alignment/every field offset and enum size/alignment/values. Oracle fixtures keep current and original metadata distinct and compare exact pointers, values and complete unchanged encoder state. Proptest persistence is disabled. Public headers, existing C tests and WebSocket are unchanged; the new characterization remains unchanged after its C-only commit. No feature-ledger entry applies to this behavior-preserving port. No matching benchmark stand-ins existed. Native registration is single-source in the sorted test graph, with a comment-only tests.d fragment.

Validation:

  • Restored-GREEN encoder regression: 358 passed, exit 0, using SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core output::encoder. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-6bv6Mo.log. Six new Tier 1/layout/differential tests also passed alone (local-test-vQkq82.log).
  • C-only characterization and extraction each passed the actual-library test three times per library before the swap. Artifacts: local-test-FmcG4v.log, local-test-5fDPHl.log in the same private artifact directory.
  • Post-swap Tier 2: repository docker_task_command, this slot's warm volume, upstream API version 33, actual hybrid libobs and libobs-c-reference; unchanged characterization passes three repeats against each. ldd confirms /build/tree/libobs/libobs.so.30 and /build/tree/libobs-c-reference/libobs.so.30. Export sets match exactly: 1,767 symbols. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-0V6Nno.log.
  • GCC and host Clang both accept the extracted C group with -Werror -Wconversion -Wsign-conversion -Wfloat-conversion (host Clang uses -Qunused-arguments and real SIMDe include roots).
  • Mutation caps -> zero kills both deterministic characterized_edges and randomized random_metadata_match_c, exit 101 (two passed, two failed). GREEN restored exactly before Docker work. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-JXuLCJ.log.
  • Source-group inventory 10 tests; ported-source inventory 4; port metadata 5; native portability 3; sorted graph 2: pass. Post-rebase graph fix/portability/metadata pass. git merge-tree --write-tree --name-only origin/master HEAD is clean; all four commits compare identical in range-diff. Siblings obs-output: Port encoder counter accessors (#3856) #3858 and obs-output: Port service module lookup accessors (#3839) #3844 were still open at final rebase.
  • SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none ./lint --fix exits 1 only at the documented soldr refusal to build the Dylint driver under clud (no deployed driver for the pinned nightly). Earlier formatting, CI self-tests and workspace/feature Clippy checks completed. No toolchain workaround; hosted Fast Gate must supply Dylint. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-cAgQ79.log.
  • One primary read-only clud-review reviewer: clean, no actionable findings.

Test cost: 25 debug runs per new module with OBS_PARITY_CASES=reduced; Tier 1 longest 0.03 s, peak 12,232 KiB RSS; layout/parity longest 0.08 s, peak 16,836 KiB RSS. No own threads; one isolated child process for global-log probes. Existing Core state binary only.

Full ./unittest/Tier 2 suite, native macOS/Windows validation and local-gate attestation were not run. Hosted required PR checks remain the merge gate. Tier 4 does not apply to these field readers.

Pool preflight repair: The new metadata C fixture lacked its printf callback annotation and conditional Windows pthread headers. RED and GREEN commits are retained; the new targeted portability regression fails before the dependency fix and passes after it. All seven exact native_build::canonical_rust_static_ registrations, all four master native portability tests, graph sorting and README policy pass. Strict host Clang (-Qunused-arguments -Wformat-nonliteral -Werror) and GCC checks pass on the new oracle/C fixtures. Evidence is in build_ci_audit/preflight/green/3879-results.json and its adjacent logs. Rebased the conflicting branch after #3880 merged, preserving master inventory assertions; range-diff retains port implementation/test patches and drops only obsolete absolute-count edits. No existing C assertions, public headers or WebSocket changed. Full lint, native runtimes and Tier 2 were not repeated for this mechanical dependency/configuration repair; hosted Fast Gate and required CI remain the gate. Serial lint on #3858/#3891 reached only the documented clud Dylint-driver refusal after earlier lanes passed. Replaced ea93a06 with 0dc459f using an exact force-with-lease. Head-pinned auto-merge is re-armed and the pool chaperone retains the handoff.

@zackees
zackees force-pushed the port/encoder-metadata-getters branch from 70e9386 to 5b1bcee Compare November 7, 2026 10:52
@zackees
zackees marked this pull request as ready for review November 7, 2026 10:52
@zackees
zackees enabled auto-merge November 7, 2026 10:52
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator/chaperone per worker-pool instructions. Verified GREEN head 5b1bcee is pushed, ready, and auto-merge is enabled (2026-11-07T10:52:32Z); waiting on required PR checks, not yet admitted to the merge queue. Final body records 358 encoder passes, unchanged actual-library OFF/ON characterization, identical exports, mutation evidence, test cost, and the documented local Dylint-driver refusal. Rebased onto current master with identical range-diff and clean merge-tree; #3858 and #3844 were still open. Slot is being detached clean at origin/master.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Pool preflight repair: The new metadata C fixture lacked its printf callback annotation and conditional Windows pthread headers. RED and GREEN commits are retained; the new targeted portability regression fails before the dependency fix and passes after it. All seven exact native_build::canonical_rust_static_ registrations, all four master native portability tests, graph sorting and README policy pass. Strict host Clang (-Qunused-arguments -Wformat-nonliteral -Werror) and GCC checks pass on the new oracle/C fixtures. Evidence is in build_ci_audit/preflight/green/3879-results.json and its adjacent logs. Rebased the conflicting branch after #3880 merged, preserving master inventory assertions; range-diff retains port implementation/test patches and drops only obsolete absolute-count edits. No existing C assertions, public headers or WebSocket changed. Full lint, native runtimes and Tier 2 were not repeated for this mechanical dependency/configuration repair; hosted Fast Gate and required CI remain the gate. Serial lint on #3858/#3891 reached only the documented clud Dylint-driver refusal after earlier lanes passed. Replaced ea93a06 with 0dc459f using an exact force-with-lease. Head-pinned auto-merge is re-armed and the pool chaperone retains the handoff.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the port/encoder-metadata-getters branch from 0dc459f to f04dc0c Compare November 7, 2026 14:49
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto origin/master (6551be3) after #3858 and #3883, replacing 0dc459f with f04dc0c. Kept both counter/metadata adapter declarations, unity registrations and oracle extraction blocks; no semantic overlap. Range-diff preserves all seven commits. Checks exit 0: full native_build:: (115 tests), native portability, sorted test graph (--fix then check), Rust README, local_gate self-test, obs-c-oracle build, and reduced output::encoder_metadata (6 tests including parity). Initial concurrent oracle attempt was refused by soldr target-lock protection; serial retry passed. Exact force-with-lease push verified; auto-merge retained. Hosted CI/Tier 2 and native runtimes were not repeated.

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-encoder.c.h instance metadata getters to obs-output

1 participant