1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# I108 (ISSUES.md, 2026-06-21): --workspace so the chisel-py PyO3 binding
# is linted too. Plain `cargo clippy` honors default-members = [".", "bench"],
# which excludes python/, so ~1,300 lines of binding Rust shipped unlinted
# (fmt --check already walked it; only clippy had the hole). pyo3's
# `extension-module` feature means no libpython link during a check, so this
# runs on the bare clippy runner without a Python/maturin setup.
- name: Clippy
run: cargo clippy --workspace -- -D warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
# I54 (ISSUES.md, 2026-05-22): supply-chain advisory check via cargo-audit.
# Runs against the RustSec advisory database. Currently the root crate
# ships with only `xxhash-rust` and `libc` as production deps — both
# well-maintained — so the practical risk surface is small. Catches any
# vulnerable transitive dep that creeps in via a future change.
#
# Permissions notes:
# * `pull-requests: write` lets the action post per-line annotations
# on PR runs.
# * `checks: write` is needed on push-to-main runs — without it the
# action's annotation-posting step trips "Resource not accessible
# by integration" because GitHub restricts GITHUB_TOKEN's check-run
# write scope on push events by default.
#
# No `ignore:` list right now. The previous RUSTSEC-2025-0020 ignore
# (pyo3 0.22.x PyString::from_object overflow) was removed when I75
# landed and bumped pyo3 from 0.22 to 0.24 (patched in 0.24.1+). If
# a future advisory needs ignoring, file an ISSUES.md entry
# explaining why before adding the ignore — don't let the list
# accumulate silently.
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
# Run cargo audit directly rather than rustsec/audit-check, which is
# pinned to the deprecated Node 20 runtime (it has no Node 24 release).
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- run: cargo audit
# I55 (ISSUES.md, 2026-05-22): pin MSRV in CI. Cargo.toml declares
# rust-version = "1.82" (the floor stabilized by Option::is_none_or in
# src/page_cache.rs). This job installs exactly that toolchain and runs
# `cargo build` to verify the floor still works — catches any new code
# that requires a newer Rust without an accompanying release-notes call-out.
#
# I61 (ISSUES.md, 2026-05-22): `-p chisel-storage` scopes the build to the
# library crate ONLY (published package name; the library itself is still
# `chisel` via [lib].name in Cargo.toml). The MSRV promise is about what
# users see when they depend on it — bench is internal tooling whose heavy
# deps (criterion, rusqlite, redb, rand → getrandom, clap → clap_lex,
# ...) are now adopting `edition2024` faster than we want to bump our
# floor. Bench can lag the library's MSRV without affecting any
# downstream consumer.
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.82
- uses: Swatinem/rust-cache@v2
with:
key: msrv
# I110 (ISSUES.md, 2026-06-21): lib-only ON PURPOSE. `--tests` was tried
# and reverted — it pulls proptest's transitive `getrandom` (which now
# requires `edition2024`, i.e. Rust 1.85+), so chisel's TEST tree floats
# above the 1.82 library floor for the same reason bench/python do (I61).
# The MSRV promise is about the published library, which this verifies.
- name: Build chisel library with MSRV toolchain
run: cargo build --verbose -p chisel-storage
# I58 (ISSUES.md, 2026-05-22): a dedicated `bench-tests` job once
# ran `cd bench && cargo test --verbose` because bench/ was a
# sibling crate (not workspace member), and `cargo test` from root
# didn't cover it. I61 made bench/ a workspace member with
# `default-members = [".", "bench"]`, so the `test` job's
# `cargo test --verbose` now exercises chisel AND chisel-bench in
# one shot. The standalone bench-tests job became redundant and
# was removed.
python:
needs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
python-version:
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: python
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Create virtualenv
working-directory: python
run: python -m venv .venv
- name: Install maturin and test deps
working-directory: python
run: |
. .venv/bin/activate
pip install --upgrade pip
pip install maturin pytest hypothesis
# `maturin develop --release` builds without debug_assertions, so the
# Python end-to-end test run here never exercises engine debug-assert
# invariants (e.g. page_cache::claim_page_asserts_on_dirty_page).
# That is a known, accepted coverage boundary: engine debug-assert
# invariants are covered by the Rust `test` job above, which builds
# in debug mode.
- name: Build and install
working-directory: python
run: |
. .venv/bin/activate
maturin develop --release
- name: Run tests
working-directory: python
run: |
. .venv/bin/activate
pytest -v