ci: allow scripts/challenge/pins.env as version-bump metadata - #319
Conversation
A Lean toolchain bump must move LEAN4EXPORT_COMMIT in scripts/challenge/pins.env in the same PR — lean4export reads the oleans our build produces, so the pin is tied to lean-toolchain. Add it to the guard's bump-metadata allowlist so bump PRs (e.g. #295) can carry it alongside content, exactly like the toolchain and manifest files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Greptile SummaryThis PR extends the
Confidence Score: 5/5Safe to merge — all three locations (regex, header comment, error message) are updated consistently, and the rationale for the exemption is technically sound. The change is a one-line regex addition with two accompanying documentation updates. The regex Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/content-pr-guard.yml | Adds scripts/challenge/pins.env to the bump-metadata allowlist in three consistent places: the header comment, the bump_metadata_re regex (correctly escaped and anchored), and the human-readable error message. No other logic is altered. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR files] --> B{Any content files?}
B -- No --> Z1[✓ Non-content-only PR]
B -- Yes --> C{Any non-content files?}
C -- No --> Z2[✓ Content-only PR]
C -- Yes --> D{All non-content files\nmatch bump_metadata_re?}
D -- Yes --> Z3[✓ Version-bump PR allowed]
D -- No --> Z4[✗ FAIL: mixed content\nand non-content]
style Z3 fill:#2d8a4e,color:#fff
style Z1 fill:#2d8a4e,color:#fff
style Z2 fill:#2d8a4e,color:#fff
style Z4 fill:#c0392b,color:#fff
subgraph bump_metadata_re [bump_metadata_re allowlist]
M1[lean-toolchain]
M2[lakefile.toml]
M3[lake-manifest.json]
M4[docbuild/lean-toolchain / docbuild/lakefile.toml / docbuild/lake-manifest.json]
M5[scripts/challenge/pins.env NEW]
M6[.github/workflows/content-pr-guard.yml]
end
D -- checked against --> bump_metadata_re
Reviews (1): Last reviewed commit: "ci: allow scripts/challenge/pins.env as ..." | Re-trigger Greptile
Summary
scripts/challenge/pins.envto the content-PR guard's version-bump metadata allowlist (regex, header comment, and error-message listing).LEAN4EXPORT_COMMITinpins.envmust matchlean-toolchain— lean4export reads the oleans our build produces — so a toolchain bump has to move it in the same PR, exactly like the toolchain and manifest files already exempted.Test plan
bump_metadata_reagainst chore: bump Lean and Mathlib to v4.33.0-rc1 #295's full non-content file list: all seven bump files pass; an arbitrary neighbor (scripts/challenge/verify-solution.sh) is still rejected.🤖 Generated with Claude Code