CodeQL flagged five notes on PR #1215: four test modules imported unittest both as a module and through from-import, and sys-front-inj-matomo's __init__ exported PROJECT_ROOT without declaring it, so the import from test_site_cache.py read as unused. The modules now bind mock through import unittest.mock as mock, and the package declares __all__, the same fixes main carries from3610e7b9efand6e776a5780. The same pattern is fixed in the new Talk direct-media test and the decommission integration package, and the coturn test package drops an __init__ export nothing imports. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Role Structure Tests 📚
Integration tests that enforce structural invariants of every role under roles/: folder-name conventions and include_tasks / import_tasks target existence.
Tests in this directory MUST only cover role-level structural rules (folder naming, role-name regex). meta/main.yml presence and field checks MUST live under meta/. Dependency-graph checks (self-, circular, unnecessary dependencies, run_after) MUST live under meta/dependencies/ (and the sibling meta/services/run_after/). Application-specific role rules (web-app README, applications[...] / group_names usage, application_id identity) MUST live under applications/. run_once_<role> flag lifecycle checks MUST live under run_once/. Block-level when: hygiene (guard blocks, duplication, size) MUST live under when/. include_tasks / import_tasks / include_role / import_role target existence MUST live under includes/. Compose- or handler-specific checks MUST live in their respective topical clusters.
For framework, directory layout, and make test-integration usage see integration.md.