Skip to content

obs-core: port the core initialization query (#3964) - #3965

Merged
zackees merged 4 commits into
masterfrom
port/3964-core-initialized
Nov 8, 2026
Merged

zackees merged 4 commits into
masterfrom
port/3964-core-initialized

Conversation

@zackees

@zackees zackees commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Port the public obs_initialized query to obs-core, preserving its exact pointer-presence behavior before startup, during an initialized session, and after shutdown. Fixes #3964, a native child of #444.

The core compares the pointer with null without dereferencing it. A private adapter exposes the global pointer slot; the C core layout stays in C. No public header or existing C test changes, intentional behavior differences, logging, or network surface changes.

Characterization commit 8ef2e40 passes the new actual-library lifecycle test against both libraries. Extraction commit 4fbc7cd moves the original C function verbatim and builds with both libraries passing. RED commit cf72d03 fails both Tier 1 tests at the stub. GREEN commit 2c773f2 passes all five new Rust tests, including real-header pointer and boolean layout checks and randomized differential coverage using the original C query and automatically discovered production adapter. Inverting the null comparison makes the differential test fail; restoration passes. Persistence is disabled.

Validation passed: full lint; all 187 native-build module tests; all 914 utility tests and both doctests; oracle discovery, native registration, native portability, graph sorting and Rust inventory checks; GCC and Clang with nonliteral format warnings treated as errors, including the oracle. Unchanged lifecycle and core-info C tests pass against the hybrid and C reference, with loader proof for each path and identical sets of 1,767 dynamic exports. The new C test executable also passes with ASan and UBSan against both libraries. These checks used the slot's existing warm build volume. Tier 4 does not apply.

Test cost: five new Rust tests share the existing core category binary. Across 25 reduced-case runs, the longest module run was 0.024 seconds and peak RSS was 15,428 KiB. No test-owned threads or new Rust test executable. The final rebase preserves every patch unchanged by range comparison.

@zackees
zackees force-pushed the port/3964-core-initialized branch from 93c3aa8 to 2c773f2 Compare November 8, 2026 02:45
@zackees
zackees marked this pull request as ready for review November 8, 2026 02:45
@zackees
zackees enabled auto-merge November 8, 2026 02:45
@zackees
zackees added this pull request to the merge queue Nov 8, 2026
Merged via the queue into master with commit 1c48e95 Nov 8, 2026
41 checks passed
@zackees
zackees deleted the port/3964-core-initialized branch November 8, 2026 03:19
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_initialized core-state query to obs-core

1 participant