fix(ci): tighten the Collection archive check and make its guards testable
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 8s
Molecule / molecule (pull_request) Successful in 29s

The forbidden names widen to anything containing "vault", SSH keys, .envrc and
.env* files. Names that Windows or macOS extraction would read differently are
rejected (trailing space or dot, reserved device names, "::", 8.3 aliases of
.git, non-ASCII spaces, surrogate/private-use/unassigned characters, components
over 255 bytes), and the .git test compares after NFKC and case folding.
Duplicates are compared case-insensitively, a name that is both a file and a
directory is rejected, and only one slash is stripped. A unit test builds a real
tarball with ansible-galaxy, another asserts the directories build.yml prunes are
in galaxy.yml build_ignore, lint.yml runs tests/scripts, and the Build workflow
fails unless exactly one tarball matches. The docstring states that file
symlinks are invisible to the archive check.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-10-25 19:57:40 +00:00
1 parent b5751e14d6
commit cab2187c89
5 files changed
+215 -20

No files matched your search

@@ -9,3 +9,8 @@ minor_changes:
that lacks MANIFEST.json, FILES.json, COPYING, README.md, meta/runtime.yml or
changelogs/changelog.yaml, and on symlinks in the source tree (which ansible-galaxy would
dereference).
- >-
The archive check also rejects any file name containing "vault", SSH key and .envrc/.env* files, names that Windows or macOS extraction
would read differently (trailing space or dot, reserved device names such as CON or NUL, "::", 8.3 aliases of .git, non-ASCII spaces,
surrogate, private-use and unassigned characters, components over 255 bytes), case-insensitive duplicates and a name used as both a
file and a directory. The Build workflow fails with a clear message unless exactly one tarball was built.