Repository navigation
fix: restore green CI — drop heapless from the graph, gate byte-tools oracle off unix - #2955
Conversation
The `byte_tools_match_real_bash_on_non_utf8_input` oracle landed in #2945 without the platform gate every other host-bash oracle in the file carries, so the Windows nightly went red on its first run. On windows-latest `bash` is the WSL launcher, which prints a UTF-16 "no distribution installed" notice instead of running the script, so the test's own `assert!(expected.status.success())` precondition fails before any Bashkit behavior is compared. Gate it with the documented attribute, as required by knowledge/operations/testing.md ("A new oracle test needs the same attribute, or the nightly goes red"). Windows keeps byte-exactness coverage through the non-oracle tests in the same file. Claude-Session: https://claude.ai/code/session_01Wy7MBvn3d6d1NUGLBgnLEU
Review summary — #2955
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | ca57fc5 | Commit Preview URL Branch Preview URL |
Nov 19 2026, 09:53 AM |
Nine `heapless` 0.7.17 unsoundness advisories were published on 2026-11-18 (RUSTSEC-2026-0574 through 0582). Cargo scans run `--deny unsound` over every discovered lockfile, so `scripts/audit-lockfiles.sh` now fails on both the workspace lock and `crates/bashkit/fuzz/Cargo.lock`. The advisory database is fetched at job time, so this went red with nothing in the tree changed. `postcard` 1.1.3 is its newest release and requires `heapless ^0.7`, so there is no upgrade to a patched 0.9.4. But `heapless` is an optional postcard dependency and postcard's `default = ["heapless-cas"]` exists only to enable it. Both of our manifests asked for `features = ["alloc"]` while leaving default features on, so we pulled in heapless by accident: the only postcard APIs used here are `to_allocvec`, `from_bytes` and `to_slice`, all of which need `alloc` alone. Declaring postcard with `default-features = false` drops heapless and its chain (`atomic-polyfill`, `critical-section`, `hash32`, `spin`, `lock_api`, `rustc_version`) from both lockfiles. That also satisfies the recorded removal condition for RUSTSEC-2023-0089 (`atomic-polyfill`), which is now absent from every discovered lockfile, so the suppression is retired from `deny.toml` and the threat model rather than left to rot. The fuzz lockfile additionally carried pre-existing drift: re-resolving it picks up `nix` 0.32.0 and adds `encoding_rs`, `simdutf8`, `core_detect` and `multiversion_no_op`. That drift reproduces on an unmodified tree and `cargo fuzz build` does not pass `--locked`, so CI already resolved these. Verified: `scripts/audit-lockfiles.sh` exits 0 with no denied warnings across all six cargo lockfiles, `cargo deny check licenses sources` reports "licenses ok, sources ok", and `cargo vet --locked` succeeds. Claude-Session: https://claude.ai/code/session_01Wy7MBvn3d6d1NUGLBgnLEU
…tract `scripts/check_monty_fork.py` holds the fork manifests at upstream Monty 1.5.0 outside `bashkit fork:` markers, so turning postcard's default features off in `bashkit-monty` read as unrecorded drift and failed the `Lint` job. Mark the entry with the reason and a removal condition, the way the existing `getrandom` and `jiter` markers do. `knowledge/operations/dependencies.md` described a marker as covering a dependency's *version*. The check compares the whole dependency spec, so a feature or `default-features` divergence is markable too; postcard is the first of that kind, every marker before it being a version bump. Say so, and record why postcard diverges for a security reason rather than a shared-crate bump. Claude-Session: https://claude.ai/code/session_01Wy7MBvn3d6d1NUGLBgnLEU
What changed
Two independent CI-green fixes. They are bundled because the second blocks the
first from merging, and this session is authorized to push only one branch — see
Note on scope below.
1.
fix(deps): dropheaplessfrom the dependency graph. Our twopostcarddependencies now set
default-features = false. This removesheaplessand itschain (
atomic-polyfill,critical-section,hash32,spin,lock_api,rustc_version) from both the workspace and fuzz lockfiles, clearing nineunsoundness advisories. Now-obsolete suppression
RUSTSEC-2023-0089is retiredfrom
deny.tomland the threat model.2.
fix(test): gate the non-UTF-8 byte-tools oracle off unix.byte_stream_tests::byte_tools_match_real_bash_on_non_utf8_inputgains#[cfg_attr(not(unix), ignore = ...)], turning the Windows nightly green.No library or product behavior changes. No source file outside tests is touched.
Why
The heapless advisories (
Auditjob)Nine
heapless0.7.17 unsoundness advisories were published 2026-11-18:RUSTSEC-2026-0574, 0575, 0576, 0577, 0578, 0579, 0580, 0581, 0582. Cargo scans run
--deny unsoundover every discovered lockfile, soscripts/audit-lockfiles.shfails on both
./Cargo.lockand./crates/bashkit/fuzz/Cargo.lockwitherror: 9 denied warnings found!.The advisory database is fetched at job time, so this went red with nothing in the
tree changed.
mainis not red in GitHub's history only because its last run(04:09 UTC) predates the database carrying them; the next push or nightly on
mainwould have failed. This is precisely the drift the scheduled scan exists to catch.
postcard1.1.3 is its newest release and requiresheapless ^0.7, so there is noupgrade to the patched 0.9.4 — an ignore entry looked unavoidable. It is not.
heaplessis an optional postcard dependency, and postcard's feature table reads:postcard's default feature exists solely to enable heapless. Both of our manifests
asked for
features = ["alloc"]while leaving default features on, so we pulled inheapless entirely by accident. The only postcard APIs used in this repo are
to_allocvec,from_bytesandto_slice, all of which needallocalone.So this is a root-cause fix rather than a suppression: the unsound code leaves the
build instead of being accepted.
The retired suppression
RUSTSEC-2023-0089(atomic-polyfill) was suppressed with removal condition"Upstream drops the dependency", since it arrived via
postcard → heapless0.7.atomic-polyfillis now absent from every discovered lockfile. The threat modelrequires verifying "the advisory's own patched release, dependency removal, or
explicit upstream withdrawal rather than the scanner's silence" — this is dependency
removal, confirmed by grep across all six cargo lockfiles, so the entry is deleted
rather than left to rot.
The Windows nightly oracle
byte_tools_match_real_bash_on_non_utf8_inputlanded in #2945 without the platformgate that every other host-bash oracle in the file carries, and the Windows nightly
went red on its first run afterwards
(run 44462677580).
On
windows-latest,bashis the WSL launcher, which prints a UTF-16 "nodistribution installed" notice instead of running the script. The failure was in the
test's own precondition —
assert!(expected.status.success())atbyte_stream_tests.rs:263— before any Bashkit output was compared. Nothing abouttee/split/cutwas mismatching.This is the gate the knowledge contract already mandates in
knowledge/operations/testing.md: "A new oracle test needs the same attribute, orthe nightly goes red."
windows-nightly.yml's own header states the same intent, sono knowledge update is needed for this half.
I audited the rest of the nightly's scope for the same gap. Seven candidates surfaced
and all were already covered:
harness_example_testsvia module-level#[cfg(unix)],dev_fd_path_tests::stream_aliases_and_append_match_bashvia a runtimeif !cfg!(unix) { return; }, one regex false positive, anddiagnostic_prefix_testspasses on Windows as-is. Hence the one-line change.
Before / After
Audit —
./scripts/audit-lockfiles.sh, the exact failing step(run 44496424248):
Supporting dependency checks, both of which CI runs:
Windows nightly — verified on a real runner via
workflow_dispatchon thisbranch (run 44496429379, success):
Linux is unaffected; the oracle still executes and passes:
Risk
Specifics worth a reviewer's attention:
heapless-casonly adds
impls for heapless container types, which this repo never serializes; theencoding of our own types is unchanged. Snapshot round-trips in
zapcode_vendor/snapshot.rsand thebashkit-montypostcard tests cover this.never run correctly. Windows keeps byte-exactness coverage through the non-oracle
tests in the same file (
xxd_reverse_rebuilds_exact_bytes,sort_refuses_to_rewrite_non_utf8_file_in_place,binary_base64_head_cat_pipeline_preserves_exact_bytes, and others), which assertagainst fixed expected bytes rather than a host tool.
here. It is safe only because the crate is gone from the graph, not because the
scanner went quiet. If
postcardever re-enables heapless by default, the advisoriesreappear as hard failures rather than being silently accepted — which is the intended
direction.
Note on scope
These are two unrelated concerns and
AGENTS.mdprefers separate PRs. They aretogether here because the
Auditfailure blocks any PR from merging, including thenightly fix, and this session is authorized to push only
eve/clever-mccarthy-tkz93i.Splitting them would have required pushing a second branch without permission. Each
concern is a separate commit, so they remain independently reviewable and revertable.
The
crates/bashkit/fuzz/Cargo.lockdiff also carries pre-existing drift: it picksup
nix0.32.0 and addsencoding_rs,simdutf8,core_detectandmultiversion_no_op. I confirmed that drift reproduces on an unmodified tree, so it isnot from this change — any re-resolve produces it, and
cargo fuzz builddoes not pass--locked, so CI already resolved these. Only the heapless-chain removal in that fileis attributable here.
One unrelated pre-existing issue, reported but not fixed:
cargo deny check advisoriesfails on unmodified
mainoverchrono/chrono-tzbeing unmaintained. CI never runsthat subcommand (its cargo-deny step is
check licenses sources), and a currentcargo-deny is stricter than the pinned action, so the threat model's "keep the cargo
list and
deny.tomlin sync so a localcargo deny check advisoriesmatches CI" doesnot currently hold. Out of scope for a CI-green fix; flagging it for a decision.
Checklist
Generated by Claude Code