test(system_baseline): run the vzdump guard cases against the guard alone #468

Open
Claude wants to merge 1 commits from test/456-system-baseline-vzdump-guard into main
pull from: test/456-system-baseline-vzdump-guard
Owner

What and why

Closes #456

  • Guard file. The vzdump guard tasks move unchanged into an internal tasks/vzdump_guard.yml, pulled into update.yml with import_tasks, so the update tag, when and __system_baseline_main_flow still reach them. Consumers see no change in what update does.
  • Cases. 6 of the 7 vzdump cases in verify call tasks_from: vzdump_guard, skipping validation, the scratch directory, the simulated upgrade and autoremove they never asserted. The ubuntu_lxc case still runs tasks_from: update, so the entry point runs end to end in check mode. Every case keeps its assertions.
  • Gate assert. The static play that reads update.yml gains two asserts: the guard is imported before the upgrade, and the upgrade is conditioned on __system_baseline_vzdump_running.
  • Purge. The unwanted installed packages are purged in one apt call, skipped when none is installed, instead of a loop of calls (trivial fragment).
  • Facts. gather_subset: [min] on the scenario's three gathering plays; the role reads only os_family.
  • The README's Tests section now describes this.

Verified

  • pre-commit run --all-files passes, and ansible-test sanity passed on push.
  • Both new regexes pass on the real update.yml and fail on mutants: the gate line removed, and the import moved after the upgrade.
  • ansible-playbook --syntax-check passes on converge.yml and verify.yml.
  • A clean-context review checked static-import semantics, direct tasks_from calls, the purge filter and the min subset; nothing blocking.

Not verified

  • The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #456 - **Guard file.** The vzdump guard tasks move unchanged into an internal `tasks/vzdump_guard.yml`, pulled into `update.yml` with `import_tasks`, so the `update` tag, `when` and `__system_baseline_main_flow` still reach them. Consumers see no change in what `update` does. - **Cases.** 6 of the 7 vzdump cases in verify call `tasks_from: vzdump_guard`, skipping validation, the scratch directory, the simulated upgrade and autoremove they never asserted. The `ubuntu_lxc` case still runs `tasks_from: update`, so the entry point runs end to end in check mode. Every case keeps its assertions. - **Gate assert.** The static play that reads `update.yml` gains two asserts: the guard is imported before the upgrade, and the upgrade is conditioned on `__system_baseline_vzdump_running`. - **Purge.** The unwanted installed packages are purged in one apt call, skipped when none is installed, instead of a loop of calls (`trivial` fragment). - **Facts.** `gather_subset: [min]` on the scenario's three gathering plays; the role reads only `os_family`. - The README's Tests section now describes this. ## Verified - `pre-commit run --all-files` passes, and `ansible-test sanity` passed on push. - Both new regexes pass on the real `update.yml` and fail on mutants: the gate line removed, and the import moved after the upgrade. - `ansible-playbook --syntax-check` passes on converge.yml and verify.yml. - A clean-context review checked static-import semantics, direct `tasks_from` calls, the purge filter and the `min` subset; nothing blocking. ## Not verified - The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-28 21:55:51 +00:00
Claude added 1 commit 2026-11-28 21:55:52 +00:00
test(system_baseline): run the vzdump guard cases against the guard alone
Build / build (pull_request) Successful in 31s
Lint / lint (pull_request) Successful in 2m36s
Molecule / molecule (pull_request) Successful in 7m39s
f766666476
Each of the seven vzdump cases ran the whole update entry point in check
mode, when they assert only the guard's decision. The guard now lives in
an internal tasks/vzdump_guard.yml, imported by update.yml so the update
tag, when and main-flow vars still reach it. Six cases include it
alone; the ubuntu_lxc case keeps running tasks_from: update end to end,
and a static check asserts the guard is imported before the upgrade and
that the upgrade's when reads its fact.

The purge of unwanted packages becomes one apt call over the installed
ones, skipped when none is installed. The scenario's gathering plays
use gather_subset min: the role reads only os_family and package_facts.

Closes #456

Assisted-by: Claude Code
Author
Owner

Measured: the Molecule job passed, and system_baseline/default ran alone in 448 s. Task rounds in the scenario went from 883 to 836 (−5%), against the log of run 6363 on main before this change. For reference, the scenario took 1122 s in a 4-lane full run and 568 s in a 2-lane one; seconds vary a lot with the runner's load. The saving is smaller than the issue estimated: most of the scenario's remaining time is in verify plays this change does not touch.

Assisted-by: Claude Code

Measured: the Molecule job passed, and `system_baseline/default` ran alone in 448 s. Task rounds in the scenario went from 883 to 836 (−5%), against the log of run 6363 on `main` before this change. For reference, the scenario took 1122 s in a 4-lane full run and 568 s in a 2-lane one; seconds vary a lot with the runner's load. The saving is smaller than the issue estimated: most of the scenario's remaining time is in verify plays this change does not touch. Assisted-by: Claude Code
All checks were successful
Build / build (pull_request) Successful in 31s
Required
Details
Lint / lint (pull_request) Successful in 2m36s
Required
Details
Molecule / molecule (pull_request) Successful in 7m39s
Required
Details
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin test/456-system-baseline-vzdump-guard:test/456-system-baseline-vzdump-guard
git checkout test/456-system-baseline-vzdump-guard
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#468