You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/07/12 20:52:23 UTC

[PR] fix(release): exclude relay symlink chains from source archive + guard it in prek [magpie]

potiuk opened a new pull request, #845:
URL: https://github.com/apache/magpie/pull/845

   ## Why
   
   The `0.1.0-rc1` source archive was `-1`'d (binding) and the `rc2` upload was
   rejected by ATR with:
   
   > Extraction failed: symlink target outside extraction directory:
   > apache-magpie-0.1.0/.claude/skills/magpie-audit-finding-fix
   
   Root cause: the committed agent-view relay dirs (`.claude/skills/`,
   `.github/skills/`, `.kiro/skills/`) are symlink **chains** — each
   `magpie-<skill>` link points at `../../.agents/skills/magpie-<skill>`, which
   is *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-ignore` the three relay dirs. Only the
     single-hop `.agents/skills/*` view (which points straight at real
     `skills/*` dirs) ships; it resolves cleanly for any extractor. `.agents/`
     stays in the release so the shipped links still resolve.
   - **Repoint shipped references** off the now-excluded relay view:
     `projects/_template/*.md` links and `tools/spec-loop/specs/*` `test -f`
     paths now use `.agents/skills/*`.
   - **New `symlink-lint --archive` rule + `symlink-lint-archive` prek hook** —
     builds the source archive exactly as the release does (`git archive
     --worktree-attributes` of the staged tree, honouring `export-ignore`) and
     fails 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-rc`
     already re-checks the same property against the unpacked tarball.
   
   ## Verification
   
   Built the archive from this branch:
   - 69 symlinks, all `.agents/skills/*` single-hop → real dirs
   - 0 chains, 0 dangling, 0 `.pyc`/`__pycache__`
   - `symlink-lint`, `skill-and-tool-validate`, `spec-validate` all pass
   
   New pytest cases lock rule 3 (chain flagged, export-ignored chain clean,
   dangling flagged, `--archive` exit codes).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(release): exclude relay symlink chains from source archive + guard it in prek [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #845:
URL: https://github.com/apache/magpie/pull/845


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org