ci: every committed Cargo.lock is current #227

Merged
dcharlot merged 1 commit from ci/lockfiles-current into main 2026-10-13 00:55:37 -04:00
Owner

A new workflow, lockfiles, with one short job on the linux runner.

Why. The workspaces here depend on one another by path. A version bump in one leaves the lockfiles of its dependents behind, and nothing says so until a job that passes --locked fails on a change that never touched it. Stale locks have failed jobs this way repeatedly.

What it does. For each directory that holds a tracked Cargo.lock, scripts/check-lockfiles.sh runs cargo update --workspace --locked: cargo resolves the workspace against its lock and fails if the lock would change. No crate is downloaded and nothing is built; a cold run over the whole tree takes about half a minute. A stale lock is named together with the command that regenerates it. A lock that could not be checked (no network, a manifest that does not parse) fails the run under its own heading, so it is never read as current.

No paths: filter. A filter on this forge matches the files of the push, not of the pull request, so a later push that touches no manifest would leave the head without a run of this check. The job is short enough to run on every push.

One directory is skipped, with its reason in the script: the vendored crate under jouledesk-rs/vendor, which cargo resolves against its parent workspace's lock. A skip entry that no longer names a lockfile fails the run.

Evidence.

  • scripts/check-lockfiles-selftest.sh (run by the job) builds a scratch workspace and shows the check passes a current lock and fails four broken ones: a bumped path dependency, an added dependency, a missing lock, and a manifest that does not parse.
  • On this tree, bumping one workspace's version (sandbox-rs) made the check name eight stale workspaces, each a path dependent; restored, it passes.
  • With the check made to always exit 0, the self-test fails four of its five cases.
  • check-workflow-concurrency.sh passes with the new workflow.

🤖 Generated with Claude Code

A new workflow, `lockfiles`, with one short job on the `linux` runner. **Why.** The workspaces here depend on one another by path. A version bump in one leaves the lockfiles of its dependents behind, and nothing says so until a job that passes `--locked` fails on a change that never touched it. Stale locks have failed jobs this way repeatedly. **What it does.** For each directory that holds a tracked `Cargo.lock`, `scripts/check-lockfiles.sh` runs `cargo update --workspace --locked`: cargo resolves the workspace against its lock and fails if the lock would change. No crate is downloaded and nothing is built; a cold run over the whole tree takes about half a minute. A stale lock is named together with the command that regenerates it. A lock that could not be checked (no network, a manifest that does not parse) fails the run under its own heading, so it is never read as current. **No `paths:` filter.** A filter on this forge matches the files of the push, not of the pull request, so a later push that touches no manifest would leave the head without a run of this check. The job is short enough to run on every push. **One directory is skipped,** with its reason in the script: the vendored crate under `jouledesk-rs/vendor`, which cargo resolves against its parent workspace's lock. A skip entry that no longer names a lockfile fails the run. **Evidence.** - `scripts/check-lockfiles-selftest.sh` (run by the job) builds a scratch workspace and shows the check passes a current lock and fails four broken ones: a bumped path dependency, an added dependency, a missing lock, and a manifest that does not parse. - On this tree, bumping one workspace's version (sandbox-rs) made the check name eight stale workspaces, each a path dependent; restored, it passes. - With the check made to always exit 0, the self-test fails four of its five cases. - `check-workflow-concurrency.sh` passes with the new workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: every committed Cargo.lock is current
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 2m24s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m28s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 53s
standards workspaces build + test / aac-rs (pull_request) Successful in 2m37s
standards workspaces build + test / map-rs (pull_request) Successful in 56s
standards workspaces build + test / mesh-rs (pull_request) Successful in 51s
standards workspaces build + test / openpay (pull_request) Successful in 3m25s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 52s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m4s
lockfiles / every Cargo.lock is current (pull_request) Successful in 44s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m22s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m7s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m13s
standards workspaces build + test / jcp-rs (pull_request) Successful in 2m51s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m17s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m22s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m14s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m23s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m51s
e22955434f
The workspaces here depend on one another by path, so a version bump in one
leaves its dependents' lockfiles behind. Only jobs that pass --locked notice,
and they fail on changes that never touched them. This job resolves each
workspace against its lock on every push (cargo update --workspace --locked:
no crate is downloaded and nothing is built) and names the stale ones with the
command that fixes each. A self-test shows the check fails on a bumped path
dependency, an added dependency, a missing lock and an unparseable manifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!227
No description provided.