Repository navigation
[CTX-1378] test(runtime): compile publication-control on Windows CI and cover feature warnings - #2293
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…nd cover feature warnings
…iants PX-7516 follow-up on PR #2293. - Gate SpawnReservation::descriptors, spawn_reservation_descriptors, bootstrap_reader_descriptor, control_child_descriptor and close_test_descriptor on publication-control-test-support so the shipped-graph all-targets clippy run has no dead helpers. - Gate EstablishFailure::Timeout and EstablishFailure::Tls on unix and EstablishFailure::Unsupported on not(unix), matching the adapter that constructs each variant, so the Windows -D warnings check has no dead variants and the enum needs no allow(dead_code). - Gate EstablishedControl.stream on unix together with its stream() accessors: the non-Unix adapter never establishes, so it never stores a transport and the field was dead there.
Xuepoo
force-pushed
the
ctx-1378/chore-ci-feature
branch
from
October 20, 2026 02:40
46c17e1 to
cc3741b
Compare
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.
Priority: P2 | Area: security | Labels: fix, P2, area:security | Milestone: v0.1.0 | RFC: none | Task: CTX-1378
Summary
bitty-runtimewithpublication-controland deliberately withoutpublication-control-test-support, so feature-combination dead code cannot regress.cargo check -p bitty-runtime --features publication-control --all-targets --lockedwithRUSTFLAGS=-D warnings(compilesunsupported.rsand the non-Unix arms on MSVC), and thepreparation_fails_closed_on_non_unix_platformslib test with the fixture feature.establish_with_expected_pin,take_bootstrap_reader,take_control_child,descriptors,spawn_reservation_descriptors,bootstrap_reader_descriptor,control_child_descriptor, andclose_test_descriptoronpublication-control-test-support, so--all-targetswithout the fixture feature is warning-free.EstablishFailurevariant and theEstablishedControl::streamfield on the platform adapter that actually constructs them. Noallow(dead_code)anywhere in the module, no production API change.AWS_LC_SYS_PREBUILT_NASM=1for the Windows steps: the runner image ships CMake and Perl but not NASM, and aws-lc-sys uses its bundled prebuilt objects when NASM is absent; the variable is ignored when NASM exists.Why the variants are platform-conditional
EstablishFailureandEstablishedControlare the shared seam in front of twoplatform adapters (
ai_publication_launch/unix.rsandai_publication_launch/unsupported.rs). The Unix adapter is the only code thatcan produce a transport, so it is the only constructor of
EstablishFailure::Timeout(deadline path),EstablishFailure::Tls(handshakepath), and the stored
EstablishedControl::stream(the negotiated parentstream). The non-Unix adapter fails closed in
ensure_supported()before anymaterial or handle exists, so
establish()only ever returnsEstablishFailure::Unsupported, and noEstablishedControlis ever builtthere. Compiling the shared type without the feature previously hid this: with
the feature on, both directions were reported as dead code (
variants Timeout and Tls are never constructed,field stream is never readon Windows;fixture-only helpers on Linux). Each variant is now
cfg-gated on exactly theadapter that constructs it —
cfg(unix)forTimeout/Tls/stream,cfg(not(unix))forUnsupported(which replaces acfg_attr(unix, allow(dead_code))) — so-D warningsstays enforced instead of suppressed.Unix behavior is unchanged: the same variants, arms, field, and accessors exist
there, and the publication-control suite still passes.
Verification
46c17e1): WindowsCheck publication-control feature compilationfailed withfield stream is never readandvariants Timeout and Tls are never constructed; Quality gates (1) failed with the five fixture-only helpers. Both reproduced withRUSTFLAGS=-D warnings.RUSTFLAGS="-D warnings" cargo check -p bitty-runtime --features publication-control --all-targets --lockedexit 0;cargo clippy -p bitty-runtime --features publication-control --all-targets --locked -- -D warningsexit 0; the same clippy run withpublication-control-test-supportexit 0;RUSTFLAGS="-D warnings" cargo check -p bitty-runtime --all-targets --locked(default features) exit 0;cargo fmt --all --checkexit 0.EstablishFailure::MutationProbevariant makes the newpublication-controlclippy step fail onvariant MutationProbe is never constructedand exit 101, while the pre-existing default-feature workspace clippy run stays green (the module is compiled out without the feature). Mutation reverted; tree clean.cargo test -p bitty-runtime --features publication-control-test-support --lib --locked ai_publication_launch— 21 passed, 0 failed (Unix behavior unchanged).cargo check --target x86_64-pc-windows-msvc|gnucannot run on the development host (aws-lc-sys needs a Windows C toolchain to build the target C sources); the authoritative evidence is the greenWindows check and testjob on the pushed head.actionlintexit 0;act -n -j qualityandact -n -j windowsexit 0 (dry-run only).just ci-localwas not re-run for this head (host disk pressure); the scoped cargo gates above cover the changed crate and the changed steps, and remote CI is the acceptance gate.Closes #2288