fix(release): exclude relay symlink chains from source archive + guard it in prek#845
Merged
potiuk merged 2 commits intoJul 12, 2026
Merged
Conversation
added 2 commits
July 12, 2026 22:18
…rchive ATR's upload validator rejects the .claude/skills / .github/skills / .kiro/skills relay symlinks (they chain through .agents/skills/*, which a safe extractor reads as a target outside the entry). Export-ignore the relay dirs, keep the single-hop .agents/skills/* view (resolves to real skills/*), and repoint the template + spec references from .claude/skills to .agents/skills so they resolve in the archive.
…symlinks
The 0.1.0-rc1/rc2 uploads were -1'd / rejected because the source archive
carried symlink *chains*: the .claude/.github/.kiro relay dirs point at
.agents/skills/*, which are themselves symlinks. ATR's upload validator
refuses a symlink whose target is itself a symlink ("target outside
extraction directory"), so the whole upload failed.
Add a third symlink-lint rule (`--archive`) that builds the source archive
exactly as the release does (git archive --worktree-attributes of the
staged tree, honouring .gitattributes export-ignore) and rejects any
symlink a safe extractor refuses:
- chain — target is itself a symlink (the ATR rejection)
- dangling — target got export-ignored, orphaning the link
Wire it as the `symlink-lint-archive` prek hook, fired whenever
.gitattributes, an agent-view skills/ tree, skills/, or
projects/_template/ changes — the inputs that shape the archive — so a
regression fails the commit before an RC is ever cut. release-verify-rc
still re-checks the same property against the unpacked tarball.
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.
Why
The
0.1.0-rc1source archive was-1'd (binding) and therc2upload wasrejected by ATR with:
Root cause: the committed agent-view relay dirs (
.claude/skills/,.github/skills/,.kiro/skills/) are symlink chains — eachmagpie-<skill>link points at../../.agents/skills/magpie-<skill>, whichis itself a symlink. A safe extractor (ATR's upload validator) refuses to
follow a symlink whose target is another symlink and reads it as escaping the
extraction dir, failing the whole upload.
What
.gitattributes—export-ignorethe three relay dirs. Only thesingle-hop
.agents/skills/*view (which points straight at realskills/*dirs) ships; it resolves cleanly for any extractor..agents/stays in the release so the shipped links still resolve.
projects/_template/*.mdlinks andtools/spec-loop/specs/*test -fpaths now use
.agents/skills/*.symlink-lint --archiverule +symlink-lint-archiveprek hook —builds the source archive exactly as the release does (
git archive --worktree-attributesof the staged tree, honouringexport-ignore) andfails the commit on any symlink chain or dangling link. This is what breaks
an RC upload; the hook now catches it before an RC is cut.
release-verify-rcalready re-checks the same property against the unpacked tarball.
Verification
Built the archive from this branch:
.agents/skills/*single-hop → real dirs.pyc/__pycache__symlink-lint,skill-and-tool-validate,spec-validateall passNew pytest cases lock rule 3 (chain flagged, export-ignored chain clean,
dangling flagged,
--archiveexit codes).