chore(ci): restore lint as Linux build cache writer#9305
Conversation
After #9297 and #9298, no Ubuntu job was saving the shared `build` rust-cache entry anymore — release-plz, build-ubuntu, lint, autofix, registry, release-fig, and test-plugins all had save-if: false, and the only savers on shared-key: build (unit/macos, windows-unit) use different OS-partitioned cache entries. The Linux entry would go stale and eventually get evicted with no path to refresh it. Re-enable the lint job as the writer on main, since it's the most thorough build (cargo clippy --all-features --all-targets + cargo deny/msrv/machete) and produces the most complete target/. Also pick up pre-existing prettier formatting drift in two docs files flagged by the pre-commit hook. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Greptile SummaryThis PR restores the Linux Rust build cache writer by changing Confidence Score: 5/5Safe to merge — minimal CI config fix with no production code changes. The change is a targeted, well-justified one-liner reverting a prior CI misconfiguration. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Push to main / PR event] --> B{github.ref == refs/heads/main?}
B -- true --> C[lint job runs on ubuntu-latest]
B -- false --> D[lint job runs on ubuntu-latest]
C --> E[rust-cache SAVE shared-key: build]
D --> F[rust-cache RESTORE ONLY shared-key: build]
E --> G[Downstream jobs restore fresh Linux build cache]
F --> G
Reviews (2): Last reviewed commit: "fix(docs): revert prettier-mangled GitHu..." | Re-trigger Greptile |
The previous commit's prettier autoformat collapsed multi-line `> [!WARNING]\n> ...` GitHub-style alerts into a single line (`> [!WARNING] > ...`), which vitepress parses as an unclosed HTML tag and fails the docs build. Restore the two docs files to their main-branch content and add them to .prettierignore alongside the other docs entries already there, so prettier won't re-break them. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request modifies the documentation for backend plugin development and URL replacements by collapsing GitHub Alert warning blocks into single lines. Feedback indicates that this change breaks the markdown rendering on GitHub, as the [!WARNING] marker must be on its own line to be recognized as an alert. Suggestions were provided to restore the correct syntax.
I am having trouble creating individual review comments. Click here to see my feedback.
docs/backend-plugin-development.md (47)
The GitHub Alert syntax requires the [!WARNING] marker to be on its own line at the beginning of the blockquote. Collapsing it into a single line with the content (and adding a nested blockquote marker >) will prevent it from rendering correctly as an alert box on GitHub. Please keep the marker on a separate line.
> [!WARNING]
> **Version sorting**: The versions returned by BackendListVersions should be in ascending order (oldest to newest), sorted semantically (version 3.10.0 should not come before 3.2.0). Mise does not apply any additional sorting to the versions returned by this method.
docs/url-replacements.md (143)
This change breaks the GitHub Alert rendering for the warning block. The [!WARNING] marker must be on its own line to be recognized as an alert by GitHub's markdown renderer. Collapsing it into the same line as the header text will cause it to be rendered as literal text within a blockquote.
> [!WARNING]
> **Credential Leaking**: When using url_replacements, any authentication headers (like Authorization: Bearer <TOKEN>) generated for the original URL (e.g., api.github.com) are **preserved** and sent to the replaced URL.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.18 x -- echo |
23.5 ± 0.7 | 22.9 | 34.2 | 1.00 |
mise x -- echo |
24.6 ± 0.7 | 23.5 | 29.7 | 1.05 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.18 env |
23.9 ± 0.7 | 22.8 | 30.5 | 1.00 |
mise env |
24.3 ± 1.3 | 22.9 | 35.5 | 1.02 ± 0.06 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.18 hook-env |
24.8 ± 1.4 | 23.3 | 39.6 | 1.00 |
mise hook-env |
25.2 ± 1.5 | 23.6 | 34.2 | 1.02 ± 0.09 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.18 ls |
20.8 ± 0.5 | 20.1 | 27.2 | 1.00 |
mise ls |
22.5 ± 1.6 | 20.9 | 33.4 | 1.08 ± 0.08 |
xtasks/test/perf
| Command | mise-2026.4.18 | mise | Variance |
|---|---|---|---|
| install (cached) | 148ms | -15% | |
| ls (cached) | 79ms | 81ms | -2% |
| bin-paths (cached) | 83ms | 86ms | -3% |
| task-ls (cached) | 808ms | 792ms | +2% |
Summary
lintas the Linux writer of the sharedbuildrust-cache entry onmain(revert the save-side of chore(ci): stop lint from saving build cache #9298)Why
After #9297 (release-plz save-if: false) and #9298 (lint save-if: false), no Ubuntu job remained that saved the shared
buildcache. The other jobs withshared-key: buildthat still save (uniton macOS,windows-unit) use different per-OS cache entries, so the Linuxbuildentry had no writer at all. It would stay stuck at whatever was saved before #9298 and eventually be evicted (7-day LRU / 10GB cap) with nothing to refresh it — which is why the most recentrelease-plzrun didn't restore a fresh cache.lintis a good writer choice: it runs the most thorough build (cargo clippy --all-features --all-targetspluscargo deny/msrv/machete), producing the most completetarget/for downstream restorers.Test plan
mainpush: verify lint job saves thebuildcache and subsequent PRs restore itThis PR was generated by an AI coding assistant.
Note
Low Risk
Low risk CI-only change that adjusts cache save conditions and ignores additional docs files; main impact is cache freshness and workflow performance.
Overview
Re-enables Linux CI cache writes by changing the
lintjob’sSwatinem/rust-cacheconfiguration to save the sharedbuildcache only onrefs/heads/main, ensuring the Ubuntu cache entry is refreshed.Updates
.prettierignoreto ignore two additional docs files (docs/backend-plugin-development.md,docs/url-replacements.md).Reviewed by Cursor Bugbot for commit a2cfec8. Bugbot is set up for automated code reviews on this repo. Configure here.