Skip to content

book-contracts.yml: delete the three rust-cache steps — cache-bin false was never the fix (PMAT-3539) - #3540

Merged
noahgift merged 6 commits into
mainfrom
PMAT-3539-book-contracts-rust-cache
Sep 20, 2026
Merged

noahgift merged 6 commits into
mainfrom
PMAT-3539-book-contracts-rust-cache

Conversation

@noahgift

@noahgift noahgift commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Closes #3539. Ticket PMAT-3539. Part of the fleet-wide fix for paiml/infra#775; the infra-side guard is paiml/infra#778 (merged) and the call-site PRs go out alongside it so the nightly shared-cargo-home lane is never unpassable.

What was wrong

chapter-examples-compile, chapter-examples-run and book-integration-tests all run on [self-hosted, Linux, X64, clean-room] and carried Swatinem/rust-cache@v2 with cache-bin: "false". Each step's own comment explained the reasoning — the post step prunes ~/.cargo/bin, all 16 listeners share one $CARGO_HOME, and that input prevents it (infra#208, #320, #381).

It skips cleanBin and nothing else. The save step also runs cleanRegistry, unconditionally, deleting ${CARGO_HOME}/registry/src — the extracted crate sources every OTHER job on the box is compiling from at that moment.

Measured on intel 2026-09-19: eight rust-cache save steps in 100 minutes; every crate directory under the shared registry with a birth time pinned to the second one of them finished; an infra cargo kani build killed mid-crate with could not parse/generate dep info at .../serde_core-<hash>.d: No such file or directory.

This is aprender#2822's message, and the reaper is not the only cause of it

aprender#2822 attributes could not parse/generate dep info … No such file or directory to the ci-reaper. In the measured case the reaper had last run 27 minutes earlier, and the run after it logged swept=0. rust-cache is a second, independent cause of the same message.

The replacement comments say so at each site, because the practical consequence is a debugging rule: before naming the reaper, check the clock —

journalctl -u ci-reaper.service --since -2h
grep -l 'Post Run Swatinem/rust-cache' ~/data/actions-runner-*/_diag/Worker_*.log

— and check whether the failing thing compiles at all (a step that touches no crate sources cannot be hit by this mechanism).

Change

The three steps are deleted, not reconfigured: on a persistent runner ~/.cargo persists between jobs by itself, so the restore is a no-op and the save is the entire effect. Only a job-private CARGO_HOME would make the action safe — --target-dir, cargo install --root and a fresh $HOME do not, because cargo reads crate sources from $CARGO_HOME whatever the target dir is.

Measured

paiml/infra main's machines/clean-room/shared-home-guard/check.sh over the changed file prints no VIOLATION (it printed three before), and sweeping every other aprender workflow through the same guard produces no BLOCK anywhere else. grep -c 'uses: Swatinem/rust-cache' on book-contracts.yml: 3 → 0. No other file changes.

🤖 Generated with Claude Code


keep-open: #2822 is cited as evidence, not fixed here. This PR removes the last rust-cache site in aprender, which is ONE of that issue's causes — the same dep-info error also arrives from the ci-reaper's keep-N purge deleting a live build tree (infra, _reaper_unit_is_live) and from other repos' rust-cache saves still deleting the shared registry/src on the same host. #2822 closes when a run of aprender CI produces the error with none of those three present, which is a measurement nobody has taken yet.

@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=3540 head=4b9e20d5376963f11c58720ead8f40205999ce41 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "dbfb772b6566746cad86a27cdc2ba5210db53e74",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "FAIL",
   "findings": 3
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "39d5dc0c206eb9233b521842745128309dadd3e7",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 2
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

noahgift pushed a commit that referenced this pull request Sep 20, 2026
Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift enabled auto-merge September 20, 2026 07:41
@noahgift noahgift added this to the 0.69.0 milestone Sep 20, 2026
@noahgift
noahgift disabled auto-merge September 20, 2026 12:28
… never the fix

Rebuilt on main rather than merged. `git merge origin/main` is refused by
the pmat pre-commit complexity gate (main already contains the code the
hook objects to, but a merge commit re-authors it), `gh pr update-branch`
answers "Cannot update PR branch due to conflicts", and --no-verify is
banned. So: checkout origin/main, restore only the paths this PR authors,
re-aggregate the roadmap from its fragments, one squashed commit.

Scoped rather than taken wholesale, because the trap in rebuilding is
that the whole branch diff includes files where the branch is merely
BEHIND main and checking those out reverts main. Asserted per file:
66/-27 in .github/workflows/book-contracts.yml, and +118/+21/+21 with
ZERO deletions in the three doc files. Every deletion in this diff is in
the workflow, which is what the PR is for.

Guard-tree was the reason the head had to move at all: this branch was
based at 338f1d4, before #3557 discharged PP-LLAMA-001 rows 1 and 2, so
its §12 still read them OPEN and past-expiry and spec_conformance failed
on a tree that had nothing to do with this change.

Auto-merge was DISARMED before the rebuild, not after. A force-push does
not disarm GitHub auto-merge -- measured on #3538 an hour ago, where the
arming survived a force-push and sat live against a head no quorum had
judged.

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift force-pushed the PMAT-3539-book-contracts-rust-cache branch from 8abd8bd to 626c83d Compare September 20, 2026 12:31
@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "626c83dd447bdd5dfe06187fed49e0e8aa01dcef",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "NO-VERDICT",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "FAIL",
   "findings": 2
  },
  {
   "lane": 3,
   "verdict": "FAIL",
   "findings": 2
  }
 ]
}

…t exist

Quorum r1 failed on both lanes, correctly and for the same reason: the
criterion said "exactly two files change" and the diff has four. The
criterion was wrong, not the diff.

Two files this row authors -- book-contracts.yml and its own fragment --
and two the repository requires alongside them: roadmap.yaml, which is
GENERATED by `make roadmap-aggregate` and cannot be omitted when a
fragment is added, and the committed quorum receipt. The criterion
predated both of those files existing.

The constraint it was actually protecting is kept and sharpened: no
source, no test, no ci.yml, and every deletion in the diff is inside
book-contracts.yml -- 66/-27 there, +118/+21/+21 with zero deletions in
the three doc files.

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "92babaf36e486fcecd0f2a13d23aedb99e326eb4",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 4
  },
  {
   "lane": 2,
   "verdict": "NO-VERDICT",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "92babaf36e486fcecd0f2a13d23aedb99e326eb4",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

Round 1 failed on both lanes for the same true reason: the criterion
said "exactly two files change" and the diff has four. Round 2 was a
lane infrastructure NO-VERDICT, re-run rather than judged. Round 3
judges the amended criterion.

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…agment

DIRTY from the aggregate, not from a content disagreement: ONT-6b (#3538)
merged and regenerated docs/roadmaps/roadmap.yaml, which this branch also
regenerates for its own fragment. Resolved the only way that is correct
for a generated file -- take main's, re-run `make roadmap-aggregate`, and
let PMAT-3539's fragment re-enter the aggregate. 929 base + 42 fragments.

Disarmed before the merge, not after. A force-push or a merge does not
clear GitHub's auto-merge, so an armed PR whose head moves is armed on a
head no quorum has judged.

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "53478d5b8601a7b1b56849bb8775e1c66f395f26",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "FAIL",
   "findings": 1
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

…lf rewrites

Round 4 lane 2 refused, correctly: the criterion claimed +118/+21/+21 for
the three doc files and docs/audits/quorum-PMAT-3539.json now adds 84
lines.

The lesson is not that the number was stale, it is that the number was
UNCITABLE. That file is the committed quorum receipt and it is REWRITTEN
BY EACH ROUND, so any criterion quoting its line count is false again the
moment the next round runs -- including the round that would verify the
correction. A criterion may not cite a measurement of an artifact the
review process itself rewrites.

Replaced with the invariant it was actually protecting, which is stable
across rounds: every deletion in this diff is inside book-contracts.yml,
and the three doc files are purely additive. Measured now:
  book-contracts.yml  +66/-27
  quorum-PMAT-3539.json  +84/-0
  entries/PMAT-3539.yaml +21/-0
  roadmap.yaml           +21/-0

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3539",
 "head": "21d77dee545386f022c2faa973861700c79b9be7",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

Round 4 refused the criterion for citing a line count of the quorum
receipt, which each round rewrites. Round 5 judges the invariant that
replaced it: every deletion is inside book-contracts.yml.

Pmat-Ticket: PMAT-3539
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift enabled auto-merge September 20, 2026 15:50
@noahgift
noahgift added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit 3863d08 Sep 20, 2026
53 of 57 checks passed
@noahgift
noahgift deleted the PMAT-3539-book-contracts-rust-cache branch September 20, 2026 18:36
@noahgift noahgift mentioned this pull request Sep 21, 2026
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.

book-contracts.yml: three rust-cache steps delete the shared registry/src (paiml/infra#775; the other cause of aprender#2822's message)

1 participant