Skip to content

[CTX-1378] test(runtime): compile publication-control on Windows CI and cover feature warnings - #2293

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-1378/chore-ci-feature
Oct 20, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-1378/chore-ci-feature

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P2 | Area: security | Labels: fix, P2, area:security | Milestone: v0.1.0 | RFC: none | Task: CTX-1378

Summary

  • Adds a Quality-gates (shard 1) clippy step that compiles bitty-runtime with publication-control and deliberately without publication-control-test-support, so feature-combination dead code cannot regress.
  • Adds two Windows steps: cargo check -p bitty-runtime --features publication-control --all-targets --locked with RUSTFLAGS=-D warnings (compiles unsupported.rs and the non-Unix arms on MSVC), and the preparation_fails_closed_on_non_unix_platforms lib test with the fixture feature.
  • Gates the fixture-only establish_with_expected_pin, take_bootstrap_reader, take_control_child, descriptors, spawn_reservation_descriptors, bootstrap_reader_descriptor, control_child_descriptor, and close_test_descriptor on publication-control-test-support, so --all-targets without the fixture feature is warning-free.
  • Gates every EstablishFailure variant and the EstablishedControl::stream field on the platform adapter that actually constructs them. No allow(dead_code) anywhere in the module, no production API change.
  • Sets AWS_LC_SYS_PREBUILT_NASM=1 for 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.
  • No Windows runtime-support claim; this is compile plus fail-closed refusal evidence only.

Why the variants are platform-conditional

EstablishFailure and EstablishedControl are the shared seam in front of two
platform adapters (ai_publication_launch/unix.rs and
ai_publication_launch/unsupported.rs). The Unix adapter is the only code that
can produce a transport, so it is the only constructor of
EstablishFailure::Timeout (deadline path), EstablishFailure::Tls (handshake
path), and the stored EstablishedControl::stream (the negotiated parent
stream). The non-Unix adapter fails closed in ensure_supported() before any
material or handle exists, so establish() only ever returns
EstablishFailure::Unsupported, and no EstablishedControl is ever built
there. 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 read on Windows;
fixture-only helpers on Linux). Each variant is now cfg-gated on exactly the
adapter that constructs it — cfg(unix) for Timeout/Tls/stream,
cfg(not(unix)) for Unsupported (which replaces a cfg_attr(unix, allow(dead_code))) — so -D warnings stays 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

  • Pre-fix repro (CI head 46c17e1): Windows Check publication-control feature compilation failed with field stream is never read and variants Timeout and Tls are never constructed; Quality gates (1) failed with the five fixture-only helpers. Both reproduced with RUSTFLAGS=-D warnings.
  • Post-fix Linux: RUSTFLAGS="-D warnings" cargo check -p bitty-runtime --features publication-control --all-targets --locked exit 0; cargo clippy -p bitty-runtime --features publication-control --all-targets --locked -- -D warnings exit 0; the same clippy run with publication-control-test-support exit 0; RUSTFLAGS="-D warnings" cargo check -p bitty-runtime --all-targets --locked (default features) exit 0; cargo fmt --all --check exit 0.
  • Mutation proof for the feature-warning goal: adding a never-constructed EstablishFailure::MutationProbe variant makes the new publication-control clippy step fail on variant MutationProbe is never constructed and 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.
  • Fixture suite: cargo test -p bitty-runtime --features publication-control-test-support --lib --locked ai_publication_launch — 21 passed, 0 failed (Unix behavior unchanged).
  • Windows: cargo check --target x86_64-pc-windows-msvc|gnu cannot run on the development host (aws-lc-sys needs a Windows C toolchain to build the target C sources); the authoritative evidence is the green Windows check and test job on the pushed head.
  • actionlint exit 0; act -n -j quality and act -n -j windows exit 0 (dry-run only). just ci-local was 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

@Xuepoo Xuepoo added this to the v0.1.0 milestone Oct 20, 2026
@Xuepoo Xuepoo added fix Bug fix P2 Priority: medium area:security Area: security corpus / audit labels Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10c634e9-42cb-49ca-9f29-bf32850e4307
📥 Commits

Reviewing files that changed from the base of the PR and between 6c4ae43 and cc3741b.

📒 Files selected for processing: 3
  • .github/workflows/ci.yml
  • crates/bitty-runtime/src/ai_publication_launch.rs
  • crates/bitty-runtime/src/ai_publication_launch/unix.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

reviewer and others added 2 commits October 20, 2026 10:37
…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
Xuepoo force-pushed the ctx-1378/chore-ci-feature branch from 46c17e1 to cc3741b Compare October 20, 2026 02:40
@Xuepoo
Xuepoo merged commit af59f71 into main Oct 20, 2026
18 checks passed
@Xuepoo
Xuepoo deleted the ctx-1378/chore-ci-feature branch October 20, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:security Area: security corpus / audit fix Bug fix P2 Priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CTX-1378] test(runtime): compile publication-control on Windows CI and cover feature-combination warnings

1 participant