Repository navigation
ci: reject invalid symlink targets - #372
Merged
Merged
Conversation
There was a problem hiding this comment.
Approved — I found no actionable issues in this change.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
akira28
approved these changes
Sep 25, 2026
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.
PR #368 briefly broke
elastic/docs-actions@v1because a formatter appended a newline to the Git blob fordocs-builder/preview/cleanup/scripts/retry.js. Git accepted the blob as a mode120000symlink, but GitHub Actions could not resolve the resulting target name.This PR adds a repository-level symlink integrity check to the existing pre-commit validation path. The checker reads mode
120000entries from the Git index and inspects their blob bytes directly. It rejects empty targets and targets that contain NUL, CR, or LF bytes.The check does not depend on the filesystem representation. It still works when
core.symlinks=falsecauses Git to materialize symlinks as regular text files. The hook usesalways_run, so the existing pre-commit CI workflow runs it for every pull request without adding another workflow.Validation:
main.fc75592from PR Allow public auto-triage and upgrade gh-aw to v0.89.21 #368 and identifiesdocs-builder/preview/cleanup/scripts/retry.js.git diff --checkpassed.This is the merge-time backstop. A separate PR makes
make lintnon-mutating so the same class of problem is also prevented during local and agent validation.Related to #404