Skip to content

chore(ci): lint and test the release configuration, and gate merges on it - #2606

Merged
robcohen merged 4 commits into
mainfrom
chore/ci-slim-lint-test
Oct 11, 2026
Merged

robcohen merged 4 commits into
mainfrom
chore/ci-slim-lint-test

Conversation

@robcohen

Copy link
Copy Markdown
Member

What

Release binaries are built --no-default-features plus mimalloc / ag-rledger (#2541). Every CI job that runs clippy or the unit tests builds --all-features, and Slim Build (no wasmtime), the only job that touches the release configuration, was not in the required build gate.

It was in fact red on main when this PR was opened: 612e162f's run has Slim Build (no wasmtime) = failure and build = success. The step #2593 added (cargo test ... release_build_) dies with could not execute process `sccache ...` because the workflow sets RUSTC_WRAPPER=sccache and this job never installed it. The earlier cargo tree step never invokes the wrapper, which is why the job passed before.

This PR changes slim-build-no-wasmtime in .github/workflows/ci.yml:

  • Installs sccache (mozilla-actions/sccache-action, the same pin the other jobs use) and the clippy component. Sets RUST_MIN_STACK as the ci job does.
  • Clippy (release configuration), each with --all-targets -- -D warnings:
    • -p rustledger --no-default-features --features mimalloc,ag-rledger
    • the three crates whose feature sets change in that build, each run separately so its features are not unified with another package's: -p rustledger-plugin --no-default-features (no runtimes), -p rustledger-importer --no-default-features --features toml-config, -p rustledger-loader (defaults: no wasm-plugins / python-plugins).
  • Tests (release configuration): cargo test with the same four package/feature sets.
  • Keeps the named release_build_ step, and makes it fail if no release_build_ test ran.
  • Path filter. The job now runs on should_build OR a new slim filter: crates/rustledger{,-loader,-plugin,-importer}/** (fixtures and snapshots, which are not *.rs), scripts/check-slim-no-wasmtime.sh, and ci.yml itself. Before, a change to the ratchet script or this workflow skipped it.
  • Gate. The job is in build's needs. Its result is checked before the should_build early exit, as vscode-extension's is, because a ci.yml-only PR runs it with should_build false. It must be success or skipped, and success whenever should_build is true.

No Rust code changes were needed: every one of those configurations is clippy-clean and passes locally on main (#2593 already gated the 9 extract tests).

How tested

  • Locally on main + this branch, all through nix develop:
    • clippy -D warnings is clean for all four configurations.
    • cargo test: rustledger slim has 533 lib + 11 ag-rledger + 28 rledger unit tests plus every integration binary passing, including cli_commands_test with 60. rustledger-plugin without default features: 115 + 189 + others. rustledger-importer with toml-config: 227 + others. rustledger-loader at defaults: 123 + others. 0 failures.
  • actionlint (nixpkgs): the same 10 findings on main and on this branch, all pre-existing shellcheck notes. Nothing new.
  • The gate is shown to bite. The first push carried a temporary commit (d22aa069) adding a test that fails only without python-plugin-wasm. The result is in the comment below. That commit is then reverted.

Closes #2605

🤖 Generated with Claude Code

https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr

robcohen and others added 2 commits October 11, 2026 13:57
…n it

Release binaries build --no-default-features plus mimalloc/ag-rledger, but
every job that ran clippy or unit tests built --all-features, and the
Slim Build job was not in the required `build` gate. It was red on main
(no sccache installed for its cargo test step) while `build` stayed green.

The slim job now runs clippy -D warnings and cargo test for rustledger in
the release configuration and for rustledger-plugin, rustledger-importer
and rustledger-loader in the feature sets that build gives them; installs
sccache; has its own path filter (those crates' fixtures, the ratchet
script, ci.yml); and is checked by `build` ahead of the should_build exit.

Closes #2605

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
@robcohen
robcohen requested a review from a team as a code owner October 11, 2026 14:28
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Shape rustledger beancount Speedup RSS (rledger / beancount)
simple 45.3ms ± 0.9ms 819.1ms ± 4.4ms 18.1x 51.2 MB / 50.0 MB
investment 70.8ms ± 1.5ms 3041.7ms ± 34.9ms 43.0x 57.3 MB / 58.2 MB
fifo 71.2ms ± 0.7ms 15548.9ms ± 303.2ms 218.5x 57.3 MB / 57.9 MB

vs base, measured in this run

Shape base this PR Change RSS base → PR
simple 45.5ms ± 0.9ms 45.3ms ± 0.9ms -0.4% ✅ within noise 51.2 MB → 51.2 MB (+0.1%)
investment 70.1ms ± 0.7ms 70.8ms ± 1.5ms +1.0% ✅ within noise 57.1 MB → 57.3 MB (+0.3%)
fifo 71.2ms ± 0.7ms 71.2ms ± 0.7ms -0.1% ✅ within noise 57.2 MB → 57.3 MB (+0.2%)

A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: simple 0.6ms, investment 0.7ms, fifo 0.5ms), and is at least 5%.
10,000 transactions per shape · 20 runs, 3 warmup · hyperfine

What do these numbers mean?
  • simple — Two-posting transfers, one currency. The historical workload — keep as the floor, not as the benchmark.
  • investment — Cost specs, per-unit prices and lot reductions. Exercises booking and inventory, which simple leaves at 0.3%.
  • fifo — Bare {} reductions against a FIFO account — how FIFO sells are normally written. The other four shapes reach the ordered-selection path twice in 2k transactions between them, so it was effectively unprofiled until it turned out to be quadratic (plan_ordered scans every lot per reduction: FIFO ledgers are quadratic (8.8s at 20k transactions) #2083).
  • vs base: the PR and the base-branch commit it is built on, built and measured in the same job
  • RSS: peak resident set size, a single sample — reported without a verdict because there is no spread to test it against
  • A shape with no beancount column is one bean-check reports errors on; it is timed for rledger only

It showed a red slim job turns build red (run 38147291713).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
@robcohen

robcohen commented Oct 11, 2026 •

Copy link
Copy Markdown
Member Author

Gate probe

The first push (d22aa069) carried a temporary test, crates/rustledger/tests/zz_slim_gate_probe.rs, that panics only without python-plugin-wasm. Run 38147291713:

  • Slim Build (no wasmtime): failure. Clippy passed; Tests (release configuration) failed on slim_gate_probe ... FAILED.
  • build: failure, with slim-build-no-wasmtime result: failure / slim-build-no-wasmtime (the release configuration) must pass.
  • Every --all-features job passed, as expected. Before this PR, that is exactly the case where build stayed green.

The probe is removed in the next commit.

(SemVer (plugin-types) is red here and on main's 612e162f too. It is not in build.)

Review loop

Round Scope Finding Fix
1 A re-read of the whole ci.yml diff: the feature sets per crate against Cargo.toml (the loader keeps defaults, plugin has none, importer has only toml-config), the slim filter, and the gate ordering The named release_build_ step piped cargo test into tee under GitHub's default bash -e, which has no pipefail. Only the result grep caught a failure, and a compile error read as "no release_build_ test ran". 6175ebad: set -o pipefail. Shown locally: bash -e -c 'false | tee …; echo x' continues; with pipefail it exits 1.
2 6175ebad's own run: the change is ci.yml-only, so should_build was false. Slim Build still ran (the slim filter) and passed, and build was green. The probe run had already shown build goes red on a slim failure. none n/a

The loop converged at round 2. Required checks are green on 6175ebad.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100% (raw 93%, 179 masked)
Full AST Match 100%
Total Files 819
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
    The headline is the EFFECTIVE rate, after pairs where beanquery
    itself is wrong are masked. raw is the same run with nothing
    masked. A widening gap means the registry grew, not that rledger
    changed.
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

The default bash -e has no pipefail, so tee hid a failing cargo test;
only the result grep caught it, and a compile error read as "no
release_build_ test ran".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: lint and test the slim (release) configuration, and make it required

1 participant