Stop hard-coding the previous checkout SHA in lint workflow tests - #620
Stop hard-coding the previous checkout SHA in lint workflow tests#620justin808 wants to merge 4 commits into
Conversation
…nt-checkout-pin * origin/main: Complete the human-facing workflow documentation (#610)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Important Approval pendingCodeRabbit has no unresolved comments, but it has not reviewed the latest commit. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
WalkthroughThe lint test now parses the workflow YAML and validates checkout ordering, disabled credential persistence, and checkout action references without hard-coding one checkout SHA. Additional tests cover rewritten references, case variants, and YAML anchors and aliases. ChangesCheckout contract validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change makes lint workflow tests resilient to legitimate checkout-pin updates while preserving the existing security checks; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue Full details: Description checkExplanation The description explains the problem, scope, linked issue, implementation, and validation results. It does not follow the required template because it omits the Resolution Add the required
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ReviewSolid, well-scoped fix. Summary of what I checked: Correctness
No bugs or security issues found. Minor, non-blocking observation: |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e73321514
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ReviewI independently re-verified this fix (structural checkout-contract parsing, ordering assertion, This matches the analysis in the existing review comment on this PR, which I concur with, including the non-blocking observation that Left one additional minor nit inline: the No blocking issues. |
ReviewSolid fix for the underlying problem: pinning the lint workflow contract test to one literal Correctness
Quality nit (posted inline)
Process note
No security or performance concerns — this is entirely test-code scoped to CI contract validation, and the change reduces coupling to a specific commit SHA rather than introducing new external inputs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74a902ef68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ReviewOverviewThis PR replaces a brittle, hard-coded CorrectnessI traced through all three new tests by hand against the actual
Code quality
Risks
Overall: solid, well-tested fix for the root cause in #605 (test coupling to a specific historical SHA). The structural approach is a clear improvement over the previous brittle string match. |
Why
The lint workflow test encoded one historical actions/checkout commit, so a legitimate dependency update failed Validate even when the repository security policy accepted the new immutable pin.
Fixes #605.
What changed
Validation
Hosted exact-head Lint, Validate, Claude review, and CodeRabbit checks are green on
84d732191207b5f9c300dcb7f0de34de57cb37eb; all review threads are resolved.Summary by CodeRabbit