Commit Graph
664 Commits
Author SHA1 Message Date
kevinveenbirkenbach ccb3e8a96c Merge branch 'main' of github.com:infinito-nexus/core into fix/users-applications.yml 2026-04-19 03:29:31 +02:00
kevinveenbirkenbachandClaude Opus 4.7 433a4138dd feat(ci): recognize chore branch prefix
Treat chore/** branches like feature/fix/etc. for CI: trigger the
push pipeline on chore/** pushes and accept chore as a valid PR
branch prefix in full scope. This unblocks the chore/update-* PRs
that update.yml creates automatically, which previously failed
branch-prefix validation and never triggered the push pipeline.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:11:28 +02:00
kevinveenbirkenbachandClaude Opus 4.7 918c49add1 perf(lookups): cache applications_current_play + tag templar inputs
Speed up per-play lookups that previously re-read YAML and re-templated
against a cold Templar on every invocation:

- applications_current_play: cache the rendered applications map keyed
  on the current play's identity so the 28+ plugin install calls reuse
  one resolved result.
- runtime_lookup_data / load_app: memoize the raw applications load and
  reuse it from the templar path instead of rereading group_vars.
- templating: merge caller-supplied variables onto templar's existing
  available_variables (keeping ansible_facts / hostvars visible) and
  tag the input with TrustedAsTemplate so Ansible 2.19+ actually
  renders {{ ... }} instead of returning it unchanged.

Tests: add integration perf test + unit regression guarding the
available_variables merge restores prev state after the call.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 00:22:06 +02:00
kevinveenbirkenbach 59173f7274 Merge branch 'main' into fix/users-applications.yml 2026-04-17 00:02:48 +02:00
kevinveenbirkenbachandClaude Opus 4.7 48ccda7288 docs(agents/debug): split debug runbook into local/pipeline/log scopes
Replace the single docs/agents/action/debug.md with a debug/ directory
hosting three distinct workflows: local-deploy debugging, fully
automated CI pipeline triage via gh, and inspection of operator-placed
log files. Add full pipeline triage flow (enumerate failed runs and
children, classify branch-caused vs external, dedup-then-create issues
on s.infinito.nexus, iterate per role batches with APPS cap, push the
fix branch, file follow-up issues for unresolved root causes).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-16 22:34:41 +02:00
kevinveenbirkenbachandClaude Opus 4.6 e2016cd320 fix(users-applications): unify runtime lookup of users/applications
Lookups for 'service', 'service_registry', and 'applications_current_play'
always re-derive the merged applications mapping from inventory+role defaults
instead of trusting the passed kwargs, which could be shadowed or left
unrendered by nested template evaluations.

Dashboard/keycloak tests now consume the administrator password via
lookup('users','administrator').password so the rendered Playwright .env
matches the realm user provisioned by Ansible. Remove the hardcoded
DASHBOARD_KEYCLOAK_TEST_LOGIN_PASSWORD / KEYCLOAK_LOCAL_REALM_ADMIN_PASSWORD
overrides that previously masked the mismatch.

run_one.yml: drop users/applications from the template vars block. Those
entries created a shadowing context that broke nested lookup('users', ...)
inside lookup('template', ...).

utils/runtime_lookup_data: decrypt Ansible 2.19 EncryptedString values at
the lookup boundary and try templar rendering before falling back to
aggregated defaults when override mappings arrive as placeholders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 21:21:09 +02:00
kevinveenbirkenbachandClaude Opus 4.7 764060c793 chore(claude): expand sandbox network/write paths, ignore host artefacts
Network gate does not honor wildcards, so allowedDomains is enumerated
explicitly for every host the agent + tooling actually need. Adds
~/.cache/pip, ~/.venvs, ~/.ansible to allowWrite so the pre-commit
make test hook can install the editable package and run ansible.

Adds host shell / editor / tooling state files to .gitignore (and the
auto-generated .dockerignore mirror) so they never become part of the
working tree. Switches the dependabot coverage test to git ls-files
with an os.walk fallback that derives its skip list from the live
.gitignore, so it stays correct in container test environments
without .git/ while still ignoring untracked host artefacts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-16 19:24:31 +02:00
kevinveenbirkenbach 34ddc4d2d2 Merge branch 'main' into fix/users-applications.yml
# Conflicts:
#	group_vars/all/00_general.yml
#	roles/web-app-dashboard/templates/playwright.env.j2
#	roles/web-app-nextcloud/config/main.yml
#	roles/web-app-nextcloud/templates/playwright.env.j2
2026-04-16 11:54:20 +02:00
kevinveenbirkenbach 262e1b43fc Merge branch 'main' into fix/users-applications.yml
# Conflicts:
#	docs/contributing/design/services.md
#	plugins/lookup/applications_current_play.py
#	plugins/lookup/service.py
#	roles/sys-stk-backend/lookup_plugins/service_should_load.py
#	roles/sys-stk-backend/tasks/_load_service.yml
#	roles/sys-stk-backend/vars/main.yml
#	roles/sys-svc-compose/templates/base.yml.j2
#	roles/sys-svc-mail/tasks/01_core.yml
#	roles/sys-utils-service-loader/tasks/load_frontend_service.yml
#	tests/unit/plugins/lookup/test_applications_current_play.py
#	tests/unit/plugins/lookup/test_service.py
#	tests/unit/roles/sys-stk-backend/lookup_plugins/test_service_should_load.py
2026-04-15 23:59:54 +02:00
kevinveenbirkenbachandClaude Opus 4.6 b70a783423 refactor(lookups): migrate to runtime applications/users lookups
Replaces inline `applications`/`users` merging with dedicated lookup
plugins and runtime hydration. Introduces `add_csp_hash` filter,
integrates sort into `find_dock_val_by_bkp_entr`, splits the Keycloak
one-shot realm import into `05a_realm_import_run.yml`, and fixes the
Mastodon administrator task YAML. Removes obsolete `csp_hashes` filter,
`sys-token-store` Jinja filter, and empty CLI setup modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 23:44:19 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 1bcb7cfbb0 Merge branch 'main' into feature/service-refactoring
Resolve conflicts:
- docs/agents/action/iteration.md: keep both new bullets (SERVICES_DISABLED
  proposal + make test requirement)
- docs/contributing/design/services.md: deleted (renamed to
  docs/contributing/code/services.md in this branch)
- group_vars/all/20_services.yml: keep deletion from this branch (req-001)
- tests/lint/ansible/roles/test_service_core_first_task_run_once.py:
  use build_service_registry_from_roles_dir (req-001) with repo_root()
  from main for robust path resolution

Fix broken relative links caused by rename and deletion of files:
- docs/contributing/design/architecture.md: services.md → ../code/services.md
- docs/contributing/design/exceptions.md: load_frontend_service.yml →
  load_service.yml
- docs/requirements/001-service-registry-refactoring.md: fix paths for
  unit.md, integration.md, principles.md, documentation.md, AGENTS.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:58:51 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 be6a310d59 refactor(services): implement role-local service registry (req-001)
- Delete group_vars/all/20_services.yml; all service metadata now lives
  in each role's config/main.yml under compose.services.<name>
- Rename generic 'database' service key to explicit 'mariadb'/'postgres'
  across all app roles; remove legacy type: field
- Add utils/service_registry.py and plugins/lookup/service_registry.py
  as the single source of truth for service discovery
- Add utils/database_service.py to centralize DB service resolution
- Delete service_load_enabled filter and service_should_load lookup;
  replaced by service lookup plugin
- Update sys-utils-service-loader to run in constructor stage and use
  generic load_service.yml; remove load_frontend_service.yml
- Add _service_loader_preloading guard to sys-svc-compose,
  sys-svc-webserver-core and sys-ctl-alm-compose to prevent
  health-checks/alarms from firing during preload phase
- Replace manual load_app.yml calls for shared DB/Mailu with assert-
  based preload validation in sys-svc-rdbms and sys-svc-mail
- Update networks.yml.j2 templates to resolve LDAP/AI networks via
  service_registry instead of hardcoded role names
- Migrate all tests to new service discovery API; delete obsolete tests
- Update docs/contributing/code/services.md to reflect role-local model

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:33:20 +02:00
Environment TestandClaude Sonnet 4.6 c572e426f0 fix(sshd): replace block/rescue with register+conditional to fix missing diagnostics
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 09:14:13 +02:00
Environment TestandClaude Sonnet 4.6 6ba6333748 fix(test): whitelist ansible-provided vars in variable definitions test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 07:47:29 +02:00
Environment TestandClaude Sonnet 4.6 83262816a3 docs(contributing): apply documentation.md rules across all staged files
- Move emojis after headline text (CONTRIBUTING.md, actions/, design/, tools/, tests/)
- Replace em dashes with colons, semicolons, or complete sentences throughout
- Add missing emojis to all headlines in exceptions.md, principles.md, services.md, shell.md, setup.md, pull-request.md, commit.md, act.md, docker.md, pr/README.md
- Update H1 titles to reflect renamed directories (actions/, design/)
- Fix broken relative links in workflow.md after directory moves
- Fix full-path link texts in services.md (style.css.md, javascript.js.md)
- Fix broken principles.md link to lint.md after testing/ → actions/testing/ move

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 21:06:17 +02:00
Environment TestandClaude Sonnet 4.6 08bb7fefc0 refactor(docs): move code/tests → contributing/testing, lint tests to lint/ansible, apply documentation.md rules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 19:55:25 +02:00
Environment TestandClaude Sonnet 4.6 eebb3b9788 refactor(utils): move utils/docker/image_*.py into utils/docker/image/ subpackage
- Move image_discovery.py → utils/docker/image/discovery.py
- Move image_ref.py → utils/docker/image/ref.py
- Add utils/docker/image/__init__.py
- Update all imports and references across cli/, tests/, utils/, and docs/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 19:00:02 +02:00
Environment TestandClaude Sonnet 4.6 9ea2ad6ff1 refactor(docker): introduce utils/docker/image_discovery as single SPOT for image enumeration
- Move iter_role_images + all helpers + ImageRef from cli/mirror/util.py and
  cli/mirror/model.py into utils/docker/image_discovery.py; add source_file field
  to ImageRef to distinguish config/main.yml vs vars/main.yml entries
- Delete cli/mirror/util.py; update all callers to import from utils.docker.image_discovery
- Move utils into subpackages: utils/docker/ (image_ref, paths_utils, hadolint) and
  utils/roles/ (dependency_resolver, resource_validation); update all imports
- Reorganise tests into subpackages: tests/lint/docker/dockerfile/, tests/integration/docker/,
  tests/unit/utils/docker/, tests/unit/utils/roles/; fix parents[N] offsets after relocation
- tests/lint/docker/test_image_versions.py now uses iter_role_images (same SPOT as mirror)
- Add vars/main.yml images.<name>.{image,version} support for non-application roles
  (test-e2e-playwright, sys-ctl-hlth-csp); eliminate hardcoded duplicates in defaults/tasks
- Add web-app-matrix matrix-chatgpt-bot and web-app-mini-qr mini-qr entries in config/main.yml;
  replace hardcoded image strings in vars/templates with lookup('config', ...) references
- Fix sync/__main__.py log line to use correct registry prefix for non-Docker-Hub images
- Update docs/contributing/code/role/dockerfile.md with image declaration rules and SPOT reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 19:32:31 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 eee3a4487c fix(tests): update shopware integration test for files/Dockerfile migration
The test was still pointing to templates/Dockerfile.j2 and checking for
Jinja2 syntax. Update path to files/Dockerfile and assertion to ARG/Docker
variable syntax after the Dockerfile.j2 → files/Dockerfile refactor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:52:39 +02:00
kevinveenbirkenbach db44c998c2 fix codeql workflow coverage 2026-04-08 18:14:10 +02:00
kevinveenbirkenbach 3dc243fb0d fix dependabot coverage and environment test scripts 2026-04-08 18:01:42 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 72d3f4c23e docs(tests): add README.md to all test directories with links to SPOT docs
Replace stale unit test README with a pointer to the canonical unit.md guide.
Add index README to tests/ and per-directory READMEs for e2e, integration,
lint, and regression — each linking to the matching docs/contributing page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 23:52:45 +02:00
kevinveenbirkenbach 60beb236a6 refactor(pixelfed): replace structural bootstrap test with code comments 2026-04-01 23:04:36 +02:00
kevinveenbirkenbach 5db1ff8e7f fix(services): resolve transitive shared asset dependencies 2026-04-01 23:01:09 +02:00
kevinveenbirkenbach 8141c4281a fix(pixelfed): stabilize bootstrap with managed entrypoint 2026-04-01 22:09:36 +02:00
kevinveenbirkenbach 9ccdde2b5b refactor(services): extract shared frontend service loader role 2026-04-01 04:05:44 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 a2d844e798 refactor: move frontend service loading out of sys-front-inj-all into global stage
Extracts the shared frontend service loader from sys-front-inj-all into
tasks/utils/load_services.yml and tasks/utils/_load_frontend_service.yml,
called once from tasks/stages/02_server.yml before web-svc and web-app
roles. This decouples service loading from per-app injection and makes
load order explicit via SERVICE_REGISTRY entry order. Updates docs,
comments, and adds an integration test enforcing the new SPOT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 03:30:19 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 be341234bb feat: register web-app-mailu as 'email' service and enforce dependency
- Add 'email' key (role: web-app-mailu, type: frontend) to SERVICE_REGISTRY
- Declare compose.services.email with enabled: true and shared: true in all
  33 app roles that reference web-app-mailu or use SYSTEM_EMAIL_* variables
- Add integration test test_mailu_service_dependency.py that enforces this
  constraint for any future role additions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 01:13:56 +02:00
kevinveenbirkenbach 00193b4a23 Rename the canonical services map to SERVICE_REGISTRY 2026-03-31 21:43:29 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 ec2b513bde feat(config): enforce shared consistency for all enabled services
- Add shared: true to logout, oauth2, and greenlight services wherever
  enabled: true was set without a shared declaration
- Add # noqa: shared comment before role-local internal containers
  (redis, worker, web, opensearch, search) that are intentionally
  not shared
- Add missing enabled: false to ollama in svc-ai-ollama (shared was
  declared without enabled, violating the new consistency rule)
- Add integration test test_service_shared_consistency to enforce:
  Rule 1: enabled=true requires shared=true or a # noqa: shared comment
  Rule 2: shared key requires enabled key to be present

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 20:13:34 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 1241fa4011 style(tests): apply linter formatting to test_services_canonical.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 16:14:33 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 c74bd98969 feat(services): introduce canonical field for shared-role service entries
Adds canonical: cdn to css/javascript entries in 20_services.yml so that
role-based reverse lookup (web-svc-cdn → cdn) is deterministic. Updates
_build_role_to_key to use the canonical field. Adds an integration test
verifying bidirectional resolution and a lint test enforcing canonical
consistency rules (exactly one primary, no chaining, matching roles).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 15:58:54 +02:00
kevinveenbirkenbach b8a2b4337b Move web app playwright spec test to lint 2026-03-28 09:18:47 +01:00
kevinveenbirkenbach 327179b0c2 Format cancel pull request test path 2026-03-28 09:17:58 +01:00
kevinveenbirkenbach a67df006aa Fix stale cancel pull request test path 2026-03-28 09:10:45 +01:00
kevinveenbirkenbach 698f589a65 move todo transparency test to lint 2026-03-28 02:30:06 +01:00
kevinveenbirkenbach 507f1386a7 refactor: reorganize agent docs 2026-03-28 01:29:16 +01:00
kevinveenbirkenbach 4e05f4ddeb Move static checks to lint 2026-03-27 23:28:44 +01:00
kevinveenbirkenbach 50bde25f58 docs: move environment guides 2026-03-27 23:10:33 +01:00
kevinveenbirkenbach c2438c2b6a ci: reorganize PR resolver scripts 2026-03-27 15:17:17 +01:00
kevinveenbirkenbach 11149f3434 ci: gate PR workflow by file scope 2026-03-27 14:54:54 +01:00
kevinveenbirkenbach 4a9ae3b706 Deleted tests/integration/TODO.md 2026-03-27 14:09:31 +01:00
kevinveenbirkenbach 7b61f515f1 Refine TODO transparency warnings 2026-03-27 13:49:05 +01:00
kevinveenbirkenbach cd7f6f050a Add Dockerfile template warning test 2026-03-27 00:30:07 +01:00
kevinveenbirkenbach b4b863676c Fix cancellation of closed fork PR runs 2026-03-26 08:31:12 +01:00
kevinveenbirkenbach a2219a3af7 Add OIDC and OAuth2 mutual exclusion test 2026-03-26 02:39:12 +01:00
kevinveenbirkenbach 66bbffe963 Fix docker image reference scan hints 2026-03-25 19:24:53 +01:00
kevinveenbirkenbach 80d879c271 Ignore JS and JSON files in raw docker command test 2026-03-25 17:56:38 +01:00
kevinveenbirkenbach cc910167e9 Guard empty deploy matrices and ignore JSON docker scan 2026-03-25 15:44:56 +01:00
kevinveenbirkenbach 38cf91aaef Removed unneccessary warning emoji 2026-03-25 15:44:55 +01:00