What Molecule proves before a merge, and who acts on the nightly run #256

Closed
opened 2026-11-17 22:24:56 +00:00 by Claude · 2 comments
Owner

Part of #87

The ansible-core decision says Renovate's core bump "is behaviour-tested by its own PR". Under the decided Molecule design it is not: Molecule runs from the ci image pinned by digest, and a core bump does not move that pin. The bump's own pull request runs every scenario on the old core, and the floor automerges.

To decide

  1. Must the pull request that raises the ansible-core floor run Molecule on the new core itself? Options:
    • (a) the Molecule container checks /opt/ci-pins.sha256 and installs the pull request's pins when they differ, as Lint and Build do, and requirements-dev.txt and requirements-dev.lock leave the selector's IGNORED list, so every Python pin bump runs every scenario;
    • (b) the ansible-core minor bump leaves automerge until its pin pull request has passed;
    • (c) "the pin pull request is the first behaviour test, after the floor moved" is accepted and written into the image ADR's residual risk.
  2. Who is told when the nightly Molecule run fails, and may the release pull request be merged while the last nightly is red? The nightly is now the only run of the scenarios a pull request's diff did not select.
  3. Do Lint and Build still need their push trigger on main? The reason given names a dependency of the publish job that no issue builds.

Waits on this

ci(molecule): run Molecule with the toolchain baked into the ci image instead of the runner's venv is blocked by this ticket, because option (a) changes the job it builds. The floor issue and the image ADR issue each carry one line that follows the answer; a comment is enough there.

Evidence is in the first comment.

Part of #87 The ansible-core decision says Renovate's core bump "is behaviour-tested by its own PR". Under the decided Molecule design it is not: Molecule runs from the `ci` image pinned by digest, and a core bump does not move that pin. The bump's own pull request runs every scenario on the old core, and the floor automerges. ## To decide 1. Must the pull request that raises the ansible-core floor run Molecule on the new core itself? Options: - (a) the Molecule container checks `/opt/ci-pins.sha256` and installs the pull request's pins when they differ, as Lint and Build do, and `requirements-dev.txt` and `requirements-dev.lock` leave the selector's IGNORED list, so every Python pin bump runs every scenario; - (b) the ansible-core minor bump leaves automerge until its pin pull request has passed; - (c) "the pin pull request is the first behaviour test, after the floor moved" is accepted and written into the image ADR's residual risk. 2. Who is told when the nightly Molecule run fails, and may the release pull request be merged while the last nightly is red? The nightly is now the only run of the scenarios a pull request's diff did not select. 3. Do Lint and Build still need their push trigger on `main`? The reason given names a dependency of the publish job that no issue builds. ## Waits on this [ci(molecule): run Molecule with the toolchain baked into the ci image instead of the runner's venv](https://git.rkdr.net/Mortis/Kamino/issues/225) is blocked by this ticket, because option (a) changes the job it builds. The floor issue and the image ADR issue each carry one line that follows the answer; a comment is enough there. Evidence is in the first comment.
Claude added the
Wayfinder
Grilling
label 2026-11-17 22:24:56 +00:00
Defame1297 was assigned by Claude 2026-11-17 22:24:56 +00:00
Author
Owner

Evidence from the review of the map (2026-11-17)

The core bump

  • Supported and tested ansible-core versions, item 5: "so sanity, lint and Molecule share one pin and Renovate's core bump is behaviour-tested by its own PR." Item 2: "It keeps automerging as today".
  • ci(molecule): run Molecule with the toolchain baked into the ci image instead of the runner's venv: "run molecule from the pinned ci image (image:<version>@sha256:<digest>)" and "Make sure Molecule's ansible-core is the one requirements-dev.txt pins". No line gives Molecule an install path for changed pins.
  • CI image pipeline: keep, simplify or replace, section 8: "the residual risk that an image-input PR is not tested in its own image until the pin PR's CI".
  • scripts/select_molecule_scenarios.py:68-69 lists requirements-dev.txt and requirements-dev.lock as paths no scenario reads. A core minor bump also edits meta/runtime.yml, so its pull request runs every scenario, on the old core.
  • The pin pull request edits molecule.yml, runs every scenario on the new image (about 10 minutes) and waits for the maintainer under code-owner approval. So after the toolchain move, every ci pin pull request runs the full suite.
  • Three reviewers raised this independently.

The nightly run

  • Molecule and Renovate on the shared runner: isolation, capacity and cost, item 3: "No Molecule on push to main. ... Nightly and manual dispatch stay." Measured there: "No Molecule run on main failed after its pull request had passed."
  • scripts/select_molecule_scenarios.py:26-27 still says: "The scenarios the selection skips are not skipped on main: the push run after the merge runs them all."

Lint and Build on push

  • Same resolution: "Lint and Build keep their push trigger, because the publish job's "checks first" ... depends on them." In the release path decision, "checks first" is check_tarball.py and the tag checks inside the publish job.

Not certain: how ansible-core treats a Collection that requires a newer core during the bump's own run, and how this Gitea notifies on a failed scheduled run.

## Evidence from the review of the map (2026-11-17) **The core bump** - [Supported and tested ansible-core versions](https://git.rkdr.net/Mortis/Kamino/issues/206), item 5: "so sanity, lint and Molecule share one pin and Renovate's core bump is behaviour-tested by its own PR." Item 2: "It keeps automerging as today". - [ci(molecule): run Molecule with the toolchain baked into the ci image instead of the runner's venv](https://git.rkdr.net/Mortis/Kamino/issues/225): "run molecule from the pinned `ci` image (`image:<version>@sha256:<digest>`)" and "Make sure Molecule's ansible-core is the one `requirements-dev.txt` pins". No line gives Molecule an install path for changed pins. - [CI image pipeline: keep, simplify or replace](https://git.rkdr.net/Mortis/Kamino/issues/96), section 8: "the residual risk that an image-input PR is not tested in its own image until the pin PR's CI". - `scripts/select_molecule_scenarios.py:68-69` lists `requirements-dev.txt` and `requirements-dev.lock` as paths no scenario reads. A core minor bump also edits `meta/runtime.yml`, so its pull request runs every scenario, on the old core. - The pin pull request edits `molecule.yml`, runs every scenario on the new image (about 10 minutes) and waits for the maintainer under code-owner approval. So after the toolchain move, every `ci` pin pull request runs the full suite. - Three reviewers raised this independently. **The nightly run** - [Molecule and Renovate on the shared runner: isolation, capacity and cost](https://git.rkdr.net/Mortis/Kamino/issues/212), item 3: "No Molecule on push to `main`. ... Nightly and manual dispatch stay." Measured there: "No Molecule run on `main` failed after its pull request had passed." - `scripts/select_molecule_scenarios.py:26-27` still says: "The scenarios the selection skips are not skipped on `main`: the push run after the merge runs them all." **Lint and Build on push** - Same resolution: "Lint and Build keep their push trigger, because the publish job's \"checks first\" ... depends on them." In the release path decision, "checks first" is `check_tarball.py` and the tag checks inside the publish job. Not certain: how ansible-core treats a Collection that requires a newer core during the bump's own run, and how this Gitea notifies on a failed scheduled run.
Author
Owner

Resolution (2026-11-20)

Decided with the maintainer in a grilling session.

  1. The pull request that raises the ansible-core floor runs Molecule on the new core. The Molecule job compares the pull request's pin files with the image's /opt/ci-pins.sha256. When they differ, it installs the pull request's pins before the scenarios run. This is the slow path Lint and Build already take (about 80 s). requirements-dev.txt and requirements-dev.lock stay on the selector's IGNORED list.

    • A core minor bump selects every scenario through its meta/runtime.yml edit, and now runs them on the new core.
    • Other pin bumps, core patch bumps included, select no scenario. The ci pin pull request is their first behaviour test, because it runs the full suite. That gap is the residual risk in the image ADR.
    • Rejected: option (a) as written, because every Python pin bump would run every scenario (about 10 min each). Option (b), because it is a manual gate and the Delivery note prefers automation plus a test. Option (c), because the gap closes cheaply.
    • Rule: "Molecule tests the pull request's pins, as Lint and Build do." It lives in .gitea/workflows/AGENTS.md and is held by control: the pin comparison in the job.
  2. The maintainer owns a red nightly; any trusted contributor may fix it.

    • Facts, read in the Gitea v28.3.0 source and not tested live: a scheduled run's trigger user is the system account gitea-actions. That account is never mailed, and a scheduled run sets no commit status. So today nobody is told.
    • On failure, the nightly opens one standing issue with the job token (issues: write), or comments on it when it is already open. The issue is labelled Status/Needs Triage, and its body links the run with no log text and no host detail. The next green full run closes it. Held by control.
    • A full run is a schedule or workflow_dispatch run of molecule.yml on main.
    • The owner rule goes in docs/contributing/maintaining.md.
  3. The release pull request does not merge while the latest full run on main is red.

    • Held by control, in the release-content check of #176. That check recognises a release pull request by its content and passes every other pull request.
    • The check reads the latest completed full run (GET /repos/{owner}/{repo}/actions/workflows/molecule.yml/runs?branch=main, which needs actions: read; the API exists since Gitea 1.27) and fails unless that run succeeded.
    • Recovery: fix the failure, dispatch Molecule on main, then re-run the release pull request's checks. A push to main also refreshes the release pull request.
    • Rejected: letting the release pull request run the full suite. That reverses "a release diff selects no scenarios" and costs about 10 min on every push to main.
    • The rule goes in maintaining.md.
  4. Lint and Build lose their push trigger on main.

    • The stated reason does not hold. The publish job's "checks first" are check_tarball.py and the tag checks, and they run inside release.yml.
    • With "Block on outdated branch" on and only (pull_request) contexts required, main only ever receives a tree its pull request already tested.
    • Build keeps its v* tag trigger and workflow_dispatch.
    • Cost: main's commits show no Lint or Build status.
    • This supersedes "Lint and Build keep push for publish" in Molecule and Renovate on the shared runner: isolation, capacity and cost.

No ADR: each choice is reversible and explained where it lives. No glossary term.

Backlog. New issue: ci(molecule): open an issue when the nightly full run fails and close it on the next green one, blocked by #166. Scope added to #166, #167, #176, #182, #224, #225 and #262. #225 is no longer blocked by this ticket.

Not verified.

  • No Gitea behaviour was tested live.
  • Whether issues: read alone lets the job token open an issue.
  • How ansible-core treats a Collection whose floor is above the running core. Point 1 makes this moot.
## Resolution (2026-11-20) Decided with the maintainer in a grilling session. 1. **The pull request that raises the ansible-core floor runs Molecule on the new core.** The Molecule job compares the pull request's pin files with the image's `/opt/ci-pins.sha256`. When they differ, it installs the pull request's pins before the scenarios run. This is the slow path Lint and Build already take (about 80 s). `requirements-dev.txt` and `requirements-dev.lock` stay on the selector's IGNORED list. - A core minor bump selects every scenario through its `meta/runtime.yml` edit, and now runs them on the new core. - Other pin bumps, core patch bumps included, select no scenario. The `ci` pin pull request is their first behaviour test, because it runs the full suite. That gap is the residual risk in the image ADR. - Rejected: option (a) as written, because every Python pin bump would run every scenario (about 10 min each). Option (b), because it is a manual gate and the Delivery note prefers automation plus a test. Option (c), because the gap closes cheaply. - Rule: "Molecule tests the pull request's pins, as Lint and Build do." It lives in `.gitea/workflows/AGENTS.md` and is held by control: the pin comparison in the job. 2. **The maintainer owns a red nightly; any trusted contributor may fix it.** - Facts, read in the Gitea v28.3.0 source and not tested live: a scheduled run's trigger user is the system account `gitea-actions`. That account is never mailed, and a scheduled run sets no commit status. So today nobody is told. - On failure, the nightly opens one standing issue with the job token (`issues: write`), or comments on it when it is already open. The issue is labelled `Status/Needs Triage`, and its body links the run with no log text and no host detail. The next green full run closes it. Held by control. - A **full run** is a `schedule` or `workflow_dispatch` run of `molecule.yml` on `main`. - The owner rule goes in `docs/contributing/maintaining.md`. 3. **The release pull request does not merge while the latest full run on `main` is red.** - Held by control, in the release-content check of #176. That check recognises a release pull request by its content and passes every other pull request. - The check reads the latest completed full run (`GET /repos/{owner}/{repo}/actions/workflows/molecule.yml/runs?branch=main`, which needs `actions: read`; the API exists since Gitea 1.27) and fails unless that run succeeded. - Recovery: fix the failure, dispatch Molecule on `main`, then re-run the release pull request's checks. A push to `main` also refreshes the release pull request. - Rejected: letting the release pull request run the full suite. That reverses "a release diff selects no scenarios" and costs about 10 min on every push to `main`. - The rule goes in `maintaining.md`. 4. **Lint and Build lose their push trigger on `main`.** - The stated reason does not hold. The publish job's "checks first" are `check_tarball.py` and the tag checks, and they run inside `release.yml`. - With "Block on outdated branch" on and only `(pull_request)` contexts required, `main` only ever receives a tree its pull request already tested. - Build keeps its `v*` tag trigger and `workflow_dispatch`. - Cost: `main`'s commits show no Lint or Build status. - This supersedes "Lint and Build keep push for publish" in [Molecule and Renovate on the shared runner: isolation, capacity and cost](https://git.rkdr.net/Mortis/Kamino/issues/212). No ADR: each choice is reversible and explained where it lives. No glossary term. **Backlog.** New issue: [ci(molecule): open an issue when the nightly full run fails and close it on the next green one](https://git.rkdr.net/Mortis/Kamino/issues/270), blocked by #166. Scope added to #166, #167, #176, #182, #224, #225 and #262. #225 is no longer blocked by this ticket. **Not verified.** - No Gitea behaviour was tested live. - Whether `issues: read` alone lets the job token open an issue. - How ansible-core treats a Collection whose floor is above the running core. Point 1 makes this moot.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#256