Commit Graph
62 Commits
Author SHA1 Message Date
Defame1297andClaude Sonnet 5.5 72e9813394 fix(dev-setup): quote the hook path, read core.hooksPath NUL-safely and lift an empty value
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 7s
The repository path is shell-quoted (printf %q) where it is written into the
installed hooks, so a path with spaces, quotes or $(...) is data. The local
core.hooksPath values are read with -z and compared and restored element by
element, so a value with a newline survives; the loop avoids mapfile. Any local
value, including an empty or trailing empty one, is lifted for the install and
restored. tests/scripts/test_dev_setup.py covers it with stub tools in throwaway
repositories, and lint.yml now runs tests/scripts.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:52:32 +00:00
Defame1297andClaude Sonnet 5.5 b5751e14d6 fix(build): harden the Collection archive check and refuse source symlinks
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 6s
Molecule / molecule (pull_request) Successful in 30s
check_tarball.py now compares path components case-insensitively (.GIT,
Molecule), rejects backslashes and control or zero-width characters,
duplicate members, an empty archive and a missing REQUIRED file, and
reports an unreadable archive as one line. Drop the shebang and the
executable bit and pass check= to subprocess.run so ansible-test sanity
passes.

ansible-galaxy dereferences symlinks, which the archive check cannot see,
so the Build workflow fails when the source tree holds a symlink.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:20:48 +00:00
Defame1297andClaude Sonnet 5.5 4fabe1358e fix(ci): make check_image_versions pass ansible-test sanity and harden its input handling
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 7s
Molecule / molecule (pull_request) Successful in 35s
Sanity (pylint, shebang) failed the Build check: drop the shebang and the
executable bit, simplify a comprehension, define functions instead of
assigning lambdas and pass check= to every subprocess.run.

Read the changed files with git diff -z so non-ASCII paths are compared
unquoted. Validate the matrix shape (non-empty list of mappings, string
name/version/dockerfile/subpath, no duplicate names) with one-line errors.
Match semver with fullmatch and reject leading zeros. Let a pin end at
, ) ] } or a quote. Document the known limits.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:16:30 +00:00
Defame1297andClaude Sonnet 5.5 74a5a0739b fix(dev-setup): install the restore trap first and fail clearly on a global hooksPath
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 6s
Install the EXIT/INT/TERM traps before core.hooksPath is lifted, make the
restore idempotent, and save and restore every local value of a
multi-valued setting in order. When a global or system value still applies
after the local one is lifted, print the script's own message and exit 1
before pre-commit runs. Note that readlink -f/-m are GNU.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 19:05:20 +00:00
Defame1297andClaude Sonnet 5.5 580df0b892 fix(build): reject links, special files and unsafe paths in the Collection archive
Build / build (pull_request) Failing after 8s
Lint / lint (pull_request) Successful in 5s
Molecule / molecule (pull_request) Successful in 35s
check_tarball.py now iterates the tar members instead of their names. Only regular
files and directories are allowed, so a symlink or hardlink cannot smuggle a
file in under an allowed directory. Absolute paths and paths with an empty, '.',
'..' or '.git' component are rejected, so roles/../.venv/x no longer passes the
top-level allow list. Tests build crafted tarballs and run the script on them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:54:11 +00:00
Defame1297andClaude Sonnet 5.5 8a0c5bf3dd fix(ci): harden check_image_versions against renames, odd refs and parse errors
Build / build (pull_request) Failing after 11s
Lint / lint (pull_request) Successful in 8s
Molecule / molecule (pull_request) Successful in 32s
Renamed or moved input files now count as touched (git diff --no-renames), so a
rename can no longer hide a changed image input. The base ref must be a plain ref
name and is passed after --end-of-options. Parse and git failures exit 1 with a
one-line message instead of a traceback. Prerelease versions compare per semver
(numeric identifiers numerically, numeric below alphanumeric). Whole-line YAML
comments are ignored when looking for pins.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:50:51 +00:00
Defame1297andClaude Sonnet 5.5 19faa49a4c fix(dev-setup): derive the repository from the script, rename PYTHON to KAMINO_PYTHON
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 7s
The script took its repository from the caller's working directory, so running it
from another repository could create or remove that repository's .venv. It now
resolves its own location (symlinks included) and uses git -C for every call.
The interpreter variable is KAMINO_PYTHON, and the usage comment no longer claims it
always selects the venv interpreter. A core.hooksPath that resolves to the
repository's own hooks directory is lifted for the install and restored; any
other value is still rejected.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:48:07 +00:00
Defame1297andClaude Sonnet 5.5 e3acab9ca2 fix(build): keep repository tooling and molecule scenarios out of the Collection archive
Build / build (pull_request) Failing after 9s
Lint / lint (pull_request) Successful in 6s
Molecule / molecule (pull_request) Successful in 28s
Extend galaxy.yml build_ignore (extensions, role molecule scenarios, CLAUDE.md, tool
directories, tests/scripts) and add scripts/check_tarball.py, an allow-list check run
by the Build workflow after the Collection build and before galaxy-importer.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:23:42 +00:00
Defame1297andClaude Sonnet 5.5 a51090192e ci: check image pins and image version bumps in Lint
Build / build (pull_request) Failing after 10s
Lint / lint (pull_request) Successful in 6s
Molecule / molecule (pull_request) Successful in 30s
Add scripts/check_image_versions.py (pins mode, and bump mode on pull requests) with
unit tests, and run both plus the scripts' tests in lint.yml. tests/scripts is added
to galaxy.yml build_ignore.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:22:03 +00:00
Defame1297andClaude Sonnet 5.5 4ed03b508a fix(scripts): make dev-setup.sh check Python, core.hooksPath and the installed hooks
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 5s
Require Python 3.11+ (PYTHON selects the interpreter), rebuild a virtualenv made
by an older Python, exit early when core.hooksPath is set, fail clearly when a
hook was not installed, and resolve the hook path with --path-format=absolute.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:20:47 +00:00
Defame1297andClaude Sonnet 5.5 44470c3bc3 chore: add scripts/dev-setup.sh and a CLAUDE.md for working in this repository
Build / build (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 6s
dev-setup.sh creates the virtualenv with the pinned tools and installs the git
hooks with the virtualenv first on PATH inside the hook scripts. Without that,
the language: system hooks (REUSE, changelog lint, ansible-lint) fail with
"No such file or directory: 'reuse'" on a plain `git commit`; found while testing
the hooks in a fresh clone.

CLAUDE.md records the rules of the repository for Claude Code: commit with git
so the hooks run (the Gitea API skips them, which let four lint failures reach
CI), feature branches and protected main/tags, the workflow rules, how the
images are versioned and pinned, and the 100 MB layer limit. It is written for
a repository that will be public: no addresses, no host names beyond the
public Gitea.

CONTRIBUTING.md points at the script.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 16:36:37 +00:00
Defame1297andClaude Sonnet 5.5 a317ec3e93 docs: add REUSE licensing files for GPL-3.0-or-later
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-24 21:10:20 +00:00