docs: correct root-action pin guidance and add a pin regression contract - #33
Merged
Merged
Conversation
The documented root-action pin drifted across files and the release-tag guidance was not true against live repository state. - llms.txt still pinned 1a70edc (PR #24) after the audited pin moved to 671e8db (PR #31), so the agent-facing quickstart and the human-facing README told consumers to use different commits. - README.md, SECURITY.md, and llms.txt all said to replace the audited commit "with an immutable release tag when one exists". Tags v0.1.0, v0.1.1, and v0.2.0 do exist, but every one of them predates the root action.yml: at v0.2.0 the only action file is .github/actions/pygate/action.yml. A consumer following that guidance gets a workflow that cannot resolve the action at all. Both files now state the actual constraint, and a new offline regression contract asserts that every documented root-action reference is a 40-character commit SHA and that all documented pins agree. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015pyyWgRC2kvjk6fXauNWZM
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe documentation now uses the audited root-action commit and explains why existing release tags cannot reference the root action. A regression test checks that all documented references are immutable 40-character commit SHAs and use one consistent pin. ChangesAction pin consistency
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes two defects in the documented adoption path for the root GitHub Action, and adds an offline regression contract so neither can silently return.
llms.txtpinned a superseded commit. It referenced1a70edc12bfd19e633983e0819b648bb2a5dda4e(feat(action): preflight full-mode dependencies #24) whileREADME.md,SECURITY.md, and.github/workflows/example-usage.ymlreferenced671e8db37c2bd124d4b74653f8c81945d1592a8f(ci: refresh and harden GitHub Action dependencies #31). The pin refresh in ci: refresh audited root action pin #32 did not reach the agent-facing file.README.md,SECURITY.md, andllms.txteach said to replace the audited commit "with an immutable release tag when one exists." Tags do exist — and none of them works.Why
A consumer who follows the current documentation either copies a different commit depending on which file they read, or follows the release-tag advice and gets a workflow that fails outright.
The tags
v0.1.0,v0.1.1, andv0.2.0version thepygate-cipackage on PyPI. All three predate the rootaction.yml: atrefs/tags/v0.2.0(da37115, 2026-08-10) the only action file in the tree is.github/actions/pygate/action.yml. The root action, and the full-mode dependency preflight whose outputs the README documents, both landed afterwards in1a70edc(2026-08-17). So there is currently no release tag that ships the documented action contract, and@v0.2.0fails with a missing-action error rather than degrading to an older gate.This is the first thing a new adopter copies, so it is worth being exactly right.
How
llms.txt: pin corrected to the audited671e8dbcommit.README.md(Pinning policy),SECURITY.md(Action pinning),llms.txt: the "when one exists" guidance is replaced with the actual constraint — pin the audited commit; the published tags predate the rootaction.ymland do not resolve as an action reference; prefer a tag once one is cut at or after the root action landed.tests/test_docs_action_pin.py: new offline contract overREADME.md,SECURITY.md,llms.txt, and.github/workflows/example-usage.yml, asserting each documents a root-action reference, that every reference is a 40-character commit SHA (rejecting both tags and mutable branch refs, per the stated policy), and that all documented pins agree.No source, action, or schema behaviour changes.
Verified the contract actually catches the shipped defect: restoring the original
1a70edcvalue inllms.txtfailstest_documented_pins_agreewith both pins named in the message; restoring the fix passes.Follow-up, not in this PR: cutting a release tag at or after the root action landed would let this guidance recommend a tag instead of a SHA, which is a materially easier thing for an adopter to copy. That is a release decision and is left to the maintainer.
Test Plan
pytest— 161 passed, including the 3 new contract tests)ruff check src/ tests/,ruff format --check src/ tests/)pyright src/— 0 errors, 0 warnings)Generated by Claude Code
Summary by CodeRabbit
Documentation
Tests