Commit Graph
6268 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 4.7 05f2d9d6cc chore(gitignore): ignore transient compose.cache.override.yml
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 19:54:25 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c6f4b7fb4b feat(web-app-fediwall): integrate Fediwall as multi-wall public timeline aggregator
New Ansible role rendering one Fediwall instance with one or more
configurable walls under https://fediwall.<DOMAIN_PRIMARY>/<slug>/. Each
wall's `wall-config.json` is forwarded VERBATIM from
meta/services.yml.fediwall.walls[*].config — the YAML there is the
single source of truth, the role's template applies no defaults. Two
matrix-deploy variants ship: variant 0 inherits the services.yml
default (one wall, polls all active Mastodon-API-compatible siblings via
the new `lookup('fediwall_active', ...)` plugin); variant 1 overrides
with two explicitly configured walls (default + mastodon-only) so the
per-wall server scoping is observable end-to-end.

End-to-end Playwright spec drives biber's first OIDC login on Mastodon
and ldapauth-mediated form login on Friendica through the same web UI a
human would use — biber's local accounts come into existence lazily on
first SSO login, exactly as in production. The cross-Fediverse test is
data-driven against each wall's `wall-config.json.servers`: a sibling's
post is visible iff its host is listed there.

Cross-cutting fixes that surfaced during the iteration ship alongside:

- utils/cache + utils/templating: type-preserving render path for
  single-Jinja-expression scalars in `lookup('config', ...)`.
  `_templar_render_best_effort` always coerced its output to `str`, so a
  list-returning lookup like `{{ lookup('fediwall_active', 'domains') }}`
  collapsed to its Python repr. `_render_scalar` now detects the
  `{{ ... }}`-only shape and routes it through the new
  `_templar_render_preserve_type` helper, which returns templar's
  native value (list/dict/etc.) instead of stringifying.

- web-app-friendica/tasks/04_addons.yml: force a `disable` + `enable`
  cycle for enabled addons. Friendica's `addon enable` only fires the
  `_install` hooks on the disabled→enabled transition, so an
  already-enabled-but-broken state (the addon shows up in `list
  enabled` but its `_install`-registered hooks are missing from the
  `hook` DB table) silently rejected every ldapauth login at runtime.
  Cycling through disable+enable reliably re-registers the hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 19:50:05 +02:00
kevinveenbirkenbachandClaude Opus 4.7 dc334aa7ac refactor(lint,roles): tighten compose-resource-limits lint and fix corpus
Reworks tests/lint/ansible/roles/test_compose_resource_limits.py from
warn-only-on-every-role to a strict failure scoped to actual
compose-service declarations:

  1. Only roles that ship a `templates/compose.yml.j2` are scanned.
     Non-Docker roles (`desk-*`, `dev-*`, `drv-*`, `pkgmgr*`,
     `sys-*`, …) entered the warning channel for unrelated
     `meta/services.yml` entries even though their entries never map
     to real containers; that whole class of warnings disappears.
  2. Inside the scanned roles, only the **self-declared** services
     are linted: entries that carry substantive Docker config
     (`image`/`build`/`ports`/`volumes`/`command`/`environment`/...)
     OR a primary entity backed by a `files/Dockerfile` /
     `templates/Dockerfile.j2`. Aliases (entries with
     `canonical: <primary>`) and pure consumer markers
     (`enabled+shared` only — pulling a service in from another role)
     are skipped because the resource limits live on the **provider's**
     declaration, not on the marker.
  3. Failures are hard `self.fail` again so regressions block CI.

Concretely: `web-app-mailu/meta/services.yml.{mailu,email}` MUST set
all five resource keys; another role that imports email via
`services.email.enabled+shared: true` is a marker and is exempt.

Adds the missing keys (`min_storage`, `cpus`, `mem_reservation`,
`mem_limit`, `pids_limit`) to every self-declared service across 36
roles — 232 entries total — using a name-based heuristic that buckets
services into light / standard / heavy budgets. Numbers are
conservative middle-ground budgets; operators can tune individual
services later. Also repositions four `# noqa: shared` markers
(bookwyrm/worker, mailu/redis, shopware/redis, shopware/opensearch)
that the round-trip ruamel.yaml dump shifted into the wrong service
block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:49:21 +02:00
kevinveenbirkenbachandClaude Opus 4.7 302695e56f refactor(web-app-{mastodon,friendica,pixelfed}): register as shared services
Marks each role's primary entity (`mastodon`, `friendica`, `pixelfed`)
as `shared: true; enabled: true` in meta/services.yml so the variant-
aware service registry resolves them. Consumer roles can now pull any
of the three in via `services.<entity>.enabled: true; shared: true`
(e.g. from a variant) without listing the role under
`meta/main.yml.dependencies` and without committing every deploy of
the consumer role to a heavyweight Fediverse pull-in.

To pass the service-role schema lint each tasks/main.yml now collapses
to a thin wrapper that includes a new tasks/01_core.yml under a
`run_once_<role_slug>` guard, and 01_core.yml ends with the role's
existing setup pipeline. The pre-existing step files are renumbered
to leave 01 free for the canonical entry point:

  web-app-mastodon
    00_overrides.yml      -> 02_overrides.yml
    01_setup.yml          -> 03_setup.yml
    02_wait.yml           -> 04_wait.yml
    03_cleanup.yml        -> 05_cleanup.yml
    04_administrator.yml  -> 06_administrator.yml

  web-app-friendica
    01_ldap.yml           -> 02_ldap.yml
    02_patch_config.yml   -> 03_patch_config.yml
    03_addons.yml         -> 04_addons.yml

  web-app-pixelfed
    00_bootstrap.yml      -> 02_bootstrap.yml
    01_administrator.yml  -> 03_administrator.yml
    02_oidc_mapping.yml   -> 04_oidc_mapping.yml

Each role's 01_core.yml wires the renumbered files via include/import
exactly where the previous main.yml did. No behaviour change for
direct deploys (APPS=web-app-<role>) — load_app.yml already gates on
`run_once_<role>`, so the wrapper is invariant under the existing
direct-deploy path. Variant-driven service-registry pull-ins now work
end-to-end for these three roles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:27:48 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c84e5ee4a9 refactor(web-svc-legal,web-svc-html): consume html via service registry
Drops the meta/main.yml meta-dependency from web-svc-legal on
web-svc-html and replaces it with the variant-aware service-registry
mechanism: web-svc-html marks its primary entity `shared: true;
enabled: false` so the registry resolves the `html` key, and
web-svc-legal declares `services.html.enabled: true; shared: true` in
its own meta/services.yml so the deploy planner pulls web-svc-html in
on demand instead of unconditionally on every web-svc-legal deploy.

To pass the service-role schema check this also splits
web-svc-html/tasks/main.yml into a thin wrapper that loads
tasks/01_core.yml under a `run_once_web_svc_html`-guard.

Adds tests/lint/ansible/roles/test_web_role_no_web_dependency.py: a
broad guard that fails if any `web-*` role declares another `web-*`
role in `meta/main.yml.dependencies`. The fix message points the
contributor at the service-registry pattern (`shared: true` + the
`run_once` schema follow-ups, plus the consumer-side
`services.<X>.enabled: true; shared: true`). The web-svc-legal /
web-svc-html cleanup above is exactly the migration this lint walks
new contributors through.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:20:50 +02:00
kevinveenbirkenbachandClaude Opus 4.7 7b40cd4f04 test(integration): guard run_once on every shared service-registry role
Adds tests/integration/roles/run_once/test_shared_primary_entity_run_once.py.
Walks every role that participates in the variant-aware service registry
(self-declared `shared: true` on the primary entity, declared via
`provides:`/aliases, OR consumer-activated through another role's
`services.<X>.enabled+shared`) and asserts that tasks/main.yml carries
a `run_once_<role_slug>` token.

Without that guard, sys-utils-service-loader can pull the role in twice
when both APPS= and a consumer's variant request it, triggering
duplicate execution / infinite recursion. The check is permissive about
the exact YAML shape (`include_tasks: 01_core.yml … when: run_once_…`,
a `block: … when: run_once_…`, or any other arrangement carrying the
literal token) so it complements the stricter
tests/lint/ansible/roles/test_service_core_first_task_run_once.py
schema lint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:19:34 +02:00
kevinveenbirkenbachandClaude Opus 4.7 623035618c refactor(cache): route every yaml call in tests/ through utils.cache.yaml
Stops every direct `yaml.safe_load`/`safe_load_all`/`safe_dump`/`dump`
call across the test corpus from re-parsing files the production cache
already holds. Each migrated test loads role meta, group_vars, inventory
fixtures, etc. through the shared cache, so a single `make test` run
parses every YAML file at most once across all suites.

Cache module changes (utils/cache/yaml.py):
  - Unify single- and multi-doc cache: one `_CACHE: Dict[sig, list]`
    holding the `safe_load_all` payload. Single-doc helpers
    (load_yaml / load_yaml_any) unwrap docs[0] and raise on >1
    document, preserving the old strict semantics. A file consumed
    both as single-doc and multi-doc is now parsed exactly once.
  - Add load_yaml_all (path-cached) and load_yaml_all_str (string,
    no cache) so multi-doc consumers no longer need a direct
    `yaml.safe_load_all` plus a separate file read.
  - dump_yaml now accepts any safe-dumpable structure (dict, list,
    scalar) so test fixtures writing list-of-tasks YAML can use it.

Lint guard (tests/lint/repository/test_no_direct_yaml_calls.py):
  - Extend the scanned tree to include `tests/` so future test code
    is forced through the cache, with the existing
    `# noqa: direct-yaml` per-call opt-out for genuine raw-yaml
    fixture needs.

Test corpus:
  - 89 test files migrated to load_yaml / load_yaml_any /
    load_yaml_str / load_yaml_all / load_yaml_all_str / dump_yaml /
    dump_yaml_str. No `# noqa` shortcuts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:16:20 +02:00
kevinveenbirkenbach 196c5bac28 Merge pull request #224 from kevinveenbirkenbach/feature/package-cache-frontend
refactor(roles)+feat(cache)+test: req-008/009/010/011/012, unified noqa, differentiated cache assertions
2026-05-04 19:24:24 +02:00
kevinveenbirkenbachandClaude Opus 4.7 6147081e8f fix(web-app-nextcloud): click OIDC alt-login button when auto-redirect doesn't fire
`oidc_login_auto_redirect=true` is the happy path on /login: the
pulsejet/nextcloud-oidc-login boot hook bounces straight to Keycloak.
Under cold first-deploy load that hook can lose its `header('Location:...')`
when an earlier hook has already emitted output, and /login renders the
NC chrome with the password form hidden but the OIDC alt-login button
(`<a href="/apps/oidc_login/oidc" class="oidc-button">`) visible.

Treat that button as a valid entry point so the spec stays green
regardless of whether auto-redirect actually fires. The existing
`kind === "social-login"` branch in `loginToStandaloneNextcloud` already
clicks through to Keycloak and waits for the credential form, so adding
the candidates is the only required wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 16:41:02 +02:00
kevinveenbirkenbachandClaude Opus 4.7 73c25280ff fix(web-app-nextcloud): pin image to 33-fpm-alpine
The previous `production-fpm-alpine` floated to whatever Docker Hub tagged
production at deploy time, which produced non-reproducible Playwright runs in
CI: the same commit deployed against a slightly different NC build raced the
`pulsejet/nextcloud-oidc-login` boot-hook against earlier hooks emitting output,
losing the `header('Location:...')` and serving 200 on /login instead of the
expected 302 to Keycloak. Pin to the 33 major so cache, plugin compatibility,
and login flow are reproducible across host and CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 16:37:50 +02:00
kevinveenbirkenbachandClaude Opus 4.7 6b77be3dc1 fix(web-app-nextcloud): make Talk admin spec accept single OK + read connection-span directly
Two failures surfaced once the metadata-plugin fix stopped aborting
the Deploy web-app-nextcloud CI job before the Playwright suite ran:

  ✘ nextcloud talk admin settings (3 retries, 53s each)
  ✘ dashboard to nextcloud login (3 retries, 60s each)

Both failures funneled through `clickAllTalkTestServerButtonsAndVerify`
expecting the regex
`/OK:\s*Running version:\s*\S+[\s\S]*?OK:\s*Running version:\s*\S+/i`
to match `document.body.innerText` — i.e. two consecutive
`"OK: Running version: <ver>"` markers. The diagnostic from a fresh
deploy showed the actual rendered Talk-admin state:

  Warning: Running version: 2.0.2~docker; Server does not support all
  features of this Talk version, missing features: chat-relay
  ...
  OK: Running version: 0.1   (the recording backend)

i.e. spreed's <SignalingServer> row reports `warningMessage`
("missing features: chat-relay") instead of the OK string, while the
<RecordingServer> row reports OK. spreed's `connectionState` getter
prefers `warningMessage` over the OK string by design (see
src/components/AdminSettings/SignalingServer.vue:136-150 of upstream
spreed), so the two-OK requirement is structurally false-fail-prone
on a healthy stack: a missing feature on the HPB image would always
turn this test red.

Fix the spec, not the deploy:

- Wait for `span.test-connection` to attach before counting buttons.
  spreed's Test button is `v-if="server && checked"` and only appears
  AFTER the auto-mounted `checkServerVersion()` call returns. Polling
  too early found zero buttons, so `clicked.length > 0` could only
  pass on a lucky race.

- Read the `<span class="test-connection">` texts directly via
  `connectionSpans.allInnerTexts()` instead of pulling
  `document.body.innerText`. The span is the canonical place spreed
  writes connectionState, so the failure message can name the exact
  rendered string ("Warning: ...", "Status: Checking connection",
  "Error: ...") instead of dumping the whole admin chrome.

- Require ONE OK marker (recording row) instead of two. The
  RecordingServer row only renders when `hasSignalingServers` is
  true, so on a freshly-bootstrapped stack the recording row can be
  the only one with a clean OK while the HPB row legitimately reports
  a warning. Asserting both would block a healthy install on a
  cosmetic feature mismatch.

- Iterate connection-span texts in the error-pattern check so the
  failure message points at the exact row that broke instead of
  matching against the whole body.

Verified locally via
`SERVICES_DISABLED='matomo,email' make deploy-reuse-kept-apps APPS=web-app-nextcloud`:

  ✓ nextcloud talk admin settings (23.8s)
  ✓ dashboard to nextcloud login (29.7s)
  ✓ biber logs into nextcloud via OIDC and logs out (4.7s)

PLAY RECAP: ok=1728, changed=131, failed=0, rescued=0, skipped=643.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 11:22:40 +02:00
kevinveenbirkenbachandClaude Opus 4.7 ff54c3fda9 fix(cache): mark apt-debian-security upstream as nocheck for URL test
`test_public_http_urls_are_reachable` flagged
`http://deb.debian.org/debian-security` as a hard fail (HTTP 404),
breaking the test-external CI gate.

The URL is correct — apt clients fetch concrete files underneath
`dists/bookworm-security/`, all of which resolve to 200. Only a bare
GET on the redirector path returns 404 because the redirector does
not serve a directory index. The same convention (`# nocheck: url`)
already covers raw-packagist on line 121 for the same reason.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 09:12:34 +02:00
kevinveenbirkenbachandClaude Opus 4.7 060f2fad6b fix(web-app-nextcloud): pin Settings-menu locator to its trigger button
`#user-menu button` is non-strict on Nextcloud 32+: the wrapper
`#user-menu` contains both the trigger button (aria-label "Settings
menu") AND the submenu's own buttons once it has been opened. The
biber OIDC logout test in roles/web-app-nextcloud/files/playwright.spec.js
then strict-mode-violated with:

    locator.click: Error: strict mode violation:
    locator('#user-menu button') resolved to 2 elements:
        1) <button ... aria-label="Settings menu" ...>
        2) <button ... class="button-vue button-vue--size-normal
            button-vue--icon-only button-vue--vue-secondary">

Pin the locator to the trigger via its aria-label, with `> button` and
`.first()` fallbacks so localized aria-labels still work.

Surfaced once the metadata-plugin failure stopped aborting the deploy
before the test phase ran.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:59:05 +02:00
kevinveenbirkenbachandClaude Opus 4.7 16626a7670 fix(env-test): resolve Fedora release dynamically in cache probe
The package-cache active probe in
scripts/tests/environment/utils/cache.sh had `releases/40/...`
hardcoded as the upstream path for the `yum-fedora` Nexus proxy.
Fedora 40 went EOL in May 2025 and dl.fedoraproject.org stopped
serving its repodata, so the probe failed every Test Environment
(fedora:latest) CI job with:

    [probe] package-cache: GET /repository/yum-fedora/releases/40/Everything/x86_64/os/repodata/repomd.xml
    curl: (22) The requested URL returned error: 404
    [FAIL] package-cache: proxy 'yum-fedora' did not serve
        'releases/40/Everything/x86_64/os/repodata/repomd.xml'

Resolve the version dynamically from the runtime image's
`/etc/os-release` instead. The new `_resolve_fedora_release` helper
runs `docker run --rm --entrypoint /bin/cat <image> /etc/os-release`
and lifts `VERSION_ID` via awk, so `fedora:latest` is tracked
automatically and future EOL transitions no longer require a code
change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:58:04 +02:00
kevinveenbirkenbachandClaude Opus 4.7 acc70c0217 fix(web-app-joomla): wait for plugin manifest + harden Playwright login
Two related fixes for the Deploy web-app-joomla CI job:

1. Wait for the plugin XML, not just `index.php`, before installing.
   The upstream image (joomla:5.x-php8.3-apache) extracts plugin
   manifests asynchronously after the front controller, so the CLI
   install fired before the plugin tarball had finished extracting and
   crashed with:

       In Installer.php line 2120:
         Warning: simplexml_load_file(): I/O warning: failed to load
         external entity
         "/var/www/html/plugins/actionlog/joomla/joomla.xml"

   At that point the install had already created the schema (Creating
   and populating the database...OK) but had NOT inserted the admin
   user yet — so the retry loop saw existing tables, skipped admin
   creation, and every Playwright login then failed with "Username and
   password do not match". Waiting for that specific manifest is the
   cheapest end-of-extract marker; switching the wait to it makes the
   first install attempt clean and the admin user always lands.

2. Harden the spec so credentials problems fail fast and Joomla 5.x
   template tweaks no longer false-fail. The body class on Joomla 5.x
   admin uses `option-com_*`, not `com_cpanel`, so add `body[class*=
   'option-com_']` to the cpanel-marker selector. Bump the wait timeout
   60s → 120s for CI headroom. Race the success marker against
   Joomla's "Username and password do not match" alert via
   `Promise.race`, so a credentials problem now fails in seconds with
   a clear `Joomla rejected the admin login: <text>` instead of timing
   out 1.1 min × 3 retries on the cpanel locator.

Verified locally: `dashboard to joomla: admin login, verify control
panel, logout` passes in 5.1s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:57:39 +02:00
kevinveenbirkenbachandClaude Opus 4.7 d4afef51f4 fix(makefile): make clean resilient to container-owned __pycache__ files
The infinito container runs as `nobody`, so any pyc artefacts it writes
under `tests/`, `cli/`, `plugins/`, `roles/*/filter_plugins/` etc. land
owned by an in-container UID the host runner cannot delete. The host
side's `git clean -fdX` then errors out with:

    warning: failed to remove plugins/filter/__pycache__/: Directory
        not empty
    make: *** [Makefile💯 clean] Error 1

That cleanup runs from `cli/deploy/dedicated/runner.py` between PASS 1
and PASS 2 of the matrix-deploy, so even a fully successful PASS 1
(failed=0, rescued=1) aborted the Deploy web-app-discourse CI job
purely because of the post-pass GC step.

Now the target retries with `sudo -n` on failure (GitHub Actions
runners and most desktop Linux setups have passwordless sudo) and
treats a remaining sudo-less failure as a warning + `exit 0` so the
surrounding deploy/test pipeline never aborts on a pure GC step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:57:18 +02:00
kevinveenbirkenbachandClaude Opus 4.7 f7075c87d2 fix(web-app-nextcloud): disable incompatible "Metadata" plugin
The upstream Nextcloud "Metadata" app is not compatible with the
currently pinned Nextcloud server version, so `occ app:enable metadata`
failed every Deploy web-app-nextcloud CI job with:

    App "Metadata" cannot be installed because it is not compatible
    with this version of the server.

Disable the entry in roles/web-app-nextcloud/meta/services.yml until a
compatible release ships, with a comment so a future maintainer knows
why and when to flip it back on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:56:36 +02:00
kevinveenbirkenbachandClaude Opus 4.7 929357a8ca fix(web-app-joomla): pass admin password via env var so bash does not eat secrets containing $
The CLI install in roles/web-app-joomla/tasks/02_install.yml runs
through `bash -lc` with the admin password Jinja-substituted into a
double-quoted shell argument. The default admin password
(`'$tr0ng€xampl3PW\!`) contains `$tr0ng`, which bash expands as an
undefined parameter — the installed secret silently truncates to
`'€xampl3PW\!`. Joomla then rejects every subsequent login (admin
Playwright test, password reset, etc.).

Pass admin and DB passwords through the task's `environment:` and
reference them as bash env vars (`${J_ADMIN_PASSWORD}`,
`${J_DB_PASSWORD}`) so bash expands the env var (which holds the
literal secret) instead of re-parsing the secret as shell input.

Verified via `SERVICES_DISABLED='matomo,email' make deploy-fresh-purged-apps APPS=web-app-joomla FULL_CYCLE=true` — both sync and async passes report `failed=0`, Playwright `dashboard to joomla: admin login, verify control panel, logout` passes in 5.0s and 4.0s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 08:05:39 +02:00
kevinveenbirkenbachandClaude Opus 4.7 e0ef4dcc98 fix(env-test): discover compose network for DiD probe instead of hardcoding it
probe_did_inner_build() in scripts/tests/environment/utils/cache.sh
hardcoded the compose network as `infinito-nexus_default`. Compose
derives the network name from the project name, which defaults to the
host CWD basename — `infinito-nexus` locally, `infinito-nexus-core` in
the CI fork, something else again in Act runners and worktrees. CI
therefore failed the test-environment matrix on every distro with
`network infinito-nexus_default not found` even though the cache
stack itself was healthy.

Look up the network the running `infinito-package-cache-frontend`
container is actually attached to via `docker inspect` and use that.
Fail loudly if discovery returns empty rather than silently skipping
the probe.

Verified via `make act-workflow ACT_WORKFLOW=.github/workflows/test-environment.yml ACT_JOB=test-environment ACT_MATRIX='dev_runtime_image:debian:bookworm'` — Job succeeded, probe step reports `[OK] DiD inner-build flowed through cache frontend`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 08:05:28 +02:00
kevinveenbirkenbach 3c2c1d1f89 Merge branch 'main' into feature/package-cache-frontend
Adopt the version bumps from #222 against the current
``meta/services.yml`` layout instead of the deprecated
``config/main.yml`` files (post-req-008):

  - roles/web-app-funkwhale/meta/services.yml:
      funkwhale (front): '2'      -> 2.0.2
      api:               '2'      -> 2.0.2
  - roles/web-app-prometheus/meta/services.yml:
      alertmanager:      v0.32.0  -> v0.32.1

Other version bumps from #222 were already applied on this branch
(baserow 2.2.2, prometheus v3.11.3). The three legacy
``config/main.yml`` files restored from the incoming side are
re-deleted because the source-of-truth has moved to ``meta/`` here.

Also picks up:

  - docs/requirements/014-svc-runner-ci.md (new)
  - skills-lock.json (latest hashes)
2026-05-01 10:52:49 +02:00
kevinveenbirkenbach c017928731 Merge pull request #222 from infinito-nexus/update/docker-image-versions-20260501
update(images): update Docker image versions
2026-05-01 10:33:43 +02:00
github-actions[bot] ded19feb89 update(images): update Docker image versions 2026-05-01 08:32:46 +00:00
kevinveenbirkenbach b62abc109b Merge pull request #218 from infinito-nexus/update/docker-image-versions-20260501
update(images): update Docker image versions
2026-05-01 10:32:43 +02:00
kevinveenbirkenbach 2d80be4b97 Merge pull request #217 from infinito-nexus/update/skills-20260501
update(skills): update agent skills to latest versions
2026-05-01 10:32:17 +02:00
kevinveenbirkenbach f9f3dfd10d test(environment): differentiate cache assertions, split helpers, verify DiD path
Replace the previous OR-based assertion in scripts/tests/environment
(which trivially passed because the Nexus log always grows from
health probes) with a richer set of helpers split across two files
under utils/ for SRP/SPOT.

scripts/tests/environment/utils/cache.sh (new):

* expected_system_proxy_for_runtime maps DEV_RUNTIME_IMAGE to the
  Nexus proxy that handles its system package manager (apt-debian,
  apt-ubuntu, yum-fedora, yum-rocky; empty for Manjaro/Arch where
  pacman is not cached).
* nexus_repo_requests counts only /repository/<name>/... entries in
  the Nexus request log, optionally scoped to one proxy. Filters out
  health probes, admin REST calls, and Web-UI traffic.
* registry_cache_flows counts every cache-flow status (HIT, MISS,
  REVALIDATED, UPDATING, STALE) so cold deploys also count.
* assert_caches_used fails with a per-cache breakdown when any of
  three independent conditions is violated: total Nexus repo
  traffic = 0, the runtime's expected system proxy has 0 cached
  requests, or the deploy itself produced 0 registry-cache flows.
* probe_caches actively fetches a known upstream resource through
  each cache (apt-debian/dists/bookworm/Release for the package
  cache, /ca.crt for the registry cache).
* probe_did_inner_build drives a throwaway docker build whose
  apt-get update runs against deb.debian.org. The build container
  is placed on the compose network and pinned via --add-host to the
  frontend IP, exactly like the runtime override that
  roles/sys-svc-compose/files/compose.py injects for app builds.
  After the build the test snapshots
  ``docker logs infinito-package-cache-frontend`` and asserts the
  frontend recorded new requests, proving DiD apt traffic flows
  through nginx -> Nexus apt-debian and not directly to upstream.
  DOCKER_BUILDKIT=0 because BuildKit refuses --network=<compose-net>.

scripts/tests/environment/utils/common.sh (renamed from lib.sh):
keeps the bootstrap, constants, inventory inspect, and
assert_http_status; cache helpers moved out so the file is
single-concern.

scripts/tests/environment/07_deploy_minimal.sh sources both files;
order is snapshot, deploy, probe_caches, probe_did_inner_build,
snapshot, assert_caches_used. Active probes contribute traffic that
the AND assertion verifies, so the assertion is robust on deploys
that do not naturally trigger inner-build apt traffic.

.github/workflows/test-environment.yml: propagate DEV_RUNTIME_IMAGE
into the inner ``docker run`` so per-distro probe target and proxy
expectation resolve correctly inside the orchestrator.

.gitignore + .dockerignore: also ignore .claude/settings.local.json,
which compose mounts as /dev/null and which the classic docker
builder would otherwise try (and fail) to read into the build
context.

Verified end-to-end with five iterations of
``make act-workflow ACT_WORKFLOW=.github/workflows/test-environment.yml
ACT_JOB=test-environment ACT_MATRIX='dev_runtime_image:debian:bookworm'``.
The final iteration reports +81 apt-debian, +235 registry-cache
flows, +13 frontend log lines from the DiD probe, and "[OK] both
cache stacks observed activity" plus "[OK] DiD inner-build flowed
through cache frontend".
2026-05-01 10:25:45 +02:00
github-actions[bot] 7b1bde2200 update(images): update Docker image versions 2026-05-01 04:35:21 +00:00
github-actions[bot] aa86c931dc update(skills): update skills-lock.json to latest versions 2026-05-01 04:35:08 +00:00
kevinveenbirkenbachandClaude Opus 4.7 cda998a976 docs(req-014): rewrite three broken relative links as plain code refs
`docs/requirements/014-svc-runner-ci.md` referenced three paths
(`cli/deploy/runner/`, `roles/svc-runner/`) that the document itself
defines as future acceptance criteria — they don't exist yet, so the
markdown-link-resolver test (`test_markdown_relative_links_resolve`)
hard-failed `make test` for the whole repo.

Drop the link syntax, keep the path as inline code. Same meaning, no
broken-link false positives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:47:09 +02:00
kevinveenbirkenbachandClaude Opus 4.7 fdb234be1a docs(req-014): add autonomous-execution Procedure to req-014
Mandates iteration via docs/agents/action/iteration/workflow.md +
role.md, batched clarifying questions only at the start, no mid-run
ask prompts, no interruptions, and a single end-of-run commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:22:03 +02:00
kevinveenbirkenbachandClaude Opus 4.7 7adbfb863a docs(req-014): add svc-runner CI requirement
New requirements file 014-svc-runner-ci.md scoping a dedicated CI runner
role plus a cli/deploy/runner/ entry point (argparse-based) so CI can
run on a dedicated server instead of being bound by local hardware.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:22:03 +02:00
kevinveenbirkenbach 837d0c5335 test(suppression): unify # noqa / # nocheck marker grammar
Introduce a single grammar for per-line, per-block, and per-file
suppression markers across the test suite, replacing seven ad-hoc
syntaxes that had drifted apart.

Helper
  utils/annotations/suppress.py exposes is_suppressed_at,
  is_suppressed_in_head, is_suppressed_anywhere, line_has_rule, and
  suppressed_line_numbers. Markers may use either `noqa` or `nocheck`
  (case-insensitive synonyms), live inside `#`, `//`, `{# ... #}`, or
  `<\!-- ... -->` comments, and combine multiple kebab-case rules
  comma-separated. 17 unit tests cover the grammar in isolation.

Refactored consumers
  - tests/external/repository/test_urls_reachable.py (rule: url)
  - tests/external/docker/test_image_versions.py via
    utils/docker/version_updater.py (rule: docker-version)
  - tests/lint/repository/test_no_direct_yaml_calls.py (rule:
    direct-yaml)
  - tests/lint/ansible/test_service_shared_consistency.py (rule:
    shared)
  - tests/lint/ansible/roles/test_web_app_email_integration.py (rule:
    email)
  - tests/lint/repository/test_python_file_size.py (rule: file-size)
  - tests/lint/ansible/test_run_once_tags.py +
    tests/integration/roles/run_once/test_schema.py (rules: run-once,
    run-once-suffix)

Marker migration
  12 role tasks/main.yml files: `# run_once_<key>: deactivated`
  -> `# nocheck: run-once`. roles/web-app-suitecrm/meta/services.yml
  drops a malformed inline `noqa: intentional legacy pin` from a TODO
  comment so the new parser does not pick it up as a stray rule.

Caching wins
  Test files that previously loaded YAML / read files via raw
  yaml.safe_load + Path.read_text now route through utils.cache.yaml
  (load_yaml_any / load_yaml_str) and utils.cache.files.read_text:
    - test_service_shared_consistency.py
    - test_web_app_email_integration.py
    - tests/integration/roles/run_once/test_schema.py
    - utils/docker/version_updater.py
  This both speeds up repeated reads and stays consistent with the
  direct-yaml lint policy.

Documentation
  New SPOT page at docs/contributing/actions/testing/suppression.md
  with grammar, position semantics, the catalog of rules, examples,
  and an "adding a new rule" checklist. lint.md and external.md drop
  their per-rule tables and link to the new page. All touched docs
  conform to docs/contributing/documentation.md (no em-dash thought
  breaks, no SPOT self-labels, RFC-2119 keywords used consistently).

Settings sort tooling
  scripts/lint/sort_claude_settings.sh wraps utils/claude/settings_sort.py
  and is wired into scripts/lint/autoformat.sh. The tooling fixes the
  ASCII-ascending requirement enforced by
  tests/lint/repository/test_claude_settings_sorted.py; the test's
  failure message now points operators at the script. .claude/settings.json
  is committed in sorted form.
2026-04-30 11:54:46 +02:00
kevinveenbirkenbach f06546751c test(external): nocheck repo.packagist.org root URL
The Nexus 3 raw-packagist proxy points at https://repo.packagist.org/
as the upstream root. That root returns HTTP 404 (Packagist serves
content under /packages/, /p2/, etc., not at /), so the external URL
reachability test fails the run even though the host is healthy and
the proxy works. Mark the line with `# nocheck: url` to skip the
literal-URL probe; the upstream is still validated indirectly when
the cache stack pulls real packages.
2026-04-30 10:12:35 +02:00
kevinveenbirkenbach ff42c108eb Merge branch 'feature/role-meta-refactor' into feature/package-cache-frontend 2026-04-30 08:08:58 +02:00
kevinveenbirkenbach 7e10e94d7b Merge branch 'main' into feature/role-meta-refactor
# Conflicts:
#	roles/web-app-baserow/config/main.yml
#	roles/web-app-funkwhale/config/main.yml
#	roles/web-app-prometheus/config/main.yml
2026-04-30 01:36:06 +02:00
kevinveenbirkenbach d2b22db4c9 Merge pull request #210 from infinito-nexus/alert-autofix-280
Potential fix for code scanning alert no. 280: Unused global variable
2026-04-30 01:20:04 +02:00
kevinveenbirkenbachandClaude Opus 4.7 7322c9637b test(environment): assert local caches saw deploy traffic
`07_deploy_minimal.sh` now snapshots Nexus request-log line count and
registry-cache HIT count before the deploy, runs the deploy, snapshots
again, and fails if neither counter grew. Catches regressions where
the runner-side wiring stops routing through the cache stack.

Helpers `cache_snapshot` and `assert_cache_used` live in `lib.sh` so
other environment scripts can reuse the same check.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 01:18:33 +02:00
kevinveenbirkenbachandClaude Opus 4.7 eb45f0ffaf feat(cache): inner-build override + TTL env-var + SPOT docs
Extend the local cache stack with three independent capabilities:

1. Inner-`dockerd` build coverage for HTTP-only package mirrors.
   `roles/sys-svc-compose/files/compose.py` (the runner's `compose`
   wrapper) auto-generates a transient `compose.cache.override.yml`
   per app when `INFINITO_PACKAGE_CACHE_FRONTEND_IP` is exported. The
   override pins `build.extra_hosts` for `deb.debian.org`,
   `archive.ubuntu.com`, and `security.ubuntu.com` to the frontend.
   `pull.py` now delegates to the wrapper so build/pull operations see
   the same `-f` set the wrapper auto-detects. nginx in the frontend
   gains a port-80 listener with path rewrites for those hostnames,
   and `package.sh` registers two new Nexus proxies
   (`apt-debian-security`, `apt-ubuntu-security`) for the security
   suites whose upstream URL prefix differs from the main archive.

   Alpine is intentionally excluded from the inner-build extra_hosts:
   3.18+ defaults to HTTPS, and inner-`dockerd` build containers do
   not import the frontend CA. Routing apk through the frontend would
   trip TLS verification.

2. General cache freshness env-var. `scripts/meta/env/cache/package.sh`
   exports `INFINITO_PACKAGE_CACHE_MAX_AGE_MIN` (default `129600`,
   i.e. 90 days). The bootstrap helper consumes it for every Nexus
   proxy's `contentMaxAge`, `metadataMaxAge`, and
   `negativeCache.timeToLive`, replacing the previous 1440-minute
   literal. Lower the value when chasing fast-moving upstreams.

3. SPOT cache documentation at `docs/contributing/environment/cache.md`.
   `compose.yml.md`, `variables.md`, the per-service READMEs, and
   `requirements/012-...` now link to it instead of restating the
   stack's behaviour. Net documentation lines drop substantially while
   the cache page becomes the single user-facing reference.

Also: code-comment cleanup per `docs/contributing/documentation.md`
guidelines across all touched .py / .sh / .yml files. Multi-paragraph
docstrings, banner separators, and restate-the-obvious comments are
removed; one-line WHY comments remain where the rationale is not
already visible in the code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 01:08:41 +02:00
kevinveenbirkenbach 67efa51a37 Merge pull request #211 from infinito-nexus/update/docker-image-versions-20260429
update(images): update Docker image versions
2026-04-30 00:08:06 +02:00
kevinveenbirkenbachandClaude Opus 4.7 1dbc44af2c refactor(cache): SPOT for compose-file flags + override env vars
Move the `docker compose -f ...` flag list and the cache-override
env-var setup into single helpers in `cli/deploy/development/common.py`:

  * `compose_file_args()` — decides whether to layer
    `compose/cache.override.yml` on top of `compose.yml`.
  * `cache_env_overrides()` — produces the env-var dict the
    override file requires strictly via `${VAR:?…}`.

Both `cli.deploy.development.compose` (up flow) and
`cli.deploy.development.down` (down flow) now call these helpers, so
up and down resolve to the same compose-file set and the same env
vars. Previously the cache env-var setup was duplicated inline in
compose.py and missing entirely from down.py, which made `make down`
fail under the `cache` profile with a confusing "required variable
missing" error before even reaching the orphan-cleanup step.

Single SPOT discipline: the host CA directory default lives only in
`scripts/meta/env/cache/package.sh` (sourced via BASH_ENV by every
Makefile recipe). `cache_env_overrides()` refuses to fall back to a
duplicate literal — a missing env var raises SystemExit pointing at
the env script. Tests that bypass the env layer set the var
explicitly so the SPOT-strict guard does not raise.

Containerize cert-gen: the original
`scripts/docker/cache/package-frontend-certs.sh` ran `mkdir`/`openssl`
host-side, which fails when `/var/cache/infinito` is not writable from
the invoking shell (sandboxed tooling, non-root operators). Move the
openssl logic into `compose/package-cache-frontend/cert-gen.sh` and
have the host wrapper docker-run it inside a throw-away alpine
container so the docker daemon (root) creates the bind-mount source
paths. Same pattern as how rpardini's registry-cache generates its CA
in-container.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 22:47:34 +02:00
kevinveenbirkenbachandCopilot Autofix powered by AI bae9d4a940 Potential fix for code scanning alert no. 280: Unused global variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-29 18:32:48 +02:00
github-actions[bot] c6e09ffd72 update(images): update Docker image versions 2026-04-29 16:32:47 +00:00
kevinveenbirkenbach ba5de986ef Merge pull request #208 from infinito-nexus/update/docker-image-versions-20260429
update(images): update Docker image versions
2026-04-29 18:32:20 +02:00
kevinveenbirkenbachandClaude Opus 4.7 334c915598 feat(cache): transparent TLS frontend + override-only gating
Add a TLS-terminating reverse proxy in front of the Sonatype Nexus 3 OSS
pull-through cache so the `infinito` runner can hit upstream
package-manager URLs (pypi.org, registry.npmjs.org, rubygems.org,
repo.packagist.org, proxy.golang.org, dl-cdn.alpinelinux.org,
files.pythonhosted.org, raw.githubusercontent.com, codeload.github.com)
unchanged and still flow through Nexus.

Mechanism:
  * scripts/docker/cache/package-frontend-certs.sh — host-side helper,
    idempotently generates a dedicated CA + per-hostname leaf certs.
  * compose/package-cache-frontend/upstreams.conf — nginx server-blocks
    that match SNI per hostname and reverse-proxy onto the matching
    Nexus repo path.
  * compose/cache.override.yml `infinito.extra_hosts` — DNS-hijack so
    the runner's clients resolve each upstream onto the frontend's
    static IP.
  * scripts/docker/cache/package-frontend-ca.sh — runner-side helper,
    drops the CA into the system trust store post-startup so apt/pip/
    curl/etc. accept TLS against the hijacked hostnames.
  * cli/deploy/development/compose.py — orchestrates cert gen before
    compose-up, CA install after health.

Scope today: runner-only. App-service Dockerfile builds executed by
the inner dockerd are NOT routed through the frontend; that requires
build-time CA injection and is deferred.

Also extends scripts/docker/cache/package.sh with five additional
Nexus proxies registered for transparent use: gem-proxy, go-proxy,
yum-rocky, yum-fedora, raw-packagist, raw-alpine, raw-codeload-github.

Refactor: move all cache services + runner-side cache mounts/depends_on/
extra_hosts from compose.yml into compose/cache.override.yml. Base
compose.yml now describes only the bare CI/runtime stack (coredns +
infinito). The override file is the single gate for the cache stack;
`profiles: ["cache"]` attributes and `--profile cache` flag emission
were redundant once file inclusion controls existence and removed
accordingly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 18:26:21 +02:00
kevinveenbirkenbachandClaude Opus 4.7 4b37e123d3 test(lint): cap production Python files at 500 lines
Adds a SPOT-aware lint that walks the repo via the cached
project-tree iterator (no `git` subprocess) and fails on any tracked
non-test Python file longer than 500 lines. Files under `tests/` are
intentionally excluded — coverage breadth there reflects feature
matrix, not design weight. A per-file `# nocheck` (or `#nocheck`)
marker in the first 30 lines opts the file out; the marker is
intentionally visible so the cost of carrying long modules is not
silently buried.

Gitignore-aware filtering moves to its own SPOT
-----------------------------------------------

The fnmatch-based `.gitignore` parser/matcher previously lived inline
in `tests/lint/repository/test_test_files_location.py` (and in
near-duplicates across other tests). Pull it into
`utils.cache.gitignore` as a single source of truth:

* `load_gitignore_patterns(root)` — cached pattern loader.
* `is_path_gitignored(rel_path, patterns)` — pure matcher.
* `iter_non_ignored_files(...)` — convenience iterator in
  `utils.cache.files` that composes the cached project walk with the
  matcher.

`utils.cache._reset_cache_for_tests` now resets the gitignore module
too, so test fixtures that mutate the tree see consistent state.

Refactor / opt-out for existing offenders
-----------------------------------------

Three production files exceeded the cap; addressed each:

* `roles/sys-svc-compose-ca/files/compose_ca.py` — opted out via
  `# nocheck: file-size`. The script is delivered to target hosts
  via `ansible.builtin.copy` and runs with only the stdlib; splitting
  would require also delivering a package, which the role does not
  do.
* `tasks/utils/migrate_meta_layout.py` — converted to a package
  (`tasks/utils/migrate_meta_layout/`) with focused submodules:
    - `__main__` — entrypoint + run-orchestration.
    - `yaml_io` — load/dump/empty-dir/deep-merge helpers.
    - `credentials` — schema-vs-config collision detection +
      runtime-to-schema conversion.
    - `role_builder` — per-role meta file emission.
    - `indices` — networks + ports + relays index builders.
  Run via `python3 -m tasks.utils.migrate_meta_layout`. Largest
  submodule is `role_builder.py` at 250 lines.
* `cli/fix/move_unnecessary_dependencies/__main__.py` — split
  alongside two new sibling modules in the same package:
    - `analysis` — provider/consumer static analysis.
    - `apply` — meta rewrite + guarded include-block prepending.
    - `yaml_io` — ruamel round-trip helpers + role-tree discovery.
  Largest submodule is `analysis.py` at 174 lines.

`make test` green (162 tests, 1 skipped); the new lint passes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 17:15:13 +02:00
kevinveenbirkenbachandClaude Opus 4.7 fe54854fe5 refactor(resolver): variant-aware combined resolver and per-round include
Single SPOT for matrix-deploy topology
=======================================

Before this change two paths derived the deploy plan from different
sources and could disagree:

 * Group inclusion (`--include` / `group_names`): driven by
   `cli.meta.applications.resolution.combined.CombinedResolver`,
   which read each role's `meta/services.yml` raw and ignored
   `meta/variants.yml` entirely. A variant that flipped
   `services.<X>.enabled` to a literal `true` did NOT pull `<X>`'s
   provider role into the deploy plan.

 * Inventory bake (`host_vars/applications.<app>.*`): driven by the
   variant-aware payload merge in `cli.deploy.development.inventory`,
   so the role saw the variant-merged services map at deploy time.

The split surfaced concretely for `web-app-wordpress` variant 0
(`services.discourse.enabled: true` in `meta/variants.yml`): the
inventory baked `discourse.enabled = true`, the wp-discourse plugin
task gate fired, and the install loop tried `docker exec discourse`
against a container the variant-blind resolver had never pulled.

This commit collapses both consumers onto the same per-round,
variant-merged services map. The variant-aware resolver (Phase 1+2)
is the additive plumbing, but the deploy/init wiring (Phase 3-5) is
what actually changes behaviour at runtime.

Variant-aware resolver (Phase 1+2)
----------------------------------

`role_introspection.load_shared_service_roles_for_app` accepts a
`services_override` kwarg; `CombinedResolver.__init__` accepts a
`{role_name: services_dict}` map and routes it through the loader.
A `CombinedResolver` instance is round-specific when overrides are
supplied — its per-role edge cache is variant-resolved, do NOT reuse
across rounds. The combined-resolver CLI gains
`--services-overrides <path>`.

`cli.deploy.development.deps.resolve_run_after` threads the
in-container path of the overrides JSON into the resolver
invocation.

Per-round include planner (Phase 3)
-----------------------------------

`cli.deploy.development.inventory.plan_dev_inventory_matrix` now
takes `primary_apps` (just the user-named apps) instead of a
pre-resolved `include` list and returns a 4-tuple per round
`(round_index, inv_dir, round_variants, include_R)`. Per round it:

 1. Computes `round_variants` clamped to each primary's variant
    count.
 2. Builds variant-merged services overrides for every role with a
    `meta/variants.yml`, picking that role's variant for the round
    (clamped) — so transitive deps with their own variants follow
    the round.
 3. Runs `CombinedResolver(services_overrides=...)` per primary and
    unions the result with the primary apps in user order.
 4. Extends `round_variants` with the discovered deps' clamped
    variant indices so the deploy step's per-round purge logic stays
    accurate.

`build_dev_inventory_matrix` keeps its name but signature changes:
it now takes `primary_apps` and an optional `include_filter` for
SERVICES_DISABLED-style consumer filters.

Init / deploy wiring (Phase 4-5)
--------------------------------

`init.py` and `deploy.py` consume the per-round `include_R`
directly, drop the old `resolve_deploy_ids_for_apps` pre-resolution
step, and apply the SERVICES_DISABLED provider filter on the
include set so the inventory `--include` flag and the final ansible
deploy ids stay in lockstep.

Behaviour invariance for non-variant roles
------------------------------------------

Apps with no `meta/variants.yml`, or without a `services.<X>.enabled`
override on any variant, behave identically to before:

 * The override map for those roles is empty — resolver falls
   through to the disk-only path.
 * Per-round `include_R` collapses to the same set every round.
 * Inventory bake outputs the same `applications.<app>.*` shape.

The behaviour change is scoped to roles that legitimately use
variants to flip topology. In the current repo only
`web-app-wordpress` is affected (variant 0 pulls
`web-app-discourse` in; variant 1 leaves it out, exercising the
multisite-without-discourse path).

Test surface
------------

 * `tests/unit/cli/deploy/development/test_inventory.py` updated
   for the new planner signature, mocking
   `_resolve_round_include` / `_build_services_overrides_for_round`
   so the planner's tuple shape is asserted independently of the
   live resolver.
 * `tests/unit/cli/deploy/development/test_matrix_deploy.py` adds a
   `_entry()` helper that defaults `include` to the keys of
   `round_variants`, so existing fixtures stay terse — round 0 of
   the deploy loop deploys whatever is in `include_R`, and the
   variant-aware planner naturally emits the same set.
 * `tests/unit/utils/cache/test_data.py` pins the planner contract
   (`primary_apps=`, 4-tuple plan entries with `include_R`).
 * `tests/utils/__init__.py` added so the
   `tests.lint.filesystem.test_init_files` lint test passes
   end-to-end (the directory existed in the tree without an
   __init__.py and tripped the lint).

Verification
------------

 * `make test` green (162 tests, 1 skipped) on the merged tree.
 * `make deploy-fresh-kept-apps APPS="web-app-wordpress"
   FULL_CYCLE=true SERVICES_DISABLED="matomo,email"` end-to-end:
   round 0 (variant 0, single-site + Discourse integration) and
   round 1 (variant 1, multisite) each ran PASS 1 (sync) and PASS 2
   (async), all four passes with `failed=0 rescued=0`. Round 0's
   per-round include contained `web-app-discourse`; round 1's did
   not — exactly the variant-driven topology the resolver is
   supposed to produce.

The unrelated Joomla CLI install race (CI run 25079786137 `Deploy
web-app-joomla`) is parked separately as infinito-nexus/core#209;
its candidate fix is in that issue body, not in this commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 16:28:12 +02:00
kevinveenbirkenbachandClaude Opus 4.7 35787ab5aa fix(web-app-discourse): mark as discourse-service provider
`utils/service_registry.discover_role_services` requires `shared: true`
on the role's primary services entry to register the role as a
provider. The `discourse:` entry in
`roles/web-app-discourse/meta/services.yml` only carried image /
plugin / port metadata, so the registry never mapped the `discourse`
service key to `web-app-discourse`.

Effect of the miss: any consumer role that declared
`services.discourse.enabled: ...` (e.g. web-app-wordpress'
wp-discourse plugin gate) could not be resolved to
`web-app-discourse` by the deploy planner. Discourse was never
pulled into the inventory, the wp-discourse plugin task fired on a
host where no `discourse` container existed, and Ansible aborted
with `docker exec discourse … Error response from daemon: No such
container: discourse`. Reproduced on test-deploy-server matrix run
25079786137 (`Deploy web-app-wordpress`).

Add `shared: true` and the matching `enabled: true` so the registry
recognises the provider. The lint test
`tests/lint/ansible/roles/test_service_core_first_task_run_once.py`
flips on for shared-provider roles and requires
`utils/once/flag.yml` to be the first task in `tasks/01_core.yml`
(prevents recursion in dynamic service loading via load_app.yml when
a second load attempt evaluates the run_once flag before the role
sets it). Move the include up accordingly.

`make test` green after the change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 16:28:11 +02:00
github-actions[bot] b5d9714207 update(images): update Docker image versions 2026-04-29 11:56:39 +00:00
kevinveenbirkenbach e9957bdb8a Merge pull request #205 from infinito-nexus/update/skills-20260428
update(skills): update agent skills to latest versions
2026-04-29 13:56:17 +02:00
kevinveenbirkenbach 8751a092e5 Merge pull request #207 from infinito-nexus/update/skills-20260429
update(skills): update agent skills to latest versions
2026-04-29 13:54:07 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c88d90677f ci(test-environment): cap caches and move bind paths to /mnt
The orchestrator at scripts/tests/environment/00_orchestrator.sh
unsets GITHUB_ACTIONS to simulate local dev, which flips
Profile.registry_cache_active() to True and activates the `cache`
compose profile (registry-cache + package-cache) even on hosted
runners. Without explicit caps, the half-of-free heuristic in
scripts/meta/env/cache/{registry,package}.sh would claim ~7g+~7g on
the runner's small / partition (~14 GB free after free-disk-space
step), competing with /home/runner/work and other ephemera.

Override INFINITO_REGISTRY_CACHE_*/INFINITO_PACKAGE_CACHE_* in the
test-environment.yml job env so:

- Bind paths land on /mnt/cache/... — shares the 74 GB ephemeral
  disk with /var/lib/docker (already at /mnt/docker) instead of
  stressing /.
- Caps sized for in-run post-prune re-pulls: rpardini=8g (fits one
  deploy's in-use image set), Nexus blobstore=4g (pip/npm/apt
  artefacts), heap=1g/direct=1g (OSS minimum is enough for a
  pull-through proxy). Leaves ~62 GB headroom on /mnt for Docker
  layer storage.

The cache.sh scripts gate every default with `if [[ -z … ]]` /
`: \"\${VAR:=…}\"`, so pre-set values bypass the heuristics; local
dev behaviour is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 11:04:14 +02:00