diff --git a/.gitea/workflows/AGENTS.md b/.gitea/workflows/AGENTS.md index 559ac58..a87c1a3 100644 --- a/.gitea/workflows/AGENTS.md +++ b/.gitea/workflows/AGENTS.md @@ -115,9 +115,11 @@ issue. scenario for any other file, `requirements-molecule.*` included; `requirements-dev.*`, and `lint.yml` and `build.yml` with their `ci` pins, are on IGNORED. *Why:* a full run takes the single runner slot for a long time. *Held:* control: the selector and its tests. -- **A role named in an include, import, play `roles:` entry or meta dependency is written out in - full**, never bare or templated. *Why:* the selector finds dependent roles by their FQCN. - *Held:* control: a selector test fails a bare or templated name. +- **A role named in an include, import or play `roles:` entry is written out in full**, never + bare or templated, and no role declares `meta/main.yml` `dependencies` + ([roles/AGENTS.md](../../roles/AGENTS.md)). *Why:* the selector finds dependent roles by their + FQCN. *Held:* control: a selector test fails a bare or templated name and a non-empty + `dependencies`. - **Scenarios load `mortis.kamino` from the checkout, never from an installed copy, so `galaxy.yml` is on IGNORED.** *Why:* the checkout is first on `ANSIBLE_COLLECTIONS_PATH` and the shared base config `.config/molecule/config.yml` turns off molecule's install of the collection diff --git a/roles/AGENTS.md b/roles/AGENTS.md index fa2ad14..839a821 100644 --- a/roles/AGENTS.md +++ b/roles/AGENTS.md @@ -114,7 +114,9 @@ names a check that does not exist yet and its backlog issue. only on a supported entry point, an internal role on any entry point in its argument_specs. *Why:* a task-level include keeps the order readable, where `meta` dependencies run hidden and deduplicated. *Held:* the selector runs a dependent role's scenarios when a role it uses - changes; review for empty `dependencies` until Lint fails a non-empty one (#246). + changes; control: `test_roles_call_each_other_by_full_name_only` in + `tests/scripts/test_select_molecule_scenarios.py`, run by the Lint check, fails a non-empty + `dependencies`. - **Internal roles.** A leading `_`; only roles of this Collection call it, by FQCN; it refuses to run without a parent role (an `assert` on `ansible_parent_role_names`, as in `_binary_update`); it has argument_specs and Molecule scenarios and follows the platform rules. diff --git a/scripts/select_molecule_scenarios.py b/scripts/select_molecule_scenarios.py index 73aa390..ed8fa8c 100644 --- a/scripts/select_molecule_scenarios.py +++ b/scripts/select_molecule_scenarios.py @@ -28,8 +28,9 @@ Only a pull request is narrowed, and only when is given and EVENT_NAM A role uses another when any file under its directory names it as `mortis.kamino.` (an include_role, a scenario's prepare play, a comment). The relation is transitive: when `a` names `b` and `b` names `c`, a change to `c` selects all three. The roles call each other -by that full name only (a test checks includes, imports, play `roles:` entries and meta -dependencies for a bare or templated role name), so the text search finds every use. It reads the +by that full name only (a test checks includes, imports and play `roles:` entries for a bare +or templated role name, and that no role declares meta dependencies), so the text search finds +every use. It reads the tree under test, not the base: a pull request that drops a use also changes the using role, which then selects itself, and a role the pull request deletes or renames still counts as used by the roles that name it. A shared file outside roles// (a plugin) already selects