Skip to content

check-for-epoch-bump: enforce epoch bump when package moves between dirs#33

Merged
xnox merged 2 commits intochainguard-dev:mainfrom
xnox:xnox/epoch-bump-across-package-dirs
Apr 27, 2026
Merged

check-for-epoch-bump: enforce epoch bump when package moves between dirs#33
xnox merged 2 commits intochainguard-dev:mainfrom
xnox:xnox/epoch-bump-across-package-dirs

Conversation

@xnox
Copy link
Copy Markdown
Member

@xnox xnox commented Apr 25, 2026

Summary

  • When a package is moved between os/, enterprise-packages/, and extra-packages/, the script now tries all three candidate paths on main to find the previous version/epoch.
  • Previously, a moved package would appear as brand-new (version 0 / epoch 0) so the bump check was silently skipped.
  • Falls back to the original single-path lookup for files outside those three directories.

Test plan

  • Modify a file under os/ with the same version/epoch — confirm warning is emitted
  • Move a package from enterprise-packages/foo/foo.yaml to os/foo/foo.yaml without bumping epoch — confirm warning is emitted
  • Move a package and bump the epoch — confirm check passes

🤖 Generated with Claude Code

When a package is moved between os/, enterprise-packages/, and
extra-packages/, look up all three candidate paths on main so the
previous version/epoch is found and a bump is still required.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@xnox xnox requested a review from a team April 25, 2026 22:22
@dustinkirkland
Copy link
Copy Markdown
Member

Hmm, there is a lint error:

Error: The action actions/cache@v4 is not allowed in chainguard-dev/pre-commit-hooks because all actions must be pinned to a full-length commit SHA.

@xnox
Copy link
Copy Markdown
Member Author

xnox commented Apr 27, 2026

Hmm, there is a lint error:

Error: The action actions/cache@v4 is not allowed in chainguard-dev/pre-commit-hooks because all actions must be pinned to a full-length commit SHA.

Filed:

@xnox xnox added the tbr To be reviewed label Apr 27, 2026
@xnox xnox merged commit 5d51fbe into chainguard-dev:main Apr 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tbr To be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants