Skip to content

ci: add CI with an MSRV-enforcement job#2

Merged
yuanhao merged 3 commits into
mainfrom
feat/ci
Jul 11, 2026
Merged

ci: add CI with an MSRV-enforcement job#2
yuanhao merged 3 commits into
mainfrom
feat/ci

Conversation

@yuanhao

@yuanhao yuanhao commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What

The repo had no PR CI — only the release-triggered publish workflow. That's how 0.4.0/0.4.1 shipped a let-chain (requires Rust 1.88) while declaring rust-version = "1.85": Cargo never verifies the declaration, and nothing else did either. Downstream, yoagent's 1.86 MSRV job broke and had to carve the crate out (yologdev/yoagent#68 → fixed in #1 here).

Two jobs, modeled on yoagent's CI:

  • Check & Test (stable): cargo fmt -- --check · cargo clippy --all-targets under -Dwarnings · cargo test (with a git identity — the git_store tests commit)
  • MSRV (1.85): cargo check --all-targets on the declared rust-version — the enforcement that makes the 0.4.1 class of drift impossible. Any future >1.85 construct fails the PR instead of failing downstream consumers.

Also in this PR (required by the new gates)

  • cargo fmt over src/state.rs (tree wasn't fmt-clean)
  • The one clippy finding fixed: tests/run_chaining.rs .filter(..).last().rfind(..)

Verification (local)

clippy -Dwarnings --all-targets: 0 findings · fmt clean · 27/27 tests pass. The PR's own CI run is the first live execution of both jobs.

🤖 Generated with Claude Code

yuanhao and others added 3 commits July 11, 2026 13:56
The repo had no PR CI at all — only the publish workflow. Two jobs:

- Check & Test (stable): fmt --check, clippy --all-targets under
  -Dwarnings, cargo test (with a git identity for the git_store tests).
- MSRV (1.85): cargo check --all-targets on the DECLARED rust-version.
  Cargo never verifies rust-version against the code — 0.4.0/0.4.1 shipped
  a let-chain (needs Rust 1.88) while declaring 1.85, silently breaking
  downstream MSRV builds (yologdev/yoagent#68). This job makes that class
  of drift impossible: any future construct above 1.85 fails the PR.

Also brings the tree up to the new gates: cargo fmt over src/state.rs, and
the test-side DoubleEndedIterator lint fixed (.filter().last() -> .rfind()).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The CI runner's newer clippy (1.97) flags collapsible_match here. Safe:
guard fall-through lands on the catch-all no-op arm — identical semantics
to the nested if (verified by the run_chaining tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…timeouts

Review findings: uuid/getrandom sit at exactly rust-version 1.85 — without
--locked, a lock regeneration could pull a 1.86-MSRV patch and silently
break (or mask regressions in) the 1.85 gate. Also: cancel superseded runs,
least-privilege token, and job timeouts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yuanhao yuanhao merged commit 707d769 into main Jul 11, 2026
2 checks passed
@yuanhao yuanhao deleted the feat/ci branch July 11, 2026 12:32
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