Stacked on #116: merge that first. Until then this pull request also shows its commit (4d330d4); the three commits below are this one's own.
What
ci(molecule): cancel superseded pull request runs: a new commit on a pull request cancels its running Molecule run, like Lint and Build (group per ref for pull requests, per SHA otherwise, so a run on main is never cancelled). The old single molecule group existed so two runs never shared the runner's Docker daemon, whose container names are fixed. That is now the runner's single slot (gitea_runner_capacity: 1 in the maintainer's environment repository), stated in the workflow comment and CLAUDE.md: raising that capacity needs a lock or a shared group again. A cancelled run is killed before molecule can destroy its container, so the run step first removes the containers of every scenario by their exact platform names, whether or not this run selects it.
ci(molecule): drop the leading destroy from every scenario's test sequence: about 6 s per scenario, 42 s per full run. The first destroy runs against a container that is not there and only waits out the Docker driver's fixed 5 s poll. Safe because the run step clears stale containers first, and molecule's state file lives under the job's own ANSIBLE_HOME (Runtime(isolated=False) in molecule 26.11), which is deleted with the checkout, so a cancelled run cannot make the next one skip create or prepare. The rest of the sequence is molecule's default.
ci(molecule): run every scenario nightly: 04:43 UTC, after Renovate's 03:17 run (single slot). Pull requests now run fewer scenarios, so drift in the others (a package mirror, the runner's molecule venv) would otherwise wait for the next push to main.
Verified
Script tests, actionlint, yamllint, REUSE and the pre-commit hooks pass.
The explicit test_sequence equals molecule 26.11's default minus the first destroy; its step names are valid for the version the runner pins (read from the source, not run).
The container-name filters match all seven platform names (<role>-instance, image-smoke, image-smoke-2604) and Docker's leading /.
The schedule path (if: guard, checkout SHA/REF, selector falling back to all, concurrency group) was read through for event_name == 'schedule'.
Independent review of the diffs, whose findings are folded in (an earlier flock was removed as redundant on a single-slot runner).
Not verified
Nothing has run in CI. The cancellation itself, on the runner's host executor, is the main unknown: push twice quickly to a pull request and check that the first run is cancelled and the second passes. A cancelled run's orphaned processes may live briefly; the cleanup bounds the damage to one failed run.
The cleanup removes any container on that daemon named *-instance or image-smoke*; the daemon is the runner's own, dedicated to this.
The nightly run's first execution will show the schedule path end to end.
**Stacked on #116: merge that first.** Until then this pull request also shows its commit (`4d330d4`); the three commits below are this one's own.
## What
1. `ci(molecule): cancel superseded pull request runs`: a new commit on a pull request cancels its running Molecule run, like Lint and Build (group per ref for pull requests, per SHA otherwise, so a run on `main` is never cancelled). The old single `molecule` group existed so two runs never shared the runner's Docker daemon, whose container names are fixed. That is now the runner's single slot (`gitea_runner_capacity: 1` in the maintainer's environment repository), stated in the workflow comment and CLAUDE.md: raising that capacity needs a lock or a shared group again. A cancelled run is killed before molecule can destroy its container, so the run step first removes the containers of every scenario by their exact platform names, whether or not this run selects it.
2. `ci(molecule): drop the leading destroy from every scenario's test sequence`: about 6 s per scenario, 42 s per full run. The first `destroy` runs against a container that is not there and only waits out the Docker driver's fixed 5 s poll. Safe because the run step clears stale containers first, and molecule's state file lives under the job's own `ANSIBLE_HOME` (`Runtime(isolated=False)` in molecule 26.11), which is deleted with the checkout, so a cancelled run cannot make the next one skip `create` or `prepare`. The rest of the sequence is molecule's default.
3. `ci(molecule): run every scenario nightly`: 04:43 UTC, after Renovate's 03:17 run (single slot). Pull requests now run fewer scenarios, so drift in the others (a package mirror, the runner's molecule venv) would otherwise wait for the next push to `main`.
## Verified
- Script tests, `actionlint`, `yamllint`, REUSE and the pre-commit hooks pass.
- The explicit `test_sequence` equals molecule 26.11's default minus the first `destroy`; its step names are valid for the version the runner pins (read from the source, not run).
- The container-name filters match all seven platform names (`<role>-instance`, `image-smoke`, `image-smoke-2604`) and Docker's leading `/`.
- The schedule path (`if:` guard, checkout SHA/REF, selector falling back to all, concurrency group) was read through for `event_name == 'schedule'`.
- Independent review of the diffs, whose findings are folded in (an earlier `flock` was removed as redundant on a single-slot runner).
## Not verified
- Nothing has run in CI. The cancellation itself, on the runner's host executor, is the main unknown: push twice quickly to a pull request and check that the first run is cancelled and the second passes. A cancelled run's orphaned processes may live briefly; the cleanup bounds the damage to one failed run.
- The cleanup removes any container on that daemon named `*-instance` or `image-smoke*`; the daemon is the runner's own, dedicated to this.
- The nightly run's first execution will show the `schedule` path end to end.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A pull request now runs the scenarios of the roles it touches, none when it
touches only paths no scenario reads, and everything for any other file, for
every push to main and for manual dispatch. The job stays unconditional so
Molecule can remain a required check.
scripts/select_molecule_scenarios.py makes the choice and is run from the base
branch's copy, so a pull request cannot edit its own rules. A changed role
that exists but has no scenario fails instead of passing with nothing tested.
The scenario loop no longer gives molecule the list as stdin, which a child
could have drained, and fails when it ran fewer scenarios than were selected.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
A new commit on a pull request now cancels its running Molecule run, as for
Lint and Build; a run on main is never cancelled (its group is the commit SHA).
The old global concurrency group kept two runs off the runner's shared Docker
daemon, whose container names are fixed. That is now the runner's single slot
(gitea_runner_capacity: 1), as the workflow comment and CLAUDE.md say. A
cancelled run is killed before molecule can destroy its container, so the run
step first removes the containers of every scenario by their exact platform
names, whether or not this run selects that scenario.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
The first destroy runs against a container that is not there and only waits out
the Docker driver's fixed 5 s poll, about 6 s per scenario and 42 s per full
run. The run step already removes what a killed run left, and molecule's state
file lives under the job's own ANSIBLE_HOME (Runtime(isolated=False)), which is
deleted with the checkout, so a cancelled run cannot make the next one skip
create or prepare. The rest of the sequence is molecule's default.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
A pull request runs only the scenarios of the roles it changes, so drift in the
others (a package mirror, the runner's molecule venv) would wait for the next
push to main. A nightly run of everything bounds that. It is scheduled after
Renovate's run, since the runner has a single slot.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
ansible-test sanity runs pylint over scripts/ and tests/scripts/ too and
rejects a mutable default argument (environ=os.environ) and `_` as a variable
name. main() now takes environ=None and reads os.environ itself, and the tests
name the values they ignore.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stacked on #116: merge that first. Until then this pull request also shows its commit (
4d330d4); the three commits below are this one's own.What
ci(molecule): cancel superseded pull request runs: a new commit on a pull request cancels its running Molecule run, like Lint and Build (group per ref for pull requests, per SHA otherwise, so a run onmainis never cancelled). The old singlemoleculegroup existed so two runs never shared the runner's Docker daemon, whose container names are fixed. That is now the runner's single slot (gitea_runner_capacity: 1in the maintainer's environment repository), stated in the workflow comment and CLAUDE.md: raising that capacity needs a lock or a shared group again. A cancelled run is killed before molecule can destroy its container, so the run step first removes the containers of every scenario by their exact platform names, whether or not this run selects it.ci(molecule): drop the leading destroy from every scenario's test sequence: about 6 s per scenario, 42 s per full run. The firstdestroyruns against a container that is not there and only waits out the Docker driver's fixed 5 s poll. Safe because the run step clears stale containers first, and molecule's state file lives under the job's ownANSIBLE_HOME(Runtime(isolated=False)in molecule 26.11), which is deleted with the checkout, so a cancelled run cannot make the next one skipcreateorprepare. The rest of the sequence is molecule's default.ci(molecule): run every scenario nightly: 04:43 UTC, after Renovate's 03:17 run (single slot). Pull requests now run fewer scenarios, so drift in the others (a package mirror, the runner's molecule venv) would otherwise wait for the next push tomain.Verified
actionlint,yamllint, REUSE and the pre-commit hooks pass.test_sequenceequals molecule 26.11's default minus the firstdestroy; its step names are valid for the version the runner pins (read from the source, not run).<role>-instance,image-smoke,image-smoke-2604) and Docker's leading/.if:guard, checkout SHA/REF, selector falling back to all, concurrency group) was read through forevent_name == 'schedule'.flockwas removed as redundant on a single-slot runner).Not verified
*-instanceorimage-smoke*; the daemon is the runner's own, dedicated to this.schedulepath end to end.🤖 Generated with Claude Code