Commit Graph
16 Commits
Author SHA1 Message Date
Dragonish 4058978353 ci(deps): pin hook revisions by SHA and install dev tools from a hashed lock
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 1m42s
Molecule / molecule (pull_request) Successful in 5m23s
Refs #113.

- .pre-commit-config.yaml: every hook repo is pinned by commit SHA with the release in a
  `# frozen:` comment, so a moved tag cannot change the code a hook environment is built from.
- requirements-dev.lock: hashed lock of requirements-dev.txt. Installs use
  `pip install --require-hashes -r requirements-dev.lock -r requirements-dev.txt` (dev-setup.sh,
  the ci image, the fallback install of Lint and Build): pip refuses an unhashed package and any
  disagreement between the two files.
- scripts/lock-requirements.sh regenerates the lock (pinned pip and pip-tools, --upgrade mode).
- renovate.json: the pip-compile manager replaces pip_requirements for the lock, plus a weekly,
  never automerged lock-file maintenance PR for transitive packages. Not yet dry-run on Renovate.
- check_bot_pr_diff.py accepts `rev: <sha>  # frozen: <tag>` and lock entries, hashes and plain
  comments, but not a changed pip-compile header command.
- ci image 0.2.18 -> 0.2.19 (image inputs changed).
2026-11-14 16:52:38 +00:00
Defame1297andClaude Sonnet 5.5 18a7e26e4f ci(hooks): run ansible-test sanity before a push
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 30s
Molecule / molecule (pull_request) Successful in 5m22s
Add a pre-push hook that runs scripts/ansible-test-sanity.sh, so the Build job's sanity check, which ruff and the other hooks do not cover (it failed on a name only its pylint disallows), stops a push instead of the pull request. It is pre-push and not pre-commit because a cold run builds virtualenvs and needs the network; CI's pre-commit run does not run that stage, and a local system hook builds no environment. pre-push joins default_install_hook_types, and dev-setup.sh and its test treat it like the other two hook types, so its hook script also gets the virtualenv on PATH.

Verified through git push --dry-run in a throwaway clone: a commit with a disallowed name inside a function is blocked (exit 1, the same pylint message as CI, failed to push), and the push passes once it is removed.

Image input: .pre-commit-config.yaml is baked into the ci image, so ci 0.2.17 -> 0.2.18 (scripts/bump_image_versions.py). The new hook adds no hook environment and no layer size; the merge builds 0.2.18 and a pin PR follows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 15:52:35 +00:00
Defame1297andClaude Sonnet 5.5 bdb34cf98e fix(dev): run ansible-lint against the clone's pinned collections from any shell
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 43s
Molecule / molecule (pull_request) Failing after 49s
The hook scripts written by dev-setup.sh exported ANSIBLE_HOME and ANSIBLE_COLLECTIONS_PATH, so only a hook run through git commit saw the pinned collections; a bare pre-commit run fell back to the control host's ~/.ansible, the drift #118 removes. The ansible-lint hook now runs scripts/ansible-lint.sh, which uses .ansible/collections of the clone when ANSIBLE_COLLECTIONS_PATH is unset, fails with the fix when they are missing, and leaves a preset path (CI's /opt/collections) alone. dev-setup.sh keeps installing the collections and no longer edits the hook scripts beyond the PATH block it always wrote.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 14:14:37 +00:00
Defame1297andClaude Sonnet 5.5 bb57077fb3 build(dev): install the pinned collections in dev-setup
dev-setup.sh installs requirements.yml into .ansible/collections of the clone and
exports ANSIBLE_HOME and ANSIBLE_COLLECTIONS_PATH from the hook scripts, so local
ansible-lint resolves the collection versions CI does and not the control host's
~/.ansible (#118, part of #80). The install scopes the path to its target so a
copy elsewhere is not skipped as already installed. A hook written by the previous
version gains only the new block.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 13:52:09 +00:00
Defame1297andClaude Sonnet 5.5 4d330d41c7 ci(molecule): run only the scenarios of the roles a pull request changes
Build / build (pull_request) Failing after 12s
Lint / lint (pull_request) Successful in 21s
Molecule / molecule (pull_request) Successful in 6m53s
A pull request now runs the scenarios of the roles it touches, none when it
touches only paths no scenario reads, and everything for any other file, for
every push to main and for manual dispatch. The job stays unconditional so
Molecule can remain a required check.

scripts/select_molecule_scenarios.py makes the choice and is run from the base
branch's copy, so a pull request cannot edit its own rules. A changed role
that exists but has no scenario fails instead of passing with nothing tested.

The scenario loop no longer gives molecule the list as stdin, which a child
could have drained, and fails when it ran fewer scenarios than were selected.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 11:05:46 +00:00
Defame1297andClaude Sonnet 5.5 16fac625a7 docs(security): publish [email protected] as the reporting contact
Build / build (pull_request) Successful in 21s
Lint / lint (pull_request) Successful in 14s
Molecule / molecule (pull_request) Successful in 1m3s
The forge has self-registration disabled, so outsiders cannot open issues or pull requests and a detail-free public issue is not a usable first step. SECURITY.md now gives an email address, and CONTRIBUTING.md says accounts are created by the maintainer.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 18:23:25 +00:00
Defame1297andClaude Sonnet 5.5 79a78f2921 docs: prepare the repository for publication
Build / build (pull_request) Failing after 4s
Lint / lint (pull_request) Failing after 12s
Molecule / molecule (pull_request) Successful in 1m8s
Rewrite stale gate wording and trim private references so the repository
can be made public.

- molecule.yml header: the runner sits in an isolated network segment, not
  behind the Proxmox firewall; state that a fork PR's workflow started
  without approval in a live test (unproven for outsiders) and that the
  `if:` guard is a convenience, not a boundary. Fork PRs are not claimed
  disabled; the repository should not accept them from untrusted users.
- CONTRIBUTING.md: same fork PR statement.
- SECURITY.md: new, with a TODO(operator) for the reporting contact.
- CLAUDE.md trimmed. Removed: the private environment-repo links and issue
  numbers, the two-sentence extraction history, run numbers, the registry
  push secret names and the Renovate token name and scopes, the Renovate
  dry-run and first-live-run narrative, the runner hostname and the
  cron time. Kept: git -C and commit-with-git rules, runner labels, image
  and Renovate rules.
- ADR 0004 references in workflows and scripts now say it lives in the
  maintainer's environment repository; docs/images/ci.md drops "private".

Comment and doc text only; image pins, the bot e-mail and runner labels
are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-11-08 17:38:58 +00:00
Defame1297andClaude Sonnet 5.5 4628989be3 fix(renovate): authenticate as a Kamino-only bot user, not the job token
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 10s
Lint / lint (pull_request) Successful in 12s
Dry run 2445 showed Renovate cannot run on the job token: its pull request lookups filter by its own username, which is the virtual user gitea-actions, and Gitea answers 400 user does not exist. The workflow now reads the repository secret RENOVATE_BOT_TOKEN (token of a bot user with write access to this repository only); the job token is read-only. The empty-secret case fails with a clear message. Docs updated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-26 08:51:22 +00:00
Defame1297andClaude Sonnet 5.5 7e32ad5ac6 fix(renovate): authenticate git with a bearer header and fail the job on repository errors
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 12s
Renovate puts the job token in the clone URL, which git drops when the
server redirects (dry run 2439: could not read Username). Write a global
git http.extraheader like lint.yml does. Renovate exits 0 on a repository
failure: set exitCodeForErrors and check the JSON report for a missing
file or ERROR/FATAL problems.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-26 08:40:02 +00:00
Defame1297andClaude Sonnet 5.5 b92adb931c fix(renovate): fail-safe dry run, catch-all post-upgrade rule, merge open items
Molecule / molecule (pull_request) Skipped
Build / build (pull_request) Successful in 13s
Lint / lint (pull_request) Successful in 15s
- renovate.yml: a workflow_dispatch is a dry run unless the input is exactly
  "false" (an empty input no longer goes live); drop RENOVATE_BINARY_SOURCE
  install, the -full image ships its tools.
- renovate.json: the postUpgradeTasks rule matches every package, because with
  executionMode branch only the first upgrade of a branch counts; the script is
  a no-op when no image input changed.
- bump_image_versions.py: docstring describes the real wiring.
- CLAUDE.md, CONTRIBUTING.md: one open item for the first live run, runner slot note.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-26 08:19:02 +00:00
Defame1297andClaude Sonnet 5.5 7730440759 ci(renovate): run Renovate from a cron workflow on the kamino-runner
Add .gitea/workflows/renovate.yml (daily 03:17 UTC and workflow_dispatch with a
dry_run choice), using the job token and a digest-pinned renovate/renovate
container, so no Kamino code runs in the production cluster. renovate.json runs
scripts/bump_image_versions.py origin/main as a postUpgradeTasks command for the
image inputs, and the workflow's own container pin is excluded from bot bumps.
Document the dry run, the unverified points and the open decision on CI
triggering for job-token pull requests.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-26 07:37:25 +00:00
Defame1297andClaude Sonnet 5.5 c03e492f81 docs: describe the Renovate automation, the two-PR image loop and the bot-diff gate
Build / build (pull_request) Failing after 11s
Lint / lint (pull_request) Successful in 14s
Molecule / molecule (pull_request) Successful in 36s
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 21:20:17 +00:00
Defame1297andClaude Sonnet 5.5 24500e9eed docs: correct the credential statements in CLAUDE.md, CONTRIBUTING.md and the workflows
Build / build (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 6s
State that a same-repo pull request gets org secrets and that Gitea 28 refuses the
job token for org packages. Rename image.yml's workflow to "Images" (cosmetic, no
step changed) and update stale comments.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
2026-10-25 18:19:06 +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 3869718450 docs: correct the fork pull request policy and add maintainer setup
Build / build (pull_request) Successful in 50s
Lint / lint (pull_request) Successful in 1m26s
State the real Gitea approval rule for fork pull requests, require a
REUSE.toml annotation for third-party material, describe the release
changelog files, and list the repository settings the workflows cannot
enforce (protected v* tags, protected main, the package push credential).
Drop the references to the private environment repository.

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
Defame1297andClaude Sonnet 5.5 c794d3133a feat: add the empty mortis.kamino collection skeleton
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