Skip to content

ci: pass --locked to the cargo commands of hermetic and pg-adapter - #202

Merged
aRustyDev merged 1 commit into
mainfrom
ci/locked-builds
Nov 16, 2026
Merged

aRustyDev merged 1 commit into
mainfrom
ci/locked-builds

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

The first of the review's smaller CI fixes (.agents/plans/cicd-review/PLAN.md, PR 4's list).

What

hermetic and pg-adapter now pass --locked to every cargo command:

  • nextest;
  • the doctests;
  • the OpenAPI tests;
  • the Postgres and SMTP Docker suites.

lint and deny already did. Before this, a Cargo.lock that no longer matched the manifests was rewritten on the runner, and the tests ran against dependencies nobody committed.

Cargo has no config key or environment variable for --locked (only --offline has one, net.offline), so the flag goes on each command.

Control

I made a copy of the workspace and changed its Cargo.toml so that it no longer matches Cargo.lock:

  • With --locked: each of the five commands stops before compiling, with exit 101 or 102, and names the lock file. Cargo.lock is left as it was.
  • Without it: Cargo rewrites the copy's Cargo.lock.

Not changed

scripts/contract.sh and scripts/mutants.sh, which the contract cells and mutants run and developers run locally. A change that makes the lock stale also changes a Cargo.toml or Cargo.lock, and plan-ci.py runs lint (clippy with --locked) for every such change.

Docs: cicd.md (the "still open" list) and running.md (the job table).

Refs: #49

🤖 Generated with Claude Code

`lint` and `deny` already pass --locked. `hermetic` (nextest, the
doctests, the OpenAPI tests) and `pg-adapter` (the Postgres and SMTP
Docker suites) did not, so a Cargo.lock that no longer matches the
manifests was rewritten on the runner. The tests then ran against
dependencies nobody committed. Cargo has no config key or environment
variable for --locked, so it goes on each command.

Control, in a copy of the workspace whose Cargo.toml no longer
matches Cargo.lock:
- Each of the five commands stops before compiling, exit 101 or 102,
  naming the lock file. Cargo.lock is left as it was.
- Without the flag, Cargo rewrites the copy's Cargo.lock.

The contract cells and `mutants` build through scripts/contract.sh and
scripts/mutants.sh, which developers run locally too. They are left
alone. A change that makes Cargo.lock stale also changes a Cargo.toml
or Cargo.lock. plan-ci.py runs `lint`, whose clippy passes --locked,
for every such change.

Refs: #49
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant