Skip to content

Harden the scheduled workflows - #90

Merged
madonoharu merged 2 commits into
mainfrom
phase06/ci-hardening
Aug 17, 2026
Merged

Harden the scheduled workflows#90
madonoharu merged 2 commits into
mainfrom
phase06/ci-hardening

Conversation

@madonoharu

@madonoharu madonoharu commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Follow-ups on the scheduled workflows from #87, found while reviewing them against what they actually guarantee.

  • Pin cargo-expand. Its output shape feeds the snapshots, so an unpinned upgrade shows up as codegen drift and gets misattributed to a dependency release — exactly the signal this workflow exists to isolate.
  • Concurrency groups. The bot branch is force-pushed and the tracking issue is decided per run, so a manual dispatch overlapping the nightly run could have them overwrite each other.
  • Stage before diffing. git diff --quiet -- tests misses the snapshot for a newly added test, which stays untracked until staged.
  • Drop checkout credentials in latest-deps, which only builds and tests.

Also unifies PR CI with the same setup action: the pin only covered half the pipeline, since PR CI compares the very snapshots the nightly workflow regenerates but installed its own unpinned cargo-expand. That removes the last uses of the archived actions-rs/* actions too.

Still open (bigger, kept separate): the expand workflow holds contents/pull-requests/issues: write for the whole job, including dependency resolution and the build. Splitting it into a read-only expand job that uploads the diff as an artifact and a write-scoped job that pushes would confine the token.

🤖 Generated with Claude Code

madonoharu and others added 2 commits August 17, 2026 10:02
- Pin cargo-expand: its output shape feeds the snapshots, so an unpinned
  upgrade reads as codegen drift and misattributes the cause.
- Add concurrency groups: the bot branch is force-pushed, and the tracking
  issue is decided per run, so overlapping runs would fight each other.
- Stage before diffing, so a snapshot for a newly added test is not missed
  while it is still untracked.
- Drop the checkout credentials in latest-deps, which never pushes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pin only covered half the pipeline: PR CI compares the expansion
snapshots that the nightly workflow regenerates, but installed its own
unpinned cargo-expand, so the two could expand with different versions.

Also drops the archived actions-rs/{toolchain,cargo} actions in favour of
rustup and plain cargo, as the composite action already did.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@madonoharu
madonoharu force-pushed the phase06/ci-hardening branch from 7f48beb to 0c24dd1 Compare August 17, 2026 01:12
@madonoharu madonoharu self-assigned this Aug 17, 2026
@madonoharu
madonoharu merged commit 1d5510a into main Aug 17, 2026
3 checks passed
@madonoharu
madonoharu deleted the phase06/ci-hardening branch August 17, 2026 01:28
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