Skip to content

obs-core: Port module failure-info cleanup (#3854) - #3857

Merged
zackees merged 4 commits into
masterfrom
port/module-failure-info
Nov 7, 2026
Merged

zackees merged 4 commits into
masterfrom
port/module-failure-info

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_module_failure_info_free from obs-module.c.h to obs-core. Cleanup frees only the failure pointer table and clears that pointer. It preserves the count and borrowed string entries, including when count exceeds table length; repeated cleanup is a no-op. No intended behavior differences or user-visible change. Public headers and existing C tests are unchanged.

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

Commit sequence: C-only actual-library characterization c38b07525; verbatim extraction 6fdf70300; Tier 1 RED 0ddebe00a; Rust GREEN b218e7db1. 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_failure_info:: exited 101 with both tests failing at todo!().

The thin shim delegates table ownership to the safe core and uses libobs's allocator. The C reference retains the extracted function in its own ported group. This function is public, so its fragment belongs in rust-exports.d; no hidden-symbol fragment or Windows benchmark stand-in removal is needed. Existing obs-sys declaration and obs-mcp caller remain unchanged.

Validation:

  • All five Tier 1/layout/Tier 3 tests pass with reduced parity cases. Size, alignment and both field offsets are measured from the real unchanged public header. Fixed and randomized cases cover empty/allocated tables, arbitrary counts and repeated cleanup. Null outer pointers are excluded because the C function requires a live struct.
  • Mutation: inverted the safe core's null-table condition; obs_core::module_failure_info_parity::characterized_edges failed at the table-cleared assertion (exit 101). Restored the original core and reran all five tests successfully; no proptest seed file was written.
  • C characterization and verbatim extraction each passed before the swap. After the swap, the unchanged test_module_failure_info again passed three repeats against each actual library. ldd confirmed hybrid and C-reference loader paths. Dynamic exports match exactly: 1,767 symbols. Focused validation reused docker_task_command with this checkout's warm build volume and built both libraries plus the affected test target.
  • GCC and Clang syntax checks pass with -Wconversion -Wsign-conversion -Wfloat-conversion, using the oracle dependency header shims. The Nix Clang wrapper also needed -Wno-unused-command-line-argument for its injected linker flags during syntax-only compilation.
  • SOLDR_PORCELAIN=0 ./lint --fix completed formatting, all CI self-test scripts, and workspace/feature Clippy, then exited 1 solely because soldr refused to build the Dylint driver under clud: selected nightly 2026-05-28 has no pre-deployed Dylint v6.2.0 driver (only 2026-08-15 is deployed). The report returned diagnostic_state: unknown; the artifact ends with this explicit refusal and lane lint: FAILED (1). No toolchain or guard workaround was attempted; hosted Fast Gate must complete Dylints.
  • Source-group inventory (10 tests) and port metadata (5 tests) pass. Independent local clud-review: clean.

Test cost: 25 debug invocations of the five new tests, each under 0.01 seconds, peak RSS 17,040 KiB; no own threads and no new Rust test executable (existing Core state category).

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

@zackees
zackees marked this pull request as ready for review November 7, 2026 09:00
@zackees
zackees enabled auto-merge November 7, 2026 09:00
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator. Auto-merge is enabled for b218e7d. Focused restored GREEN: all five Rust tests pass; C characterization passes three repeats against each actual library with identical 1,767 exports. Mutation rejected. Local formatting, CI self-tests and Clippy passed; soldr refused the unavailable Dylint driver under clud, documented in the final PR body. Hosted Fast Gate remains required. Retiring the pool slot as instructed; manager/chaperone watches CI and queue.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit d5428c9 Nov 7, 2026
43 of 45 checks passed
@zackees
zackees deleted the port/module-failure-info branch November 7, 2026 09:47
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 failure-info cleanup to obs-core

1 participant