Repository navigation
obs-core: port public command-line argument getter (#3976) - #3979
Merged
Merged
Conversation
zackees
force-pushed
the
port/3976-cmdline-getter
branch
from
November 8, 2026 03:50
c577664 to
192ac15
Compare
zackees
marked this pull request as ready for review
November 8, 2026 03:51
zackees
enabled auto-merge
November 8, 2026 03:51
zackees
disabled auto-merge
November 8, 2026 03:52
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the public obs_get_cmdline_args getter to obs-core, preserving the stored count, borrowed argument-table pointer, pointer identity and by-value public ABI. Fixes #3976, a native child of #444.
The safe Rust core copies the two stored values; the thin shim reads the C-owned static through an automatically discovered private adapter. The C setter and shutdown retain allocation ownership and use the accessor so individual-source builds remain valid. No public headers or existing C tests changed, no intentional behavior differences, and no logging or protocol changes. Tier 4 does not apply.
Characterization commit b89d9f9 passes the actual-library C test against both implementations. Extraction commit 8f66942 preserves the original getter body verbatim in its own building commit. RED commit 9b65efc fails all three Tier 1 cases at the stub. GREEN commit e0d5b71 passes all six focused Rust tests, including real-public-header size, alignment and every field offset, plus randomized parity against the original C. Incrementing the copied count kills the differential test; restoration passes, with persistence disabled. The follow-up in 192ac15 fixes the independent-source visibility issue found by local review; GCC and Clang reproduce the failure before the fix and compile the fixed individual source successfully. The same reviewer confirmed the fix and returned clean.
Validation passed: full lint; all 190 native-build tests; all 914 utility tests and both doctests; oracle discovery, per-port native registration, native portability, graph ordering and Rust inventory checks. GCC and Clang pass the touched C source, field adapter, original-C oracle and public characterization with nonliteral format warnings treated as errors. No Rust logging stub is needed.
In the slot's warm Docker build volume, the unchanged command-line characterization and three adjacent core tests pass against both the C reference and hybrid libraries. Loader output identifies each intended library path, and all 1,767 dynamic exports match exactly. The new C characterization executable instrumented with ASan and UBSan also passes against both libraries with leak detection enabled; the libraries themselves are the normal Tier 2 builds.
Test cost: six Rust cases share the existing core category binary; one native registration case uses the existing application category binary. Across 25 reduced-case runs, the longest focused module run was 0.018 seconds and peak RSS was 18,296 KiB. No test-owned threads or additional Rust test executable. The final rebase onto current master preserves all five patches unchanged by range comparison. Verified pushed head: 192ac15.