mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-03 08:17:52 +00:00
The guard recognised meta/services.yml as the only place a git URL may be declared.84a4b04f0made meta/addons/<id>.yml the one place a Discourse plugin pins itself, so the addon files now carry the clone URL literally, and _iter_role_files picks up every .yml under the role: each declaration reported itself as an undeclared reference. Two halves. The declaration set is now the union over meta/services.yml and every meta/addons/*.yml, so an addon pin legitimises that URL for the whole role, not just for the file holding it. Path.glob on a missing meta/addons yields nothing, so roles without addons need no special case. The self-skip that kept services.yml out of the scan is now a membership test against exactly those declaration paths. Scope stays per role: declared is rebuilt inside the role loop, so a declaration in one role legitimises nothing in another. The failure message and the docstring name both sites, otherwise they send the next reader to the wrong file. This is the test-side counterpart ofe4141cb826, which taught collect_entries to see the same addon refs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Role meta/main.yml Tests 🧾
Integration tests that enforce invariants of each role's meta/main.yml: the file MUST exist for every role under roles/, and galaxy_info MUST carry the fields the Sphinx generator expects (non-empty description, no None values).
Tests in this directory MUST only cover meta/main.yml presence and field shape. Tests about role dependencies declared in that file (dependencies:) MUST live under dependencies/; checks tied to meta/services.yml MUST live under services/ (with the ordering-only galaxy_info.run_after checks under services/run_after/); checks against meta/variants.yml MUST live under variants/.
For framework, directory layout, and make test-integration usage see integration.md.