Skip to content

obs-core: Port read-only module metadata getters (#3866) - #3870

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

zackees merged 5 commits into
masterfrom
port/module-metadata-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports the nine read-only obs_module metadata getters from obs-module.c.h to obs-core. Borrowed pointer identity, NULL returns, metadata display-name precedence and module callback behavior remain unchanged. An empty display name suppresses the name callback; author and description still use callbacks and ignore metadata description. Loading, enumeration, module lists and logging remain outside this port. No intended behavior differences or user-visible change.

Fixes #3866 (native child of #444).

Commit sequence: C-only actual-library characterization cb71adcf4; verbatim C extraction dc6c93630; Tier 1 RED abea06390; Rust GREEN 59c369e20. RED command SOLDR_RUSTC_WRAPPER=none SOLDR_PORCELAIN=0 OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core obs_core::module_metadata:: exited 101 with all three tests failing at todo!().

The safe core selects borrowed fields and applies display-name/callback precedence. Thin ABI shims use private C field-address accessors; Rust never mirrors obs_module or metadata layouts. Every field-address accessor is checked against the real C struct. No public structure crosses this seam, so no new public layout needs a Rust layout test. The C reference retains the extracted functions under the original unity PCH, including the obs-module.h export declarations for ID/version. The export fragment covers all nine public Rust symbols; private C helpers stay hidden. Public headers and preexisting C tests are unchanged.

Validation:

  • All four Tier 1/Tier 3 tests pass with reduced parity cases, including after rebasing onto master. Differential tests compare all nine pointer results and callback counts across every one of 1,024 presence combinations and bounded randomized byte buffers (including embedded NULs and invalid UTF-8). They include real-header field-address checks, null modules/metadata/fields, empty display names and callbacks returning NULL. No proptest persistence.
  • Mutation: ignoring the metadata display name fails original-C parity at name flags=7 (exit 101, pointer mismatch). Restored the core and reran all four tests successfully; no seed file was written.
  • C-only characterization and verbatim extraction each passed before the swap. The unchanged test_module_metadata passes three repeats against each actual library after the swap. ldd confirms hybrid and /build/tree/libobs-c-reference loader paths. Dynamic exports match exactly: 1,767 symbols. Focused runs use docker_task_command with this checkout's warm build volume and OBS API version 33.
  • GCC and Clang syntax-only checks pass for the extracted C, private adapter and oracle wrapper with -Wconversion -Wsign-conversion -Wfloat-conversion -Werror, using oracle dependency-header shims. Nix Clang uses -Qunused-arguments for injected linker flags.
  • Source-group inventory (10 tests), port metadata (4), native core inventory (3), and graph ordering (2) pass. Native graph entry uses suite core; the exact selected inventory increases by one. Independent local clud-review: clean; reviewer independently reran all four metadata tests.
  • SOLDR_PORCELAIN=0 ./lint --fix completed formatting, CI self-tests, workspace Clippy and feature-set Clippy, then exited 1 solely because soldr refused to build the Dylint driver under clud. Its report returned diagnostic_state: unknown; the artifact ends with the explicit refusal: selected nightly 2026-05-28 has no pre-deployed Dylint v6.2.0 driver (only 2026-08-15 is deployed), followed by lane lint: FAILED (1). No toolchain, dependency or guard workaround was attempted. Hosted Fast Gate must complete Dylints. The initial Clippy test-helper line-budget error was fixed without changing assertions, then this rerun passed Clippy.

Test cost: 25 debug invocations of the four metadata tests, longest group invocation 0.076 s, peak RSS 17,700 KiB. No own threads and no new Rust test executable (existing Core state category).

The full ./unittest/Tier 2 suite, macOS/Windows native runs and local-gate attestation were not run. Hosted PR CI remains the merge gate. Tier 4 does not apply to these non-protocol getters.

Pool conflict rebase after #3880 (2026-11-07)

Rebased assigned head e83fb2e5e29bc04737aea0e99d382b9fd039e7c2 onto 58d2c1155f9507da4728576f24f8aa68e2efefae. Kept master's ci/test_native_b2_portability.py exactly, dropping both obsolete inventory count bumps. Graph entries and the README port-table record are retained. Range-diff shows the extraction, RED and GREEN patches unchanged; characterization differs only by dropping count edits. Implementation, oracle and Rust tests are byte-identical to the replaced head.

Portability preflight found the new private-header C test missing conditional OBS::w32-pthreads; added that graph dependency without editing the C test. No link-support stub or oracle log callback was added.

Verified: all seven native_build::canonical_rust_static_ exact-list tests; all four focused metadata Tier 1/3 tests with reduced parity; host Clang and GCC syntax checks on the new oracle with strict format/conversion flags and -Werror; native portability (4), graph sorting (2), README placement (1), build groups (10), port metadata (5), and diff checks. Existing hosted head had successful checks and no latest hosted failure to diagnose. Prior exact-inventory-count statements above are superseded by the relative checks. Full Tier 2, complete unittest and native platform runtimes were not repeated for this mechanical rebase; PR CI remains the merge gate.

Series lint: SOLDR_PORCELAIN=0 ./lint exited 1 with diagnostic_state: unknown; artifact tail confirms only the documented soldr refusal to build the Dylint v6.2.0 driver under clud for nightly-2026-05-28. All earlier lanes (formatting, self-tests, workspace and feature Clippy) passed. No guard/toolchain workaround attempted; hosted Fast Gate must finish Dylint. Log: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-hXI1qS.log.

@zackees
zackees force-pushed the port/module-metadata-getters branch from e353361 to 59c369e Compare November 7, 2026 10:06
@zackees
zackees marked this pull request as ready for review November 7, 2026 10:06
@zackees
zackees enabled auto-merge November 7, 2026 10:06
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator/chaperone. Auto-merge is enabled on pinned head 59c369e. Focused Rust, mutation, actual-library Tier 2, export parity, GCC/Clang conversion slices, inventory checks and independent review pass. Local lint reached only the documented soldr Dylint-driver refusal after earlier lanes passed; hosted Fast Gate must finish Dylints. Per the worker-pool assignment, retiring without waiting for hosted CI or queue admission.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased pool head 59c369e onto master 108c674; verified new remote head e83fb2e with an exact force-with-lease. Range-diff preserves all port patches; only the native inventory assertion gains the SDK-enabled count (425), retaining the master additions. Native inventory (3), graph ordering (2), graph slices (1), port metadata (5), build groups (10), and all four metadata Rust tests including original-C parity pass. Auto-merge re-armed and confirmed; existing chaperone retains handoff. Series lint is running serially after the first attempt hit the documented soldr active-build-lock refusal. Full Tier 2/native platform suites were not repeated for this mechanical rebase.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Series lint update: serial SOLDR_PORCELAIN=0 ./lint exited 0 (284.9 s), all lanes passed. Soldr reused a content-matching passing Dylint verdict. Log: /tmp/rebase-five-lint-serial.log. The earlier active-build-lock refusal is superseded by this successful serial run.

@zackees
zackees force-pushed the port/module-metadata-getters branch from e83fb2e to dba4530 Compare November 7, 2026 12:41
@zackees
zackees enabled auto-merge November 7, 2026 12:41
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the pool chaperone. Replaced e83fb2e with verified remote head dba4530 using an exact force-with-lease; head-pinned auto-merge is confirmed. Dropped obsolete inventory count edits in favor of master relative checks; retained graph entries and README table record. Range-diff preserves port patches and implementation/oracle/Rust tests byte-for-byte. Added only conditional Windows pthread dependency to the new private-header C test graph. Seven exact-list registration tests, four focused metadata tests, strict host Clang/GCC oracle checks, native inventory (4), graph sorting (2), README (1), build groups (10), port metadata (5), and diff checks pass. Single serial series lint reached the documented soldr Dylint-driver refusal after all earlier lanes passed; log /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-hXI1qS.log. No workaround; hosted Fast Gate remains authoritative. PR body updated; full Tier 2/native runtime suites not repeated. Retiring from hosted monitoring per assignment.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 6551be3 Nov 7, 2026
44 checks passed
@zackees
zackees deleted the port/module-metadata-getters branch November 7, 2026 14:43
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-module read-only metadata getters to obs-core

1 participant