Commit Graph
207 Commits
Author SHA1 Message Date
kevinveenbirkenbach c3da3ce013 fix(scripts): derive Playwright image tag from defaults/main.yml
The old derivation read @playwright/test out of
roles/test-e2e-playwright/files/package.json and assembled the tag
as `v{version}-{distro}`. That package.json no longer exists — the
version+distro tag now lives verbatim in defaults/main.yml under
images.playwright.version, so read it from the single source of
truth instead of rebuilding a broken tag from a missing file. The
TEST_E2E_PLAYWRIGHT_IMAGE_DISTRO fallback is no longer referenced
once the distro suffix is baked into the upstream version string.
2026-04-19 19:12:54 +02:00
Environment TestandClaude Opus 4.6 a07ef379ed chore(scripts): drop unused CA trust env pass-through from Playwright rerunner
The rendered .env already contains the deploy-time CA trust values and the
spec uses ignoreHTTPSErrors, so duplicating the Ansible task's -e wiring
never adds anything in the inner-loop case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:31:03 +02:00
Environment TestandClaude Opus 4.6 53efeb7eb7 docs(agents): add Playwright Spec Loop with rerunner script
Adds the documented inner-loop workflow for iterating role-local
Playwright specs against a live stack without a full redeploy, plus
the helper script that reuses the existing staging dir, rendered .env,
and container image defaults so no new TEST_E2E_PLAYWRIGHT_* override
mechanism is introduced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:22:26 +02:00
Environment TestandClaude Opus 4.6 a2275e6991 docs(make): pass variables after target to match Bash(make*) permission
Reorders all documented and scripted `make` invocations from the
`VAR=value make target` shell-env prefix form to the make-native
`make target VAR=value` form. GNU Make auto-exports both command-line
and inherited shell-env variables to recipe shells, so the change is
purely about command-line shape: only the make-suffix form starts with
`make` and is therefore matched by the `Bash(make*)` permission entry
in .claude/settings.json, avoiding unnecessary approval prompts for
agent runs.

Adds an explicit CLAUDE.md rule with ✅/❌ examples and the underlying
reason (permission prefix match, not Makefile semantics).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 12:28:44 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 3cfdc4bdf7 feat(services-disabler): propagate SERVICES_DISABLED through deploy stack and add conflict detection
Adds inventory consistency guard that fails fast when SERVICES_DISABLED
conflicts with an already-deployed inventory, and ensures the env var is
forwarded through the dedicated runner, development exec command, and
local test scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:36:16 +02:00
Environment TestandClaude Sonnet 4.6 ac3b437733 fix(test): resolve self-exclusion bug in environment orchestrator
The self-exclusion check compared BASH_SOURCE[0] (relative path when
invoked as `bash ./scripts/…/00_orchestrator.sh`) against the glob-built
step paths (always absolute). The mismatch caused the orchestrator to
include itself in the loop, running a full inner pass of steps 01–10
before the outer loop repeated them — doubling the total runtime.

Fix: resolve SELF to an absolute path using SCRIPT_DIR so the comparison
is always path-equivalent regardless of invocation style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 02:09:37 +02:00
Environment Test 212cc39052 test(external): split live registry checks
Keep live registry lookups out of the default make test flow.

Add a dedicated external suite, workflow, and docs so the check stays opt-in but still gates code CI when enabled.
2026-04-10 22:31:42 +02:00
Environment TestandClaude Sonnet 4.6 0b8e16a45d test(lint): add markdown link checker and fix all broken links
Add tests/lint/repository/test_markdown_links.py — a hard-fail lint
test that scans all git-tracked markdown files for broken relative and
repo-root-absolute links. Skips external URLs, anchor-only links, fenced
code blocks, and placeholder targets.

Apply documentation.md rules to all staged files: add emojis after
headlines in docs files, remove emojis from role README headings,
standardize Credits sections to the canonical format, remove empty
sections and orphaned sentences referring to missing documentation files,
fix raw URLs and incorrect link text across role READMEs and docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 22:00:46 +02:00
Environment TestandClaude Sonnet 4.6 5c1a963d30 docs(tools): restructure security and framework docs, add cleanup workflow
- Move flow/security/ghcr.md to tools/ghcr/authentication.md
- Move flow/security/mirror-cleanup.md to tools/ghcr/cleanup.md
- Move flow/security/branch.md to tools/github/branch.md
- Move flow/security/repository.md to tools/github/repository.md
- Move code/frameworks/ansible.md to tools/ansible.md
- Merge code/frameworks/Makefile.md into tools/make.md and extract file rules to artefact/files/makefile.md
- Rename tools/makefile.md to tools/make.md
- Add .github/workflows/images-mirror-cleanup.yml for manual GHCR cleanup
- Apply documentation.md standards: emojis on headlines, no em dashes, filename link text
- Fix all cross-references broken by directory restructuring

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 16:31:22 +02:00
Environment TestandClaude Sonnet 4.6 a721e87212 fix(tests): replace lint-based pre-commit test with a proper failing unit test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 02:33:22 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 e84bb3fe06 fix(env): unset cached env vars before reload and guard commit test against dirty worktree
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 02:08:39 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 434aa81ee2 fix(tests): ensure git safe.directory is configured before each environment step
Add ensure_git_safe_directory helper to lib.sh that detects dubious
ownership warnings in mounted containers and adds safe.directory to
the global git config. Call it on lib load and before each step in
the orchestrator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 01:05:11 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f4b116224e fix(ci): enable CodeQL file coverage on pull requests
Opts out of the April 2026 default change that skips file coverage
computation on PRs by setting CODEQL_ACTION_FILE_COVERAGE_ON_PRS=true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:11:11 +02:00
kevinveenbirkenbach bbaf119640 split git bootstrap into dedicated environment step 2026-04-08 23:42:09 +02:00
kevinveenbirkenbach 3dc243fb0d fix dependabot coverage and environment test scripts 2026-04-08 18:01:42 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 821c3c53b6 feat(pre-commit): introduce pre-commit hook enforcement and modular environment test suite
- Add .pre-commit-config.yaml running make test on non-doc changes
- Add pre-commit to pyproject.toml dev dependencies
- Add scripts/install/pre-commit.sh for hook registration
- Add install-python-dev Makefile target; wire into environment-bootstrap
- Rename setup-development → mark-development (env.ci override marker)
- Refactor scripts/tests/environment.sh into modular 00–10 scripts with orchestrator
- Add 09_commit.sh validating pre-commit enforcement and --no-verify bypass
- Update docs/agents/action/commit.md and testing.md for new hook behavior
- Update makefile.md, setup.md, installation.md accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:58:24 +02:00
kevinveenbirkenbach 1770dd7f9f test(environment): clarify HTTP 000 expectation 2026-03-30 22:31:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9c1e62fd50 fix(tests): expect HTTP 000 when subdomain is missing from certificate SAN
curl returns 000 (no HTTP response) instead of 404 when the TLS handshake
fails because the target subdomain is not listed as a SAN in the deployed
certificate. Updated both assertions and added explanatory comments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 22:29:47 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 10b889e76f refactor(deploy): single deploy-fresh-purged-apps target with FULL_CYCLE flag
Consolidates into one target. FULL_CYCLE defaults to false (deploy only);
set FULL_CYCLE=true for deploy + update pass. Extracts run_pass function
in fresh-purged-app.sh to eliminate duplicated init+deploy logic. Updates
makefile.md, playwright.md, iteration.md, and environment.sh with correct
FULL_CYCLE usage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 17:14:44 +02:00
kevinveenbirkenbach 18c0eeb679 Moved build block 2026-03-30 05:34:48 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 357943f056 feat(environment): add inspect function and HOST_VARS_FILE SPOT
Extract inventory/host_vars printing into an inspect() function called
after each deploy. Define HOST_VARS_FILE as a SPOT in inventory.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:26:20 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0475e76db5 refactor(environment): replace assert comments with echo statements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:21:37 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0a1dcc179c refactor(environment): replace make comments with echo statements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:18:26 +02:00
kevinveenbirkenbach e142b42a3a fix(ci): install missing ruamel.yaml dependency in deploy pipeline 2026-03-30 04:27:31 +02:00
kevinveenbirkenbach 40375decb8 fix(env): force local runtime context by unsetting CI markers
Unset GITHUB_ACTIONS and ACT in environment.sh to prevent runtime.sh
from detecting a CI environment (GitHub Actions or act).

This ensures deterministic local execution even when the script is
run inside CI-like shells or inherited environments.
2026-03-30 03:24:35 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 1b690bcaab fix(environment): source env after install to prevent stale PYTHON cache
Move `source all.sh` to after `make install` so that INFINITO_ENV_PYTHON_LOADED
is not pre-exported into make's environment. This ensures each recipe subshell
re-evaluates PYTHON and picks up the venv interpreter once the venv exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 03:15:53 +02:00
kevinveenbirkenbach ea4c2d06c2 Removed uneccessary test 2026-03-30 03:01:56 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0d206ae3c8 refactor(inventory): introduce INVENTORY_FILE as SPOT for devices.yml path
Define INVENTORY_FILE="${INVENTORY_DIR}/devices.yml" once in
scripts/meta/env/inventory.sh and export it. Remove all local
inv_file definitions; assert INVENTORY_FILE as required in each
consumer script. Rename CMD variable in container.sh from INSPECT_CMD.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 02:18:29 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 a50c90c733 fix(deploy): resolve SERVICES_DISABLED service names to app IDs and verify inventory
- deploy.py: use find_provider_roles() to map service names (e.g. 'matomo')
  to provider app IDs (e.g. 'web-app-matomo') before filtering deploy_ids;
  forward SERVICES_DISABLED into the container via extra_env
- container.sh: rename INSPECT_CMD to CMD for consistency; fix indentation
- Makefile: expose CMD variable on exec target for non-interactive use
- environment.sh: source scripts/meta/env/all.sh for INVENTORY_DIR; add
  inventory verification after SERVICES_DISABLED deploy using make exec
- variables.md: document CMD variable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 01:26:44 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 135ceefa98 fix(build): add SPOT for local image name and fix missing REPO_PREFIX
Add scripts/meta/resolve/image/local.sh as SPOT for the local Docker
image tag (<repo-basename>/<distro>). Wire it into Makefile build
targets (IMAGE_TAG), compose.py (_base_env sets INFINITO_IMAGE), and
compose.yml (no default fallback). Fix build.sh to accept a pre-set
IMAGE_TAG without requiring REPO_PREFIX. Add make build + build-no-cache
to environment.sh test flow with correct section ordering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 00:16:27 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 e372349d10 refactor: rename deploy-*-app to deploy-*-apps for multi-app support
Update all Make targets, comments, docs, and scripts to use the plural
form, reflecting that APPS can specify more than one application.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 16:47:16 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 5357052dd5 feat(system): add system-disk-usage, rename purge-system to system-purge, remove purge-all
- Add scripts/system/meta/disk-usage.sh with best-effort coverage of
  Docker, Buildx, journald, pip, npm, yarn, Go, and distro package caches
- Add make system-disk-usage target
- Rename make purge-system -> system-purge for consistent naming
- Remove make purge-all (was a redundant alias)
- Remove scripts/system/purge/all.sh (logic consolidated into system-purge)
- Integrate scripts/image/cleanup.sh as best-effort step in system-purge
- Update environment.sh: run system-disk-usage before system-purge
- Update docs: hardware.md, makefile.md (add apparmor-teardown/restore entries)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 16:11:57 +02:00
kevinveenbirkenbach 53b839a124 Optimized file format 2026-03-29 15:39:51 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 a132800a42 refactor(environment): restructure sections and add redeploy steps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:32:20 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 5701c963c7 docs(environment): shorten purge-all comment to minimal-hardware rationale only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:22:29 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 3cc1a5a137 refactor(environment): move package install into system section, update heading
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:21:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 00e74e8c73 docs(environment): split bootstrap into system and bootstrap section headers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:20:45 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 19beaa9cfd docs(environment): add testing and deploy section headers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:19:36 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 373c9a8f18 refactor(environment): move app selection rationale to configuration section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:18:04 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 cb90ac782b refactor(environment): move app/URL variables into configuration section at top
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:16:28 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 92123a7f3c docs(environment): add bootstrap section header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:15:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 b8c0cfe5a0 docs(environment): add teardown section header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:14:50 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9788cce248 docs(environment): clarify purge-all is primarily for minimal-hardware environments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:14:03 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 7a4f5d6d39 docs(environment): add section headers separating script utilities from deploy steps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:12:00 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 746554d6c1 refactor(environment): extract app names into DASHBOARD_APP and MATOMO_APP variables
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:09:11 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 903713a055 test(environment): assert dashboard unreachable after matomo-only fresh deploy
deploy-fresh-purged-app purges the previous inventory/containers, so the dashboard
deployed in the first step is gone after the matomo deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:07:55 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f260e50c52 fix(environment): re-run trust-ca after second deploy-fresh-purged-app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:06:31 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 74edf694bd refactor(environment): remove assert_http_status_not, expect 404 for disabled matomo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:02:53 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9d863f1ef4 feat(inventory): add SERVICES_DISABLED env var support and environment test flow
- Add services_disabler.py: parse SERVICES_DISABLED, disable services in host_vars,
  remove provider roles from inventory
- Wire apply_services_disabled_from_env into cli/create/inventory/cli.py after deploy
- Add unit tests for all services_disabler functions
- Update hardware.md and variables.md with SERVICES_DISABLED documentation
- Update environment.sh: deploy dashboard with SERVICES_DISABLED=matomo first,
  assert dashboard reachable + matomo not reachable, then deploy matomo and assert
  reachable; extract assert_http_status / assert_http_status_not helpers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:00:24 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 e1362e5c6a feat(scripts): enhance environment.sh with comments, purge-all, and fixed APPS
- Add make purge-all before make install to simulate a fully cleaned state
- Fix APPS to always use web-app-matomo (fewest deps, fastest deploy)
- Add explanatory comments above every make command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 13:03:58 +02:00