mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 04:06:42 +00:00
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>
Integration Tests 🔗
See integration.md for the SPOT: framework, requirements, directory structure, and make test-integration usage.