Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apidocs-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
workspaces: crates/bashkit-js

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
# pnpm/action-setup v6 no longer ships a default version; it reads
# `packageManager` from the root package.json, which this repo does
# not have (the field lives in crates/bashkit-js/package.json). Pin
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
# override even for `cargo install`), which broke this job. A prebuilt
# binary is immune to future tool-dependency MSRV bumps.
- name: Install cargo-audit
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: cargo-audit

Expand All @@ -228,7 +228,7 @@ jobs:
# from pnpm-lock.yaml, and the PyPI scan reads uv.lock with the stdlib,
# so neither ecosystem costs an install here.
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand All @@ -252,7 +252,7 @@ jobs:
command: check licenses sources

- name: Install cargo-vet
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
# 0.10.2+ parses trusted-publisher entries in imports.lock (wasmtime
# crates publish via GitHub trusted publishing); 0.10.0 rejects them.
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
- name: Install uutils coreutils multicall for differential tests
id: install_uutils
continue-on-error: true
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: coreutils
- name: Verify uutils on PATH
Expand Down Expand Up @@ -421,9 +421,9 @@ jobs:
persist-credentials: false

- name: Install Rust toolchain
# 1.96.0 comes from rust-toolchain.toml (the matrix pins the same);
# the action no longer accepts a `toolchain:` input.
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0
with:
toolchain: ${{ matrix.rust }}

- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

Expand Down Expand Up @@ -655,16 +655,27 @@ jobs:
with:
persist-credentials: false

- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
toolchain: nightly-2026-10-30
run: rustup toolchain install nightly-2026-10-30 --profile minimal

# Builds from source on the job's default toolchain, which is now the
# pinned stable; without this the unpinned tool would resolve to the
# newest release and an upstream MSRV bump would break an unchanged
# tree (the cargo-geiger 0.14.0 failure). Nightly outruns any released
# MSRV, so build it there, as the `toolchain:` input used to.
- name: Install cargo-fuzz
uses: taiki-e/cache-cargo-install-action@9ee83daaa7b96a6fab930949ecf1122bba04a389 # v3
env:
RUSTUP_TOOLCHAIN: nightly-2026-10-30
with:
tool: cargo-fuzz
locked: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Install cargo-tarpaulin
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: cargo-tarpaulin

Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: cargo-llvm-cov

Expand Down Expand Up @@ -151,12 +151,12 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: cargo-llvm-cov

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@ jobs:
with:
persist-credentials: false

- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
toolchain: nightly-2026-10-30
run: rustup toolchain install nightly-2026-10-30 --profile minimal

# On the nightly, not the pinned stable default: an unpinned source
# build on a pinned toolchain breaks when upstream raises its MSRV.
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
run: cargo +nightly-2026-10-30 install cargo-fuzz --locked

- name: Cache fuzz corpus
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
# and an OS, and a restored arm64 `target/` must not reach the x64
# build.
prefix-key: v0-rust-${{ matrix.target || 'host' }}
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6
Expand Down
40 changes: 23 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ jobs:
with:
persist-credentials: false

- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
- name: Install Rust nightly with Miri
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
toolchain: nightly-2026-10-30
components: miri
run: rustup toolchain install nightly-2026-10-30 --profile minimal --component miri

- name: Setup Miri
run: cargo +nightly-2026-10-30 miri setup
Expand Down Expand Up @@ -67,14 +70,14 @@ jobs:
# dependencies resolve unlocked, and an MSRV bump in one of them past our
# pinned toolchain broke this step once already in CI.
- name: Install cargo-audit
uses: taiki-e/install-action@682ce6c3c696a4cd5168a05f98e51aa02b877941 # v2
uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2
with:
tool: cargo-audit

# pnpm (and the node it needs) for the npm half of the scan; the PyPI
# half reads uv.lock with the stdlib. Neither needs an install step.
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -147,14 +150,17 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Install Rust nightly
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
toolchain: nightly-2026-10-30
components: rust-src
- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
# Pinned: nightly 2026-10-31 (rustc f9ceb4a4d) fails to compile bashkit
# (E0391 async-drop cycle on parser::ast::CommandList). Unpin once a
# later nightly builds `cargo +nightly check -p bashkit --lib`.
- name: Install Rust nightly with rust-src for build-std
run: rustup toolchain install nightly-2026-10-30 --profile minimal --component rust-src

- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
git checkout FETCH_HEAD -- crates/bashkit-js/__test__

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -353,7 +353,7 @@ jobs:
git checkout FETCH_HEAD -- crates/bashkit-js/__test__

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down Expand Up @@ -479,7 +479,7 @@ jobs:
# steps:
# - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# - name: Setup pnpm
# uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
# uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
# with:
# version: 10.33.0
# - name: Setup node
Expand Down Expand Up @@ -536,7 +536,7 @@ jobs:
run: test "$(git rev-parse HEAD)" = "$SOURCE_SHA"

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.33.0

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,14 @@ jobs:
# nightly satisfies our deps' MSRV (monty needs 1.96) + edition 2024;
# its LLVM matches Emscripten 4.0.9's binaryen. pyodide-build manages its
# own matching emsdk via the cross-build env (no setup-emsdk needed).
- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
- name: Install nightly Rust with the Emscripten target
# @nightly matches the repo's other nightly jobs; the exact nightly is
# pinned via the toolchain: input below.
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
toolchain: ${{ env.RUST_NIGHTLY }}
targets: wasm32-unknown-emscripten
run: rustup toolchain install ${{ env.RUST_NIGHTLY }} --profile minimal --target wasm32-unknown-emscripten

- name: Install pyodide-build
run: pip install "pyodide-build==${PYODIDE_BUILD_VERSION}"
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,14 @@ jobs:
# so it has to be recent; its LLVM (19+) matches Emscripten 4.0.9's
# binaryen, which is what avoids the wasm-opt target-feature skew that
# older Emscripten (3.1.x) hit. See knowledge/runtimes/emscripten-wheels.md.
- name: Install Rust stable (default toolchain)
uses: dtolnay/rust-toolchain@d86e0fa8f147d6539442c26a61ebba8becc19489 # 1.96.0

# The action no longer accepts a `toolchain:` input (it installs
# the rust-toolchain.toml toolchain), so install the pinned nightly
# explicitly below.
- name: Install nightly Rust with the Emscripten target
# @nightly matches the repo's other nightly jobs (fuzz.yml, nightly.yml,
# ci.yml); the exact nightly is pinned via the toolchain: input below.
uses: dtolnay/rust-toolchain@5b842231ba77f5c045dba54ac5560fed2db780e2 # nightly
with:
toolchain: ${{ env.RUST_NIGHTLY }}
targets: wasm32-unknown-emscripten
run: rustup toolchain install ${{ env.RUST_NIGHTLY }} --profile minimal --target wasm32-unknown-emscripten

- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.11.1
- name: Setup Node.js
Expand Down
20 changes: 17 additions & 3 deletions crates/bashkit/tests/integration/python_tenant_stress_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@

#![cfg(feature = "python")]

use bashkit::{Bash, PythonLimits};
use bashkit::{Bash, PythonLimits, SessionLimits};
use std::time::Duration;

/// Largest `BASHKIT_STRESS_ROUNDS` accepted, and the basis for the session
/// exec() headroom in `tenant`. Keep the two together: they drifted apart once
/// (see `tenant`) and the soak failed on the cap rather than on its subject.
const MAX_ROUNDS: usize = 1000;

fn rounds() -> usize {
std::env::var("BASHKIT_STRESS_ROUNDS")
.ok()
.map(|v| {
v.parse::<usize>()
.ok()
.filter(|n| (1..=1000).contains(n))
.unwrap_or_else(|| panic!("BASHKIT_STRESS_ROUNDS must be 1..=1000, got {v:?}"))
.filter(|n| (1..=MAX_ROUNDS).contains(n))
.unwrap_or_else(|| {
panic!("BASHKIT_STRESS_ROUNDS must be 1..={MAX_ROUNDS}, got {v:?}")
})
})
.unwrap_or(3)
}
Expand All @@ -33,6 +40,13 @@ fn tenant(limit_mib: usize, max_ms: u64) -> Bash {
.max_duration(Duration::from_millis(max_ms))
.max_recursion(200),
)
// The session exec() cap (1,000 by default) is not what these tests
// measure, and the soak multiplies their call counts straight through
// it: at BASHKIT_STRESS_ROUNDS=300 the budget-reuse test makes 3,000
// calls and died on the cap at call 1,000 with "session exec() call
// limit exceeded", never reaching what it asserts. Sized off
// MAX_ROUNDS so the largest soak this file can ask for still fits.
.session_limits(SessionLimits::default().max_exec_calls(20 * MAX_ROUNDS as u64))
.env("BASHKIT_ALLOW_INPROCESS_PYTHON", "1")
.build()
}
Expand Down
Loading
Loading