Skip to content

chore(ci): restore lint as Linux build cache writer#9305

Merged
jdx merged 2 commits intomainfrom
claude/elegant-lumiere-15fff3
Apr 22, 2026
Merged

chore(ci): restore lint as Linux build cache writer#9305
jdx merged 2 commits intomainfrom
claude/elegant-lumiere-15fff3

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 22, 2026

Summary

Why

After #9297 (release-plz save-if: false) and #9298 (lint save-if: false), no Ubuntu job remained that saved the shared build cache. The other jobs with shared-key: build that still save (unit on macOS, windows-unit) use different per-OS cache entries, so the Linux build entry 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 recent release-plz run didn't restore a fresh cache.

lint is a good writer choice: it runs the most thorough build (cargo clippy --all-features --all-targets plus cargo deny/msrv/machete), producing the most complete target/ for downstream restorers.

Test plan

  • Next main push: verify lint job saves the build cache and subsequent PRs restore it

This 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 lint job’s Swatinem/rust-cache configuration to save the shared build cache only on refs/heads/main, ensuring the Ubuntu cache entry is refreshed.

Updates .prettierignore to 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.

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-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This PR restores the Linux Rust build cache writer by changing save-if: false back to save-if: ${{ github.ref == 'refs/heads/main' }} on the lint job's rust-cache step. Without this, no Ubuntu job was writing the shared build cache entry after #9297 and #9298, leaving it at risk of LRU eviction. Two docs files are also added to .prettierignore to prevent prettier from collapsing GitHub alert callout syntax in them going forward.

Confidence Score: 5/5

Safe 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 save-if expression is standard GitHub Actions syntax correctly handled by Swatinem/rust-cache. The .prettierignore additions are purely preventive. No P0 or P1 findings remain.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/test.yml Restores save-if: ${{ github.ref == 'refs/heads/main' }} on the lint job's rust-cache entry, re-enabling the Linux build cache writer on main-branch pushes.
.prettierignore Adds docs/backend-plugin-development.md and docs/url-replacements.md to prevent prettier from collapsing GitHub alert callout syntax in those files.

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
Loading

Reviews (2): Last reviewed commit: "fix(docs): revert prettier-mangled GitHu..." | Re-trigger Greptile

Comment thread docs/backend-plugin-development.md Outdated
Comment thread docs/url-replacements.md Outdated
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]>
@jdx jdx merged commit eede2a8 into main Apr 22, 2026
17 checks passed
@jdx jdx deleted the claude/elegant-lumiere-15fff3 branch April 22, 2026 18:40
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

medium

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)

medium

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.

@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

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 ⚠️ 176ms -15%
ls (cached) 79ms 81ms -2%
bin-paths (cached) 83ms 86ms -3%
task-ls (cached) 808ms 792ms +2%

⚠️ Warning: install cached performance variance is -15%

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