feat(test): the Suite, the Test Stack and the PR workflow (TR-36) #37

Merged
pit merged 45 commits from test/tr36-suite-and-ci into main 2026-10-19 16:08:06 +00:00
Member

Summary

The test suite and the workflow that runs it on every pull request (TR-36), implementing the eight
tickets and the eleven decisions behind them.

make check ──► fmt -check · validate ×3 · Edge plan-only tofu test        (no credentials)
make test ───► local leg: images → container Target ──► Suite ──► remove Target
make test-ci ─► CI leg:  key pairing → Test Stack apply ──► SSH poll ─► Suite ──► destroy
                              └─ both legs call container/suite.sh, nothing else ─┘

Suite  = render Inventory · Converge · Assert (3 rings) · 2nd+3rd Converge (changed=0) · evidence · parity boundary
Seam   = inventories/test/hosts, rendered from a committed local or CI template
modules/guest/        the Guest definition both roots call; keys_dir is a required input
test/guest/           the Test Stack: no backend, local state, random vmid, DHCP, ci.pub only
container/            Dockerfile · target.Dockerfile · suite.sh · local.sh · ci.sh · clean.sh · image.sh · edge-gate.py
inventories/test/     hosts.local · hosts.ci · the dev/ci Vault (ciphertext, four names)
vikunja/service/      verify.yml (the Assert play), ansible.cfg collections list, requirements.yml + community.docker
.forgejo/workflows/   checks.yaml — static · edge · execute, concurrency cancel-in-progress
docs/                 ADR-0004; GLOSSARY's third Stack, Environment and Target; ADR-0002's two-environment rule

Closes TR-36 and its eight children: TR-37 module + Test Stack, TR-38 images, TR-39 make check,
TR-40 Suite + local leg, TR-41 janitor + red path, TR-42 CI leg, TR-43 workflow, TR-44 the owed docs.
Each ticket's resolution comment carries its own criterion table.

Evidence

Before: the repo had no test surface. make offered nine targets, all of which either planned,
validated or mutated prod; nothing converged the role anywhere but prod, and no pull request ran
anything.

After, on this branch (fb593470, 44 commits; the fix commit on top of it
is ecf5278):

$ make check        # at ecf5278, in a `git archive HEAD` copy: no .env, no token, no key, no docker
  → tofu fmt -check -recursive                    (silent)
  → Success! The configuration is valid.          (vikunja/guest, via module)
  → Success! The configuration is valid.          (npm)
  → Success! The configuration is valid.          (test/guest)
  → edge.tftest.hcl... pass                       Success! 1 passed, 0 failed.
exit 0
$ make -n test          container/local.sh
$ make -n test-ci       container/ci.sh
$ make -n test-clean    container/clean.sh
$ bash -n container/*.sh                                            all five parse
$ python3 .tr36-notes/43-edge-gate-selftest.py container/edge-gate.py   8/8 passed
run 6 — https://forgejo.thepit.space/olympus/infra-tracker/actions/runs/6
  id 14 · index 6 · pull_request/synchronize · head ecf5278 · 15:45:22Z → 15:48:11Z
  static   🏁 Job succeeded
  edge     🏁 Job succeeded     plan 1 to add · gate green · artifact edge-plan uploaded
  execute  🏁 Job succeeded     key paired · template imported · Apply: 3 added, 1 changed
                                Converge ok=29 changed=16 · Assert ok=26 changed=0 failed=0
                                2nd and 3rd Converge ok=25 changed=0 failed=0
                                test guest destroyed · artifact test-evidence uploaded
run 5 — the parent, fb593470: the same three jobs, green; the first run of this PR to pass.

Run 5, at fb593470, was the first run on this PR to pass: static reached make check and passed
it, edge planned and gated green, and execute applied the Test Stack, ran the Suite and destroyed
the Guest. Checkout and the artifact upload — the two action references round 1 found unresolvable —
ran in it; run 6 is the same shape at the fix commit.
The three Stacks and the tofu test are green at ecf5278 in run 6's static job, and make check
was also run locally on this commit. Run 6's execute job runs the teardown this round changed:
test guest destroyed, with the guard's state read written to test-evidence/state-list.log.

The Edge gate is the one piece of new logic that is executable here, and it is tested: red on a plan
that deletes or replaces nginxproxymanager_proxy_host.site, red on a non-empty plan when the pull
request touches no file under npm/ (message says drift, not the PR's change), green otherwise,
and exit 2 — never a silent green — when the plan is unreadable.

Not run from this container: it has no docker daemon, no Proxmox credentials and no store pair.
Where the branch's own record already covers a leg, it is named; what is left is the Operator's:

  • The local leg ran twice — fb593470's commit message records make test: "25 ok, 0 changed on
    the second run, Target removed on both".
  • The CI leg ran end to end — run 6 above, and run 5 before it, from key paired to
    test guest destroyed.
  • The runner image is published and pinned — run 5's Start image= line names
    forgejo.thepit.space/olympus/infra-tracker-test@sha256:cfe03d5a…, which is the TEST_RUNNER_IMAGE
    the workflow reads.
Unrehearsed Command
make image on its own, and a second make image make image, twice, then the docker run in TR-38's resolution comment
Ctrl-C teardown, and the janitor Ctrl-C mid-make test; make test-clean
The prod plan proposes a move, not a recreate make guest-plan
Cancellation (cancel-in-progress) push twice while a run is in flight
The local leg's wall-clock number a timed make test

Merge Danger

Door: two-way for the repository — everything here is files, and git revert of the merge
restores the previous surface. The one-way door is next to the merge, not in it: after this lands,
the Operator's next make guest sees the two moved blocks and moves the Guest resources into
modules/guest/. That apply is the Operator's, it plans before it acts, and nothing in this branch
applies anything against prod.

Blast Radius: repo-wide, one pipeline.

Merge does not apply, destroy or publish anything by itself. Before the first real CI run, the
Operator must set the TEST_RUNNER_IMAGE Variable from make image-publish's output, mint the
secrets TR-8 names (scoped Proxmox token, TEST_VAULT_PASSWORD, CI_SSH_KEY, registry token,
NPM credentials, the EDGE_STATE_* pair) and set the PROXMOX_VE_ENDPOINT / NGINXPROXYMANAGER_URL
Variables. Until then an unset TEST_RUNNER_IMAGE is not an error: the runner falls back to its
own default image, data.forgejo.org/oci/node:22-bookworm, which carries no tofu. Every job
then fails at its first toolchain step, static included — run 4 at ff93adc is that shape:
Checkout succeeds, make check fails in 0 s.

Two secrets were minted for this work and live outside every repo, with the paths in the TR-36
resolution comment: the CI keypair's private half (CI_SSH_KEY) and the dev/ci Vault's password
(TEST_VAULT_PASSWORD). The committed public half is test/guest/keys.d/ci.pub; the committed Vault
ciphertext opens with that password and nothing else.

## Summary The test suite and the workflow that runs it on every pull request (TR-36), implementing the eight tickets and the eleven decisions behind them. ```text make check ──► fmt -check · validate ×3 · Edge plan-only tofu test (no credentials) make test ───► local leg: images → container Target ──► Suite ──► remove Target make test-ci ─► CI leg: key pairing → Test Stack apply ──► SSH poll ─► Suite ──► destroy └─ both legs call container/suite.sh, nothing else ─┘ Suite = render Inventory · Converge · Assert (3 rings) · 2nd+3rd Converge (changed=0) · evidence · parity boundary Seam = inventories/test/hosts, rendered from a committed local or CI template ``` ```text modules/guest/ the Guest definition both roots call; keys_dir is a required input test/guest/ the Test Stack: no backend, local state, random vmid, DHCP, ci.pub only container/ Dockerfile · target.Dockerfile · suite.sh · local.sh · ci.sh · clean.sh · image.sh · edge-gate.py inventories/test/ hosts.local · hosts.ci · the dev/ci Vault (ciphertext, four names) vikunja/service/ verify.yml (the Assert play), ansible.cfg collections list, requirements.yml + community.docker .forgejo/workflows/ checks.yaml — static · edge · execute, concurrency cancel-in-progress docs/ ADR-0004; GLOSSARY's third Stack, Environment and Target; ADR-0002's two-environment rule ``` Closes **TR-36** and its eight children: TR-37 module + Test Stack, TR-38 images, TR-39 `make check`, TR-40 Suite + local leg, TR-41 janitor + red path, TR-42 CI leg, TR-43 workflow, TR-44 the owed docs. Each ticket's resolution comment carries its own criterion table. ## Evidence **Before:** the repo had no test surface. `make` offered nine targets, all of which either planned, validated or mutated prod; nothing converged the role anywhere but prod, and no pull request ran anything. **After**, on this branch (`fb593470`, 44 commits; the fix commit on top of it is `ecf5278`): ```console $ make check # at ecf5278, in a `git archive HEAD` copy: no .env, no token, no key, no docker → tofu fmt -check -recursive (silent) → Success! The configuration is valid. (vikunja/guest, via module) → Success! The configuration is valid. (npm) → Success! The configuration is valid. (test/guest) → edge.tftest.hcl... pass Success! 1 passed, 0 failed. exit 0 ``` ```console $ make -n test container/local.sh $ make -n test-ci container/ci.sh $ make -n test-clean container/clean.sh $ bash -n container/*.sh all five parse $ python3 .tr36-notes/43-edge-gate-selftest.py container/edge-gate.py 8/8 passed ``` ```console run 6 — https://forgejo.thepit.space/olympus/infra-tracker/actions/runs/6 id 14 · index 6 · pull_request/synchronize · head ecf5278 · 15:45:22Z → 15:48:11Z static 🏁 Job succeeded edge 🏁 Job succeeded plan 1 to add · gate green · artifact edge-plan uploaded execute 🏁 Job succeeded key paired · template imported · Apply: 3 added, 1 changed Converge ok=29 changed=16 · Assert ok=26 changed=0 failed=0 2nd and 3rd Converge ok=25 changed=0 failed=0 test guest destroyed · artifact test-evidence uploaded run 5 — the parent, fb593470: the same three jobs, green; the first run of this PR to pass. ``` Run 5, at `fb593470`, was the first run on this PR to pass: `static` reached `make check` and passed it, `edge` planned and gated green, and `execute` applied the Test Stack, ran the Suite and destroyed the Guest. `Checkout` and the artifact upload — the two action references round 1 found unresolvable — ran in it; run 6 is the same shape at the fix commit. The three Stacks and the tofu test are green at `ecf5278` in run 6's `static` job, and `make check` was also run locally on this commit. Run 6's `execute` job runs the teardown this round changed: `test guest destroyed`, with the guard's state read written to `test-evidence/state-list.log`. The Edge gate is the one piece of new logic that is executable here, and it is tested: red on a plan that deletes or replaces `nginxproxymanager_proxy_host.site`, red on a non-empty plan when the pull request touches no file under `npm/` (message says *drift*, not the PR's change), green otherwise, and exit 2 — never a silent green — when the plan is unreadable. **Not run from this container:** it has no docker daemon, no Proxmox credentials and no store pair. Where the branch's own record already covers a leg, it is named; what is left is the Operator's: - **The local leg ran twice** — `fb593470`'s commit message records `make test`: "25 ok, 0 changed on the second run, Target removed on both". - **The CI leg ran end to end** — run 6 above, and run 5 before it, from `key paired` to `test guest destroyed`. - **The runner image is published and pinned** — run 5's `Start image=` line names `forgejo.thepit.space/olympus/infra-tracker-test@sha256:cfe03d5a…`, which is the `TEST_RUNNER_IMAGE` the workflow reads. | Unrehearsed | Command | | --- | --- | | `make image` on its own, and a second `make image` | `make image`, twice, then the `docker run` in TR-38's resolution comment | | `Ctrl-C` teardown, and the janitor | `Ctrl-C` mid-`make test`; `make test-clean` | | The prod plan proposes a move, not a recreate | `make guest-plan` | | Cancellation (`cancel-in-progress`) | push twice while a run is in flight | | The local leg's wall-clock number | a timed `make test` | ## Merge Danger **Door:** two-way for the repository — everything here is files, and `git revert` of the merge restores the previous surface. The one-way door is *next to* the merge, not in it: after this lands, the Operator's next `make guest` sees the two `moved` blocks and moves the Guest resources into `modules/guest/`. That apply is the Operator's, it plans before it acts, and nothing in this branch applies anything against prod. **Blast Radius:** repo-wide, one pipeline. Merge does not apply, destroy or publish anything by itself. Before the first real CI run, the Operator must set the `TEST_RUNNER_IMAGE` Variable from `make image-publish`'s output, mint the secrets TR-8 names (scoped Proxmox token, `TEST_VAULT_PASSWORD`, `CI_SSH_KEY`, registry token, NPM credentials, the `EDGE_STATE_*` pair) and set the `PROXMOX_VE_ENDPOINT` / `NGINXPROXYMANAGER_URL` Variables. Until then an unset `TEST_RUNNER_IMAGE` is not an error: the runner falls back to its own default image, `data.forgejo.org/oci/node:22-bookworm`, which carries no `tofu`. Every job then fails at its first toolchain step, `static` included — run 4 at `ff93adc` is that shape: `Checkout` succeeds, `make check` fails in 0 s. Two secrets were minted for this work and live outside every repo, with the paths in the TR-36 resolution comment: the CI keypair's private half (`CI_SSH_KEY`) and the dev/ci Vault's password (`TEST_VAULT_PASSWORD`). The committed public half is `test/guest/keys.d/ci.pub`; the committed Vault ciphertext opens with that password and nothing else.
The Test Stack needs the same Guest, so container.tf and keys.tf move into
a module both roots call. The root keeps its variables and passes them
through, and the keys local becomes a required keys_dir variable: the
module has no keys.d of its own, so a root that forgets it fails at plan
naming the variable instead of creating a Guest nobody can reach.

moved blocks stay in the root, so the Operator's next prod apply moves the
existing objects into the module rather than replacing the live Guest.
container.tf is byte-identical to the file it replaces, and the keys
expression keeps its shape and fileset order, which is what keeps that
plan a move.

The gateway is optional on the module's guest object so a DHCP caller can
leave it out; prod passes the same value it always did.
The OpenTofu layer needs something to apply in CI, and the prod root's
state object is scoped to prod's key alone — a workspace would write an
object that policy denies. So the Test Stack is its own root: no backend
block, state in the run's own directory, gone with the job, and no store
object or credential to ask for.

It calls modules/guest with a random vmid and hostname, a DHCP address
and no gateway, and trusts exactly one committed key — the CI keypair's
public half, so a throwaway Guest carries no long-lived human key. The
lockfile pins the same proxmox build prod locked, plus random.

The ipv4 output passes the provider's per-device map through: it stays
empty until the lease lands, which is why the Suite polls it.
guest.md said keys.d sat beside the stack, which stopped being true when
the Guest definition moved into modules/guest. It now says the directory
is a module input the calling root supplies.

test-guest.md is the Test Stack's own page: local state that dies with
the run, the per-run vmid and hostname, DHCP with no gateway, the one
committed CI key, the template import every fresh state performs and the
id form that works, and the shape of the ipv4 output the Suite polls.
The Suite needs two things the dev host and CI do not have between them: the
toolchain (OpenTofu, ansible-core, ansible-lint, both collections, a docker
client, Node for the workflow's node actions) and a throwaway systemd system to
drive. Both come from the same pinned Debian 13 base digest, so the target can
never drift away from the base the runner's tools are tested against.

The Python toolchain lives in /opt/venv: Debian 13 is PEP 668 externally
managed, and its bin comes first on PATH so a plain `ansible --version` answers.
OpenTofu comes from the release tarball with the checksum mise.lock records for
each architecture, not a floating apt repository.
`image` is the build's own proof on a machine that has docker; `image-publish`
is the deliberate act that puts both images in the Forgejo registry and prints
the two digest references, one of them the exact TEST_RUNNER_IMAGE line the
Operator pastes into the repo Variable — nothing in this repo can publish, so
the workflow is named through that Variable instead.

The tag is each Dockerfile's content hash: a second `make image` finds what it
built and rewrites nothing, and a bumped tool can never hide behind a tag that
still points at the old image. `--pull=false` and no `docker pull` anywhere, so
the only fetch is the pinned base digest the build itself needs.
1000 ids in the draw, and Proxmox refuses the create on a collision, so the
page overstated the guarantee. Found by the merger re-deriving TR-37.
The tag hashed container/Dockerfile alone, so a change to image.sh's build
flags or verb left the tag identical and `make image` short-circuited onto an
image the old script had built. Found by the merger re-deriving TR-38.
The Edge already fails a plan when no certificate covers a site, and this is
the one place that promise can be executed without NPM. `mock_provider`
keeps the run off the API; `mock_data` returning no certificates is what makes
the sentinel reachable — left in the mock's own hands the lookup invents a
cert and the precondition can never fire, so the test would pass while proving
nothing.

`expect_failures` is what makes it a gate in the passing direction: remove the
line and the run fails on the real message, naming the domain.
Three stages in the order that reports a failure where it happened: the
formatter, then every Stack, then the Edge's executable test. Nothing in it
reads a credential, so it runs on a clone that has never been applied — no
.env, no Proxmox token, no docker — which is what lets the workflow's `static`
job be this target and nothing else.

The Test Stack is reached here, not by `validate`: it has no backend, so the
`validate_stack` preamble would demand a state pair it never reads. `validate`
keeps exactly the two production Stacks it has always had.
inventories/test/ holds what the Suite reads and nothing it renders: two
committed host templates (local's docker connection, CI's ssh shape with its
key and address still to be filled) beside the dev/ci Vault, so ADR-0002's
"the inventory selects the Vault" still holds with one Inventory directory and
two legs. The dev/ci Vault carries exactly the four names ADR-0002 fixes, with
an empty SMTP password so the mailer stays off on a throwaway Target.

Two grants the local leg cannot run without:

- ansible.cfg's collections_path was a single path, which *replaces* Ansible's
  default list and so hides the collections the runner image installs for
  itself; it is now the repo path beside those defaults.
- requirements.yml gains community.docker (the local Target's connection
  plugin), so `make deps` on a host without the image installs it too.

The rendered Inventory, the derived Vault password file and the run's evidence
are gitignored; TEST_VAULT_PASSWORD joins the root .env's documented names.
verify.yml sits beside site.yml and runs against the same Inventory, so every
request it makes leaves the Target's own loopback and no port is ever
published. It encodes TR-3's rings in order: alive and reachable (unit running
and enabled, PostgreSQL accepting, the Service answering); the install matching
the declared contract (binary, config and unit path, mode and ownership, the
config's values, and the cleanup the role owes); and end to end (PG17, the role
and its database, the migrated schema, the pit account, /api/v1/info, and a
login round-trip that reads the account back with the token it was given).

The declared values are written out in the play rather than read back from the
role, so a wrong default fails the Assert instead of agreeing with itself.
suite.sh is the shared middle: it renders inventories/test/hosts from the
template its caller names, fills that template's placeholders from arguments
(refusing one left unfilled), Converges, Asserts, Converges twice more and
fails unless each recap says changed=0 and failed=0 with no handler fired, then
writes the evidence. It asks nothing about which leg called it — the leg picks
the template, the Suite runs.

local.sh owns only create and destroy: images built if absent, a Target named
vikunja-test-<hex4> and labelled infra-tracker-test, no published port, no bind
mount and no named network, the Suite run inside the runner image (the dev host
has docker and no Ansible), and docker rm -f on EXIT, INT and TERM. It reprints
the Suite's last line after teardown, so the run ends on the parity boundary.

`make test` is one line into local.sh and nothing else is added to the surface.
The Suite's two `raw` calls ran before the `cd` into vikunja/service, so
ansible.cfg was not in play for them and community.docker was unresolvable
exactly where a fresh Target needs it first. The `cd` now precedes the
bootstrap, and ansible.cfg's *prod* vault path is overridden by
ANSIBLE_VAULT_PASSWORD_FILE so a test run does not warn that it is missing.

The templates' comments no longer spell a placeholder out: rendering replaced
the token there too, leaving a comment that named one run's container.
A leg that passes HOST= with no value would have rendered an Inventory that
names no Target and converged nowhere; the Suite now refuses it, beside the
existing refusal of a token left unfilled.

The teardown prints "target removed" only when docker really removed one, so a
run that died before the create cannot claim a cleanup it did not do, and the
Assert play's token header cannot fail to template when the login body is not
JSON.
The placeholder description is what TR-42 needs; naming the Guest's key
directory there made a grep for a key file in the Suite's inputs hit prose.
A hung or slow create leaves the operator with nothing to inspect; the name is
the one thing docker ps and docker logs need, and it is printed before the
Suite so the run still ends on the boundary.
Without it the connection had no interpreter to run a module with, and the role's
first task is an apt module. The Suite keeps a guarded raw bootstrap as a net.
The Target image now carries python3 (prod's LXC baseline has it), so the two
unconditional apt calls become one check that is a no-op when the interpreter is
already there.
The CI leg of the test suite: pair the CI key with the committed public
half before anything is applied, apply the Test Stack, poll its ipv4
output over SSH, run the shared Suite, and destroy the Guest from an EXIT
trap that survives a failed Assert.

The template import is skipped when the state already holds it, so a
second run against the same workspace does not report the datastore
conflict the apply would otherwise raise.
Each run is a fresh DHCP lease on a fresh Guest, so a known_hosts entry from
an earlier run would refuse the machine this run just created.
SECONDS counts from the shell's start, so a deadline taken from it gave the
loop whatever the init, the import, the plan and the apply had left. The poll
now measures its own elapsed time.
A run that is killed with SIGKILL runs no exit path, so the leg's own
teardown never fires and its Target survives. test-clean selects by the
run's label, removes what it finds, and names each one; no labelled
container is a success, and a container without the label is never a
candidate.
teardown already ran on EXIT/INT/TERM, but the INT and TERM handlers
inherited the interrupted child's status, so a child that exited zero
made a Ctrl-C look green. The signals now exit 130/143 into the EXIT
trap: one teardown path, one removal, and a red run either way.
The Edge is planned on every pull request and applied nowhere, so the plan is
the only evidence a reviewer gets and the only thing that can be gated. A text
grep cannot tell a destroy from a line that mentions one, and the proxy host is
a for_each, so the address carries a key a grep would have to guess.

Reads `tofu show -json`: red when the plan deletes or replaces
nginxproxymanager_proxy_host.site whatever the pull request touches, red when
the plan is not empty and the pull request names no file under npm/ (that is
drift, not the pull request's change), green otherwise. The plan is printed by
the workflow, which is also what makes it an artifact; this only says what it
means. No verdict (exit 2) when there is no plan to read, so a step that failed
before writing one can never look green.
Three jobs on every opened or synchronised pull request, and on the manual
re-run the instance has no API for. `static` is `make check` — the floor, red
fast and credential-free — and `execute` is `make test-ci` behind it, so a
lint failure never costs a Test Guest. `edge` plans prod beside them and gates
the plan, because a red Edge is not a red LXC run.

Every job runs in the published runner image, named once, by digest, through
the TEST_RUNNER_IMAGE Variable. Nothing here re-implements a step of the Suite:
the create, the poll, the Converge, the Asserts, the idempotence runs and the
destroy are the scripts the local leg runs, and the destroy is ci.sh's exit
path, which is why a failed Assert still leaves no Guest behind.

The Edge job composes `make edge-plan`'s body rather than calling it: that
target refuses without a root .env, which a job has none of, and it plans
without -lock=false, which TR-11 requires so a CI plan never holds the store
lock while the Operator applies. The plan is saved with -out, printed from the
saved artifact, gated from its JSON, and published with the Suite's logs.
TR-11 left two records owed and neither was written: the Test Stack's state
living outside the store, and the Edge being gated in CI by a plan against
prod. Both are hard to reverse and surprising without the reason, so they get
an ADR rather than a line in a reference page. The record also carries the cost
the decision was made with — a cancelled run can strand a Test Guest, and CI
holds an Edge state pair that could write, which only a read-only mint in
infra-silo removes.

ADR-0002 gains the count behind its own rule: Prod and Test each hold secrets
and each has one Vault, Test's two Targets are not two environments, and a
third environment — a persistent PRE holding realistic data — is the trigger
for a third Vault.
The glossary said the repository had two Stacks and glossed Target as "the
environment a test run drives", while Prod was *the* environment and an
Ephemeral environment was a Target — three words for one idea. Stack is now
three, Environment is Prod or Test, and Target is the thing a run drives: a
Guest in CI, a container locally. Ephemeral environment becomes Ephemeral
Target, so the avoided word is the one that no longer means anything.

The Vault and store entries follow: one Vault per Environment, and only the two
production Stacks put an object in the bucket or reach the store.
The glossary was not the only place the count lived: AGENTS.md told an agent
that a Stack's state is in the store, README named the two Stacks' keys, and
`docs/reference/state.md` opened by saying both Stacks keep theirs there — all
true of the production Stacks and, from now on, false of the repository.

Each sentence now says "production" where it means the two that have an object
in the store, and `state.md` says what the Test Stack does instead, with the
table's missing row named rather than left to inference.
- The runner image had no make, so every CI job would have died at exit 127
  before running the target it names. It now installs make and proves it.
- local.sh printed the parity boundary before its EXIT trap, so the run's last
  line was 'target removed'. The boundary is printed from teardown now.
- local.sh recomputed the image tag that image.sh owns; image.sh gained a refs
  verb and the leg asks for it.
- AGENTS.md said targets run through mise (CI does not) and that an Agent never
  applies (the Suite applies the Test Stack). Both sentences now say which
  Stack they mean.
- README's env table was missing TEST_VAULT_PASSWORD; the workflow now names the
  registry-credential fallback it relies on.
Merge review fixes: make in the image, the boundary last, one owner for the tag
Some checks failed
checks / static (pull_request) Failing after 2s
checks / execute (pull_request) Has been skipped
checks / edge (pull_request) Failing after 2s
e85c7a06c2
bot-minos requested changes 2026-10-19 12:39:14 +00:00
Dismissed
bot-minos left a comment

olympus/infra-tracker #37 · head e85c7a0 · round 1/5 · axes: Standards, Spec

Recommendation: fix


Spec

BLOCKER — the workflow executes nothing: the action references do not resolve on this runner

.forgejo/workflows/checks.yaml:29, :40, :109 (code.forgejo.org/actions/checkout@v4) and :95, :130 (code.forgejo.org/forgejo/upload-artifact@v3).

This PR's own first run is the evidence. Run #3 (index_in_repo 3, head e85c7a0, event pull_request, opened 12:25:18) failed in 2 s: static and edge both failed, execute skipped. The job log for static (job 25) ends at the checkout step:

🚀  Start image=data.forgejo.org/oci/node:22-bookworm
⚙️ [runner]: unable to clone 'https://data.forgejo.org/code.forgejo.org/actions' … remote: Not found.
   fatal: repository 'https://data.forgejo.org/code.forgejo.org/actions/' not found: exit status 128
🏁  Job failed

The runner resolves owner/repo@ref against its own DEFAULT_ACTIONS_URL (here https://data.forgejo.org, as the clone URL shows), so code.forgejo.org/actions/checkout becomes the path /code.forgejo.org/actions. Checked on the instance:

git ls-remote https://data.forgejo.org/code.forgejo.org/actions     → remote: Not found
git ls-remote https://data.forgejo.org/actions/checkout             → v3 ✓ v4 ✓
git ls-remote https://data.forgejo.org/forgejo/upload-artifact      → v3 ✓ v4 ✓

So every job dies before make check / make test-ci / make edge-plan, and execute never runs at all. TR-43's first criterion ("a real push to a PR branch produces a run") is met only in the sense that a red entry appears; nothing is tested.

Smallest change that clears it: use the shorthand the runner resolves — actions/checkout@v4 and forgejo/upload-artifact@v3 (both exist at data.forgejo.org, tags above) — or a literal https://code.forgejo.org/actions/checkout@v4 URL if the literal host is wanted. Then push and show static reaching make check.

BLOCKER — the CI leg's teardown destroys the prod-shared template, so the second run cannot import it

container/ci.sh:74-86 (tofu destroy on every exit path) with container/ci.sh:95-100 (the per-state import), against test/guest/main.tf:43-46 and vikunja/guest/variables.tf:44-47 — both roots name the same datastore file, synology / debian-13-standard_13.6-1_amd64.tar.zst on burns.

ci.sh imports module.guest.proxmox_download_file.debian_13_base into the run's local state; that resource is then managed, and tofu destroy deletes it. Driven against the state ci.sh builds (local state seeded with that resource, plan -destroy -refresh=false against a stub endpoint):

# proxmox_download_file.debian_13_base will be destroyed
    id = "synology:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst" -> null
Plan: 0 to add, 0 to change, 1 to destroy.

and the provider's Delete is a datastore delete (bpg/proxmox v0.116.0, fwprovider/nodes/resource_download_file.go:644-660 → DeleteDatastoreFile). Two consequences, both outside what the change claims:

  • The CI leg cannot run twice. Every run starts from an empty state; run 2's tofu import (ci.sh:99) targets a file run 1 deleted, and set -e stops the run before the apply. That contradicts TR-42's "a second run does not fail because the template is already there".
  • It removes an artifact prod declares. The Guest Stack's proxmox_download_file.debian_13_base is the same object; after a green CI run it is gone from the datastore, and prod's next make guest-plan must re-download it.

docs/reference/test-guest.md:59-75 describes the import and is silent on what destroy does to it.

Smallest change that clears it: keep the template out of the destroy set — tofu destroy -target=module.guest.proxmox_virtual_environment_container.vikunja … in the teardown, or tofu state rm module.guest.proxmox_download_file.debian_13_base immediately before it. Show two consecutive make test-ci runs, or a destroy plan that leaves the file in place.

ADVISORY — the key preflight exits silently on an unparseable private key

container/ci.sh:46-47 — have=$(fingerprint "$pub") / got=$(fingerprint "$key_file") run under set -e; when ssh-keygen -lf fails on the private key, the assignment itself aborts the script.

TR-42 says "flipping one byte of a scratch copy is enough to see it", so I flipped one:

$ CI_SSH_KEY=…/flipped bash container/ci.sh
(no output)
rc=255

The safe half holds — it stops before tofu apply — and a well-formed but different key gets the full message naming both files and the rotation steps (driven: rc 1). Only the corrupt/unparseable key loses the diagnosis. Clearing: got=$(fingerprint "$key_file" || true) (same for have), so the [ -z "$have" ] || [ "$have" != "$got" ] branch handles it.

ADVISORY — the body's "resolution comment" claims are not in the tracker

Body: "Each ticket's resolution comment carries its own criterion table" and "with the paths in the TR-36 resolution comment". Checked: TR-36 … TR-44 (ids 119-127) all carry 0 comments (GET /api/v1/tasks/<id>/comments → []) and all nine are still open. The criterion tables are in the ticket descriptions, so the spec is available — but the two minted secrets' paths are stated nowhere, and the operator cannot find what the body says is documented. Clearing: post the resolution comments (with those paths) or correct the two sentences.

ADVISORY — "Until then static can pass" is not what happens

Body, Merge Danger. static runs in container: image: ${{ vars.TEST_RUNNER_IMAGE }} like the other two. With the Variable unset, the runner does not fail — it falls back to its default image (Start image=data.forgejo.org/oci/node:22-bookworm) and the job then dies on a missing action (above) or, once that is fixed, on a missing tofu. So an unset Variable is silent, not the "visible rather than silent" the body promises, and static cannot pass until it is set. Clearing: say what actually happens in the body, or pin the image so an unset Variable fails loudly.


Standards

Sources read: AGENTS.md (§Toolchain, §State, §Pull requests), docs/adr/0001-0004, docs/agents/issue-tracker.md, and the org records in olympus/workshop at main (docs/adr/0001, docs/adr/0002).

No hard violation found. The change follows ADR-0001's "no group" concurrency shape, ADR-0002's one-Vault-per-environment rule (test Vault inventory-adjacent, CI given only its password), ADR-0004 (no backend, -lock=false on the Edge plan), AGENTS.md's PR-body format, and the org toolchain record (mise.lock OpenTofu 1.12.6 / ansible-core 2.21.5 match the runner image's pins).

ADVISORY — the edge job re-implements make edge-plan instead of calling it

.forgejo/workflows/checks.yaml:59-71 against Makefile:217-219. TR-43 asks for "edge (make edge-plan plus the gating)"; the workflow inlines the target's body because edge-plan sources .env (absent in a job) and plans without -lock=false (which ADR-0004 requires). The reasoning is sound, but two copies of one command sequence will drift, and the next edge-plan edit will not reach CI. Judgement call, not a violation — the fix is a target both can call (an edge-plan-ci/flag that skips the .env preamble and passes -lock=false).


Verified

What How
make check green with no .env, no Proxmox token, no key, no docker ran it on a fresh clone at e85c7a0: fmt -check silent, three Success! The configuration is valid. (vikunja/guest via the module, npm, test/guest), edge.tftest.hcl … 1 passed, 0 failed, rc 0
The Edge gate's four documented behaviours 14 stub plans driven directly: destroy → 1; replace → 1; non-empty with no npm/ file → 1 (says drift); update with an npm/ file → 0; empty / no-op-only → 0; missing or non-JSON plan → 2 (never green); drift-only and output-only also red
edge.tftest.hcl is not vacuous removed expect_failures in a scratch copy → tofu test fails with the declared message (No NPM certificate covers example.test…)
keys_dir is required and named scratch copy without it → The argument "keys_dir" is required at validate
make check fails on an unformatted stack appended a misformatted resource to a scratch copy → rc 2 at tofu fmt -check
Existing targets untouched Makefile diff touches only .PHONY and adds check/test/test-ci/test-clean/image/image-publish; fmt, verify, service-check, guest*, edge*, validate unchanged
Make surface bare make lists the six and no test-local; make -n test/test-ci/test-clean each print one line into its script; bash -n passes on all five scripts
CI key pairing driven three ways: mismatched-but-valid key → rc 1 naming both files + rotation steps; paired key → passes, then stops on the missing Proxmox vars; one byte flipped → rc 255 (see advisory)
The Suite is the only Converge/Assert site local.sh/ci.sh contain no ansible/ansible-playbook call; both end in container/suite.sh
The module move's addresses moved from/to pairs match modules/guest's resource names; container.tf rename is content-identical (0-line diff); keys.tf is the old local with keys_dir threaded through
The workflow fires on a PR run #3 exists on e85c7a0 from pull_request/opened — and is the evidence for blocker 1
Image inputs exist debian:13-slim@sha256:a292… resolves at the registry; docker-cli, nodejs on trixie; ansible-lint 26.10.1, ansible-core 2.21.5 on PyPI; OpenTofu checksums match mise.lock
No secret in the diff no private-key markers, no tracked .env/vault-pass, test/guest/keys.d/ci.pub is a public key, the Vault is $ANSIBLE_VAULT;1.1;AES256 ciphertext
Docs match the code GLOSSARY's three Stacks / Environment / Target / Ephemeral Target; ADR-0002's two-environment rule; ADR-0004 + index row; guest.md's keys_dir; state.md's no-row-for-Test; no "two Stacks" residue outside .agents/

Could not verify

  • Anything needing docker: both image builds, make image idempotence, the local leg end to end, Ctrl-C teardown, make test-clean. The machine has no docker daemon.
  • Anything needing Proxmox or the store: the Test Stack's real apply/destroy, the 180 s SSH poll, and the prod moved plan (make guest-plan) — the provider refuses to plan without a reachable endpoint, so "moves, not recreates" is unverified; structurally the addresses and the unchanged container.tf are right, and ignore_changes still covers the key list.
  • The dev/ci Vault's contents: no TEST_VAULT_PASSWORD here, so "four names" and "opens with that password and nothing else" are unverified.
  • Cancellation: cancel-in-progress without a group would need a push to observe; the workflow parsed and dispatched, which is all I could see.
  • The uncommitted gate harness: .tr36-notes/43-edge-gate-selftest.py is not in the repo, so its "8/8" is the author's number; I reproduced the behaviour independently instead (14 cases above).

Summary

Axis Findings Worst
Spec 2 BLOCKER, 3 ADVISORY the pipeline executes nothing (action refs), and the CI leg deletes the prod-shared template
Standards 0 BLOCKER, 1 ADVISORY the edge job's copy of edge-plan's body

The verdict turns on the two blockers; the advisories are advice and do not move it. Four advisories in total, so the volume rule would also have asked for a fix. The work underneath them holds up: make check is a genuine credential-free floor, the gate is correct on every case I drove, and the Test Stack's shape matches its docs.

<!-- minos review-loop: repo=olympus/infra-tracker pr=37 head=e85c7a06c218558e2a1af96f9392a7fe9c163439 round=1/5 axes=standards,spec --> **olympus/infra-tracker #37** · head `e85c7a0` · round 1/5 · axes: Standards, Spec Recommendation: fix --- ## Spec ### BLOCKER — the workflow executes nothing: the action references do not resolve on this runner `.forgejo/workflows/checks.yaml:29`, `:40`, `:109` (`code.forgejo.org/actions/checkout@v4`) and `:95`, `:130` (`code.forgejo.org/forgejo/upload-artifact@v3`). This PR's own first run is the evidence. Run #3 (`index_in_repo 3`, head `e85c7a0`, event `pull_request`, opened 12:25:18) failed in 2 s: `static` and `edge` both **failed**, `execute` **skipped**. The job log for `static` (job 25) ends at the checkout step: ```text 🚀 Start image=data.forgejo.org/oci/node:22-bookworm ⚙️ [runner]: unable to clone 'https://data.forgejo.org/code.forgejo.org/actions' … remote: Not found. fatal: repository 'https://data.forgejo.org/code.forgejo.org/actions/' not found: exit status 128 🏁 Job failed ``` The runner resolves `owner/repo@ref` against its own `DEFAULT_ACTIONS_URL` (here `https://data.forgejo.org`, as the clone URL shows), so `code.forgejo.org/actions/checkout` becomes the path `/code.forgejo.org/actions`. Checked on the instance: ```text git ls-remote https://data.forgejo.org/code.forgejo.org/actions → remote: Not found git ls-remote https://data.forgejo.org/actions/checkout → v3 ✓ v4 ✓ git ls-remote https://data.forgejo.org/forgejo/upload-artifact → v3 ✓ v4 ✓ ``` So every job dies before `make check` / `make test-ci` / `make edge-plan`, and `execute` never runs at all. TR-43's first criterion ("a real push to a PR branch produces a run") is met only in the sense that a red entry appears; nothing is tested. **Smallest change that clears it:** use the shorthand the runner resolves — `actions/checkout@v4` and `forgejo/upload-artifact@v3` (both exist at `data.forgejo.org`, tags above) — or a literal `https://code.forgejo.org/actions/checkout@v4` URL if the literal host is wanted. Then push and show `static` reaching `make check`. ### BLOCKER — the CI leg's teardown destroys the prod-shared template, so the second run cannot import it `container/ci.sh:74-86` (`tofu destroy` on every exit path) with `container/ci.sh:95-100` (the per-state import), against `test/guest/main.tf:43-46` and `vikunja/guest/variables.tf:44-47` — both roots name the *same* datastore file, `synology` / `debian-13-standard_13.6-1_amd64.tar.zst` on `burns`. `ci.sh` imports `module.guest.proxmox_download_file.debian_13_base` into the run's local state; that resource is then managed, and `tofu destroy` deletes it. Driven against the state `ci.sh` builds (local state seeded with that resource, `plan -destroy -refresh=false` against a stub endpoint): ```text # proxmox_download_file.debian_13_base will be destroyed id = "synology:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst" -> null Plan: 0 to add, 0 to change, 1 to destroy. ``` and the provider's `Delete` is a datastore delete (`bpg/proxmox` v0.116.0, `fwprovider/nodes/resource_download_file.go:644-660` → `DeleteDatastoreFile`). Two consequences, both outside what the change claims: - **The CI leg cannot run twice.** Every run starts from an empty state; run 2's `tofu import` (`ci.sh:99`) targets a file run 1 deleted, and `set -e` stops the run before the apply. That contradicts TR-42's "a second run does not fail because the template is already there". - **It removes an artifact prod declares.** The Guest Stack's `proxmox_download_file.debian_13_base` is the same object; after a green CI run it is gone from the datastore, and prod's next `make guest-plan` must re-download it. `docs/reference/test-guest.md:59-75` describes the import and is silent on what destroy does to it. **Smallest change that clears it:** keep the template out of the destroy set — `tofu destroy -target=module.guest.proxmox_virtual_environment_container.vikunja …` in the teardown, or `tofu state rm module.guest.proxmox_download_file.debian_13_base` immediately before it. Show two consecutive `make test-ci` runs, or a destroy plan that leaves the file in place. ### ADVISORY — the key preflight exits silently on an unparseable private key `container/ci.sh:46-47` — `have=$(fingerprint "$pub")` / `got=$(fingerprint "$key_file")` run under `set -e`; when `ssh-keygen -lf` fails on the private key, the assignment itself aborts the script. TR-42 says "flipping one byte of a scratch copy is enough to see it", so I flipped one: ```text $ CI_SSH_KEY=…/flipped bash container/ci.sh (no output) rc=255 ``` The safe half holds — it stops before `tofu apply` — and a well-formed but *different* key gets the full message naming both files and the rotation steps (driven: rc 1). Only the corrupt/unparseable key loses the diagnosis. Clearing: `got=$(fingerprint "$key_file" || true)` (same for `have`), so the `[ -z "$have" ] || [ "$have" != "$got" ]` branch handles it. ### ADVISORY — the body's "resolution comment" claims are not in the tracker Body: "Each ticket's resolution comment carries its own criterion table" and "with the paths in the TR-36 resolution comment". Checked: **TR-36 … TR-44 (ids 119-127) all carry 0 comments** (`GET /api/v1/tasks/<id>/comments` → `[]`) and all nine are still open. The criterion tables *are* in the ticket descriptions, so the spec is available — but the two minted secrets' paths are stated nowhere, and the operator cannot find what the body says is documented. Clearing: post the resolution comments (with those paths) or correct the two sentences. ### ADVISORY — "Until then `static` can pass" is not what happens Body, Merge Danger. `static` runs in `container: image: ${{ vars.TEST_RUNNER_IMAGE }}` like the other two. With the Variable unset, the runner does not fail — it **falls back to its default image** (`Start image=data.forgejo.org/oci/node:22-bookworm`) and the job then dies on a missing action (above) or, once that is fixed, on a missing `tofu`. So an unset Variable is *silent*, not the "visible rather than silent" the body promises, and `static` cannot pass until it is set. Clearing: say what actually happens in the body, or pin the image so an unset Variable fails loudly. --- ## Standards Sources read: `AGENTS.md` (§Toolchain, §State, §Pull requests), `docs/adr/0001-0004`, `docs/agents/issue-tracker.md`, and the org records in `olympus/workshop` at `main` (`docs/adr/0001`, `docs/adr/0002`). No hard violation found. The change follows ADR-0001's "no `group`" concurrency shape, ADR-0002's one-Vault-per-environment rule (test Vault inventory-adjacent, CI given only its password), ADR-0004 (no backend, `-lock=false` on the Edge plan), AGENTS.md's PR-body format, and the org toolchain record (`mise.lock` OpenTofu 1.12.6 / ansible-core 2.21.5 match the runner image's pins). ### ADVISORY — the `edge` job re-implements `make edge-plan` instead of calling it `.forgejo/workflows/checks.yaml:59-71` against `Makefile:217-219`. TR-43 asks for "`edge` (`make edge-plan` plus the gating)"; the workflow inlines the target's body because `edge-plan` sources `.env` (absent in a job) and plans without `-lock=false` (which ADR-0004 requires). The reasoning is sound, but two copies of one command sequence will drift, and the next `edge-plan` edit will not reach CI. Judgement call, not a violation — the fix is a target both can call (an `edge-plan-ci`/flag that skips the `.env` preamble and passes `-lock=false`). --- ## Verified | What | How | | --- | --- | | `make check` green with no `.env`, no Proxmox token, no key, no docker | ran it on a fresh clone at `e85c7a0`: `fmt -check` silent, three `Success! The configuration is valid.` (vikunja/guest via the module, npm, test/guest), `edge.tftest.hcl … 1 passed, 0 failed`, rc 0 | | The Edge gate's four documented behaviours | 14 stub plans driven directly: destroy → 1; replace → 1; non-empty with no `npm/` file → 1 (says *drift*); update with an `npm/` file → 0; empty / no-op-only → 0; missing or non-JSON plan → 2 (never green); drift-only and output-only also red | | `edge.tftest.hcl` is not vacuous | removed `expect_failures` in a scratch copy → `tofu test` fails with the declared message (`No NPM certificate covers example.test…`) | | `keys_dir` is required and named | scratch copy without it → `The argument "keys_dir" is required` at validate | | `make check` fails on an unformatted stack | appended a misformatted resource to a scratch copy → rc 2 at `tofu fmt -check` | | Existing targets untouched | `Makefile` diff touches only `.PHONY` and adds `check`/`test`/`test-ci`/`test-clean`/`image`/`image-publish`; `fmt`, `verify`, `service-check`, `guest*`, `edge*`, `validate` unchanged | | Make surface | bare `make` lists the six and no `test-local`; `make -n test/test-ci/test-clean` each print one line into its script; `bash -n` passes on all five scripts | | CI key pairing | driven three ways: mismatched-but-valid key → rc 1 naming both files + rotation steps; paired key → passes, then stops on the missing Proxmox vars; one byte flipped → rc 255 (see advisory) | | The Suite is the only Converge/Assert site | `local.sh`/`ci.sh` contain no `ansible`/`ansible-playbook` call; both end in `container/suite.sh` | | The module move's addresses | `moved` from/to pairs match `modules/guest`'s resource names; `container.tf` rename is content-identical (0-line diff); `keys.tf` is the old local with `keys_dir` threaded through | | The workflow fires on a PR | run #3 exists on `e85c7a0` from `pull_request/opened` — and is the evidence for blocker 1 | | Image inputs exist | `debian:13-slim@sha256:a292…` resolves at the registry; `docker-cli`, `nodejs` on trixie; `ansible-lint 26.10.1`, `ansible-core 2.21.5` on PyPI; OpenTofu checksums match `mise.lock` | | No secret in the diff | no private-key markers, no tracked `.env`/`vault-pass`, `test/guest/keys.d/ci.pub` is a public key, the Vault is `$ANSIBLE_VAULT;1.1;AES256` ciphertext | | Docs match the code | GLOSSARY's three Stacks / Environment / Target / Ephemeral Target; ADR-0002's two-environment rule; ADR-0004 + index row; `guest.md`'s `keys_dir`; `state.md`'s no-row-for-Test; no "two Stacks" residue outside `.agents/` | ## Could not verify - **Anything needing docker**: both image builds, `make image` idempotence, the local leg end to end, `Ctrl-C` teardown, `make test-clean`. The machine has no docker daemon. - **Anything needing Proxmox or the store**: the Test Stack's real apply/destroy, the 180 s SSH poll, and **the prod `moved` plan** (`make guest-plan`) — the provider refuses to plan without a reachable endpoint, so "moves, not recreates" is unverified; structurally the addresses and the unchanged `container.tf` are right, and `ignore_changes` still covers the key list. - **The dev/ci Vault's contents**: no `TEST_VAULT_PASSWORD` here, so "four names" and "opens with that password and nothing else" are unverified. - **Cancellation**: `cancel-in-progress` without a `group` would need a push to observe; the workflow parsed and dispatched, which is all I could see. - **The uncommitted gate harness**: `.tr36-notes/43-edge-gate-selftest.py` is not in the repo, so its "8/8" is the author's number; I reproduced the behaviour independently instead (14 cases above). --- ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 2 BLOCKER, 3 ADVISORY | the pipeline executes nothing (action refs), and the CI leg deletes the prod-shared template | | Standards | 0 BLOCKER, 1 ADVISORY | the `edge` job's copy of `edge-plan`'s body | The verdict turns on the two blockers; the advisories are advice and do not move it. Four advisories in total, so the volume rule would also have asked for a fix. The work underneath them holds up: `make check` is a genuine credential-free floor, the gate is correct on every case I drove, and the Test Stack's shape matches its docs.
fix: the workflow runs, and the CI teardown stops taking prod's template
Some checks failed
checks / static (pull_request) Successful in 7s
checks / edge (pull_request) Successful in 6s
checks / execute (pull_request) Failing after 1m36s
ff93adc525
The review's two blockers, and three of its four advisories.

The action references named a host in the owner path
(`code.forgejo.org/actions/checkout`). The runner resolves `owner/repo@ref`
against its own DEFAULT_ACTIONS_URL (data.forgejo.org here), so that became the
repository `/code.forgejo.org/actions` and every job died at checkout — run 3,
2 s, static and edge failed, execute skipped. The shorthand (`actions/checkout`,
`forgejo/upload-artifact`) is what the runner resolves; the file's header now
says so, because the long form reads as the more precise one and is the trap.

The teardown ran `tofu destroy` over the whole state, and the state imports
`module.guest.proxmox_download_file.debian_13_base`: the base image infra-forge
put on the Node, which prod's Guest Stack also declares, and whose provider
delete removes the datastore file. A driven destroy plan shows it in the set
(4 to destroy); so the second CI run had nothing to import, and a green run
deleted an artifact prod owns. The teardown now targets
`module.guest.proxmox_virtual_environment_container.vikunja` alone, guarded by a
state-list check so an apply that created nothing is not reported as a failure.

The key preflight ran `ssh-keygen -lf` under `set -e`, so an unparseable private
key aborted the assignment itself: rc 255 and no output, where the advisory is
worth exactly that message. Both fingerprints now subsist through a failure.

The workflow's `edge` job carried its own copy of `edge-plan`'s command
sequence, which the next edit to the Edge's plan would not reach. It calls
`make edge-plan-ci`: the same commands, without the `.env` source a job has no
file for and with the `-lock=false` ADR-0004 requires, plus the `-out` the gate
reads. `docs/reference/test-guest.md` states what the teardown now does.
Author
Member

Round 1/5 answered — e85c7a0 → ff93adc, one commit, on this branch. Four findings are changed,
one was already satisfied, and the standards advisory is taken.

# Finding Grade Disposition
1 the action references do not resolve BLOCKER fixed in ff93adc
2 the teardown destroys the prod-shared template BLOCKER fixed in ff93adc
3 the key preflight exits silently on an unparseable key ADVISORY fixed in ff93adc
4 the body's "resolution comment" claims are not in the tracker ADVISORY no change — they are in the tracker; evidence below
5 "Until then static can pass" is not what happens ADVISORY fixed in the PR body, no code change
6 the edge job re-implements make edge-plan ADVISORY fixed in ff93adc — make edge-plan-ci

1 — BLOCKER: the action references

code.forgejo.org/actions/checkout@v4 → actions/checkout@v4 (three places),
code.forgejo.org/forgejo/upload-artifact@v3 → forgejo/upload-artifact@v3 (two). I took the
shorthand, not the literal URL: the runner prepends its own DEFAULT_ACTIONS_URL, and the file's
header now says so — the long form is the one that reads as more precise, which is why it was there.

Driven, on the run this commit triggered (run 4, ff93adc, pull_request/synchronize):

static    Set up job ok · Checkout ok · make check FAILED (0 s)
edge      Checkout ok · collect the changed files ok · plan FAILED · gate FAILED · publish ok
execute   skipped (needs static)

and the job logs, which name the repositories the two references resolved to:

static    🚀 Start image=data.forgejo.org/oci/node:22-bookworm
          ☁️  git fetch 'https://data.forgejo.org/actions/checkout' # ref=v4
          /bin/bash: line 1: tofu: command not found
          make: *** [Makefile:274: check] Error 127
edge      ☁️  git clone 'https://data.forgejo.org/forgejo/upload-artifact' # ref=v3
          Artifact edge-plan has been successfully uploaded!

So the checkout and the artifact upload both resolve and run; run 3 died inside the checkout step.
The two reds are the unset TEST_RUNNER_IMAGE (finding 5) — make check and make edge-plan-ci both
started and both stopped on tofu: command not found, which is the fallback image's missing
toolchain, not the workflow's shape.

2 — BLOCKER: the teardown and the prod-shared template

The teardown destroys the Guest and nothing else, behind a state-list check:

if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then
  (cd "$stack" && tofu destroy -input=false -auto-approve -no-color -target="$GUEST_RESOURCE")

with GUEST_RESOURCE=module.guest.proxmox_virtual_environment_container.vikunja. I took -target
over the state rm alternative: state rm is a state write inside the trap, where a failure under
set -e would abort before the destroy and strand the Guest; -target cannot fail that way, and a
state without the Guest is handled as "nothing to destroy" instead of a teardown error.

Driven on a state seeded as ci.sh builds it (template imported, Guest created), with
plan -destroy -refresh=false against a stub endpoint, the address read out of the committed
ci.sh rather than retyped:

$ tofu plan -destroy -refresh=false
  # random_id.suffix will be destroyed
  # random_integer.vmid will be destroyed
  # module.guest.proxmox_download_file.debian_13_base will be destroyed
  # module.guest.proxmox_virtual_environment_container.vikunja will be destroyed
Plan: 0 to add, 0 to change, 4 to destroy.

$ tofu plan -destroy -refresh=false -target=module.guest.proxmox_virtual_environment_container.vikunja
  # module.guest.proxmox_virtual_environment_container.vikunja will be destroyed
Plan: 0 to add, 0 to change, 1 to destroy.

The guard both ways: the seeded state matches it; a tree with no state file does not, and the
teardown prints no test guest in state; nothing to destroy rather than the "may still be on the
node" error. docs/reference/test-guest.md gains The teardown destroys the Guest, never the
template
, since the page described the import and was silent on what destroy did to it.

Not verified: two consecutive make test-ci runs — that needs Proxmox credentials and the Node,
which this environment has none of. The destroy plan above is the finding's own alternative ("or a
destroy plan that leaves the file in place").

3 — ADVISORY: the key preflight

have=$(fingerprint "$pub" || true) and got=$(fingerprint "$key_file" || true), so the mismatch
branch handles a key ssh-keygen refuses instead of the assignment aborting the script.

Driven at ff93adc, one byte of a scratch copy flipped:

$ CI_SSH_KEY=…/flipped bash container/ci.sh
error: ci: the CI private key does not pair with the committed public half.
  private: …/flipped
  public:  …/test/guest/keys.d/ci.pub
The Guest trusts only the committed key, so an apply here would create a Guest
this run cannot log in to. Rotate the pair:
  1. ssh-keygen -q -t ed25519 -C infra-tracker-ci -N '' -f ci_ed25519
  …
rc=1

At e85c7a0 the same input was (no output), rc=255. The paired path still passes and still stops
at the first missing env var (key paired: … then error: ci: TEST_VAULT_PASSWORD is not set…,
rc 1), so the || true closes the silent case without weakening the refusal.

4 — ADVISORY: no change, because the comments are there

Re-checked from this identity: GET /api/v1/tasks/<id>/comments for ids 119–127 answers one
comment each
, every one of them a handoff with a criterion table, and all nine tasks read
done=true. TR-36's is comment 115, created 2026-10-19T12:26:54Z — thirteen minutes before the
review — and it names both paths the body points at:

  • /home/hermes/.hermes/profiles/efesto/secrets/tr36-ci/ci_ed25519 → CI_SSH_KEY
  • /home/hermes/.hermes/profiles/efesto/secrets/tr36-ci/test-vault-password → TEST_VAULT_PASSWORD

So both sentences the finding quoted are true as written, and I changed neither. Since the comments
predate the review by 13 minutes this is not a race, and I cannot say from here why the reviewer's
read saw []; recorded rather than "fixed", because there is nothing to fix. If Minos' identity
genuinely cannot see this project's comments, that is a permission question for the Operator, not a
change on this branch.

5 — ADVISORY: the Merge Danger sentence, in the body only

The paragraph now states what happens: an unset TEST_RUNNER_IMAGE is not an error, the runner
falls back to its own default image, data.forgejo.org/oci/node:22-bookworm, which carries no
tofu, so every job fails at its first toolchain step — static included, and run 4 is quoted as
exactly that shape. I did not pin the image: pinning one that does not exist yet would fail for a
second reason and read as a workflow bug. The Evidence section's head and commit count were
refreshed to ff93adc / 43 commits, and make check was re-run at that head.

6 — ADVISORY: the edge job's copy of edge-plan

The job calls make edge-plan-ci; the Makefile holds the sequence once:

edge-plan-ci:
	cd $(CURDIR)/npm
	tofu init -input=false -no-color
	tofu plan -input=false -no-color -lock=false -var-file=edge.tfvars -out=plan.out >/dev/null

edge-plan stays the developer's target ($(call edge_stack_init) sources .env, and its plan
takes the store lock); edge-plan-ci is the CI shape ADR-0004 describes — credentials from the
environment, -lock=false, and the -out the gate reads. make -n edge-plan-ci prints those three
commands, rc 0, and in run 4 the edge job echoed exactly them before stopping on the missing tofu:
that is the target running, which is the deduplication the finding asked for. It will reach the
credentials question once the runner image exists.

Verification

$ mise exec -- make check        # at ff93adc, in a `git archive HEAD` copy, no .env, no creds, no docker
Success! The configuration is valid.    (vikunja/guest, via the module)
Success! The configuration is valid.    (npm)
Success! The configuration is valid.    (test/guest)
edge.tftest.hcl... pass
Success! 1 passed, 0 failed.
rc=0

$ bash -n container/*.sh   rc=0
$ make -n test-ci          container/ci.sh
$ make -n edge-plan-ci     cd …/npm · tofu init · tofu plan -lock=false -out=plan.out

Not verified, and named rather than implied: anything needing docker (both images, the local
leg, make test-clean), anything needing Proxmox or the store (a real apply and destroy, the 180 s
SSH poll, two consecutive CI legs), and a run of the Suite in CI — run 4 reaches make check and
make edge-plan-ci and stops on tofu: command not found because TEST_RUNNER_IMAGE is unset,
which is the Operator's step rather than something this branch can supply.

The self-review the dispatch asks for ran in one context, both axes in sequence: there is no
claude, codex or agent CLI in this environment, so no parallel sub-agents existed. It is where
the doc sentence quoted above and the -target-over-state rm choice came from.

Labels: review/needs-fix → review/needs-review.

<!-- fix-meta repo=olympus/infra-tracker pr=37 head=ff93adc52522bb97b40efd7b3732f155d1430ea7 round=1/5 disposition=fixed --> **Round 1/5 answered** — `e85c7a0` → `ff93adc`, one commit, on this branch. Four findings are changed, one was already satisfied, and the standards advisory is taken. | # | Finding | Grade | Disposition | | --- | --- | --- | --- | | 1 | the action references do not resolve | BLOCKER | fixed in `ff93adc` | | 2 | the teardown destroys the prod-shared template | BLOCKER | fixed in `ff93adc` | | 3 | the key preflight exits silently on an unparseable key | ADVISORY | fixed in `ff93adc` | | 4 | the body's "resolution comment" claims are not in the tracker | ADVISORY | no change — they are in the tracker; evidence below | | 5 | "Until then `static` can pass" is not what happens | ADVISORY | fixed in the PR body, no code change | | 6 | the `edge` job re-implements `make edge-plan` | ADVISORY | fixed in `ff93adc` — `make edge-plan-ci` | ### 1 — BLOCKER: the action references `code.forgejo.org/actions/checkout@v4` → `actions/checkout@v4` (three places), `code.forgejo.org/forgejo/upload-artifact@v3` → `forgejo/upload-artifact@v3` (two). I took the shorthand, not the literal URL: the runner prepends its own `DEFAULT_ACTIONS_URL`, and the file's header now says so — the long form is the one that reads as more precise, which is why it was there. Driven, on the run this commit triggered (run 4, `ff93adc`, `pull_request/synchronize`): ```text static Set up job ok · Checkout ok · make check FAILED (0 s) edge Checkout ok · collect the changed files ok · plan FAILED · gate FAILED · publish ok execute skipped (needs static) ``` and the job logs, which name the repositories the two references resolved to: ```text static 🚀 Start image=data.forgejo.org/oci/node:22-bookworm ☁️ git fetch 'https://data.forgejo.org/actions/checkout' # ref=v4 /bin/bash: line 1: tofu: command not found make: *** [Makefile:274: check] Error 127 edge ☁️ git clone 'https://data.forgejo.org/forgejo/upload-artifact' # ref=v3 Artifact edge-plan has been successfully uploaded! ``` So the checkout and the artifact upload both resolve and run; run 3 died inside the checkout step. The two reds are the unset `TEST_RUNNER_IMAGE` (finding 5) — `make check` and `make edge-plan-ci` both started and both stopped on `tofu: command not found`, which is the fallback image's missing toolchain, not the workflow's shape. ### 2 — BLOCKER: the teardown and the prod-shared template The teardown destroys the Guest and nothing else, behind a state-list check: ```sh if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then (cd "$stack" && tofu destroy -input=false -auto-approve -no-color -target="$GUEST_RESOURCE") ``` with `GUEST_RESOURCE=module.guest.proxmox_virtual_environment_container.vikunja`. I took `-target` over the `state rm` alternative: `state rm` is a state write inside the trap, where a failure under `set -e` would abort before the destroy and strand the Guest; `-target` cannot fail that way, and a state without the Guest is handled as "nothing to destroy" instead of a teardown error. Driven on a state seeded as `ci.sh` builds it (template imported, Guest created), with `plan -destroy -refresh=false` against a stub endpoint, the address read out of the committed `ci.sh` rather than retyped: ```text $ tofu plan -destroy -refresh=false # random_id.suffix will be destroyed # random_integer.vmid will be destroyed # module.guest.proxmox_download_file.debian_13_base will be destroyed # module.guest.proxmox_virtual_environment_container.vikunja will be destroyed Plan: 0 to add, 0 to change, 4 to destroy. $ tofu plan -destroy -refresh=false -target=module.guest.proxmox_virtual_environment_container.vikunja # module.guest.proxmox_virtual_environment_container.vikunja will be destroyed Plan: 0 to add, 0 to change, 1 to destroy. ``` The guard both ways: the seeded state matches it; a tree with no state file does not, and the teardown prints `no test guest in state; nothing to destroy` rather than the "may still be on the node" error. `docs/reference/test-guest.md` gains *The teardown destroys the Guest, never the template*, since the page described the import and was silent on what destroy did to it. **Not verified:** two consecutive `make test-ci` runs — that needs Proxmox credentials and the Node, which this environment has none of. The destroy plan above is the finding's own alternative ("or a destroy plan that leaves the file in place"). ### 3 — ADVISORY: the key preflight `have=$(fingerprint "$pub" || true)` and `got=$(fingerprint "$key_file" || true)`, so the mismatch branch handles a key `ssh-keygen` refuses instead of the assignment aborting the script. Driven at `ff93adc`, one byte of a scratch copy flipped: ```console $ CI_SSH_KEY=…/flipped bash container/ci.sh error: ci: the CI private key does not pair with the committed public half. private: …/flipped public: …/test/guest/keys.d/ci.pub The Guest trusts only the committed key, so an apply here would create a Guest this run cannot log in to. Rotate the pair: 1. ssh-keygen -q -t ed25519 -C infra-tracker-ci -N '' -f ci_ed25519 … rc=1 ``` At `e85c7a0` the same input was `(no output)`, `rc=255`. The paired path still passes and still stops at the first missing env var (`key paired: …` then `error: ci: TEST_VAULT_PASSWORD is not set…`, rc 1), so the `|| true` closes the silent case without weakening the refusal. ### 4 — ADVISORY: no change, because the comments are there Re-checked from this identity: `GET /api/v1/tasks/<id>/comments` for ids 119–127 answers **one comment each**, every one of them a handoff with a criterion table, and all nine tasks read `done=true`. TR-36's is comment `115`, created `2026-10-19T12:26:54Z` — thirteen minutes before the review — and it names both paths the body points at: - `/home/hermes/.hermes/profiles/efesto/secrets/tr36-ci/ci_ed25519` → `CI_SSH_KEY` - `/home/hermes/.hermes/profiles/efesto/secrets/tr36-ci/test-vault-password` → `TEST_VAULT_PASSWORD` So both sentences the finding quoted are true as written, and I changed neither. Since the comments predate the review by 13 minutes this is not a race, and I cannot say from here why the reviewer's read saw `[]`; recorded rather than "fixed", because there is nothing to fix. If Minos' identity genuinely cannot see this project's comments, that is a permission question for the Operator, not a change on this branch. ### 5 — ADVISORY: the Merge Danger sentence, in the body only The paragraph now states what happens: an unset `TEST_RUNNER_IMAGE` is not an error, the runner falls back to its own default image, `data.forgejo.org/oci/node:22-bookworm`, which carries no `tofu`, so every job fails at its first toolchain step — `static` included, and run 4 is quoted as exactly that shape. I did not pin the image: pinning one that does not exist yet would fail for a second reason and read as a workflow bug. The Evidence section's head and commit count were refreshed to `ff93adc` / 43 commits, and `make check` was re-run at that head. ### 6 — ADVISORY: the `edge` job's copy of `edge-plan` The job calls `make edge-plan-ci`; the Makefile holds the sequence once: ```make edge-plan-ci: cd $(CURDIR)/npm tofu init -input=false -no-color tofu plan -input=false -no-color -lock=false -var-file=edge.tfvars -out=plan.out >/dev/null ``` `edge-plan` stays the developer's target (`$(call edge_stack_init)` sources `.env`, and its plan takes the store lock); `edge-plan-ci` is the CI shape ADR-0004 describes — credentials from the environment, `-lock=false`, and the `-out` the gate reads. `make -n edge-plan-ci` prints those three commands, rc 0, and in run 4 the edge job echoed exactly them before stopping on the missing `tofu`: that is the target running, which is the deduplication the finding asked for. It will reach the credentials question once the runner image exists. ## Verification ```console $ mise exec -- make check # at ff93adc, in a `git archive HEAD` copy, no .env, no creds, no docker Success! The configuration is valid. (vikunja/guest, via the module) Success! The configuration is valid. (npm) Success! The configuration is valid. (test/guest) edge.tftest.hcl... pass Success! 1 passed, 0 failed. rc=0 $ bash -n container/*.sh rc=0 $ make -n test-ci container/ci.sh $ make -n edge-plan-ci cd …/npm · tofu init · tofu plan -lock=false -out=plan.out ``` **Not verified, and named rather than implied:** anything needing docker (both images, the local leg, `make test-clean`), anything needing Proxmox or the store (a real apply and destroy, the 180 s SSH poll, two consecutive CI legs), and a run of the Suite in CI — run 4 reaches `make check` and `make edge-plan-ci` and stops on `tofu: command not found` because `TEST_RUNNER_IMAGE` is unset, which is the Operator's step rather than something this branch can supply. The self-review the dispatch asks for ran in one context, both axes in sequence: there is no `claude`, `codex` or `agent` CLI in this environment, so no parallel sub-agents existed. It is where the doc sentence quoted above and the `-target`-over-`state rm` choice came from. Labels: `review/needs-fix` → `review/needs-review`.
bot-minos approved these changes 2026-10-19 12:50:58 +00:00
Dismissed
bot-minos left a comment

olympus/infra-tracker #37 · head ff93adc · round 2/5 · axes: Standards, Spec

Recommendation: merge


Round 1 → round 2

Delta reviewed: e85c7a0..ff93adc, one commit, four files (+63 / −23):
.forgejo/workflows/checks.yaml, Makefile, container/ci.sh, docs/reference/test-guest.md.
git merge-base --is-ancestor e85c7a0 ff93adc → true, so the fix stacked and this delta is exactly
the round's change; nothing else moved. Both round-1 blockers are resolved, and I verified each by
driving it rather than by reading the hand-back.

# Round-1 finding Disposition Evidence
1 BLOCKER — action references do not resolve resolved checks.yaml:35,46,110 actions/checkout@v4; :96,:131 forgejo/upload-artifact@v3. git ls-remote https://data.forgejo.org/actions/checkout lists v4, .../forgejo/upload-artifact lists v3; the old path still answers remote: Not found. Run 4 (run id 12, head ff93adc) job logs: git fetch 'https://data.forgejo.org/actions/checkout' # ref=v4, ⭐ Run Main Checkout, ✅ Success - Post Checkout
2 BLOCKER — the teardown destroys the prod-shared template resolved ci.sh:22 GUEST_RESOURCE, :89-91 targeted tofu destroy -target=…; driven on a module-shaped analogue, below
3 ADVISORY — key preflight exits silently resolved driven: one byte flipped → full pairing message, rc 1 (was no output, rc 255); a well-formed non-pairing key → rc 1
4 ADVISORY — the "resolution comment" claims are not in the tracker withdrawn — my finding was wrong re-read: TR-36…TR-44 (ids 119–127) each carry exactly one comment and all nine read done=true; TR-36's is comment 115, created 12:26:54, thirteen minutes before round 1 was submitted
5 ADVISORY — "Until then static can pass" is not what happens resolved in the body the Merge Danger paragraph now names the fallback image and says every job fails there; run 4 shows exactly that
6 ADVISORY — the edge job re-implements make edge-plan resolved checks.yaml:72 calls make edge-plan-ci; Makefile:228-230 holds the sequence once

How blocker 2 was driven. A throwaway Stack with a module holding a debian_13_base resource
that a vikunja resource references (the shape of modules/guest), applied, then planned for
destruction two ways:

$ tofu plan -destroy -refresh=false
  # terraform_data.vmid will be destroyed
  # module.guest.terraform_data.debian_13_base will be destroyed     ← the shared template
  # module.guest.terraform_data.vikunja will be destroyed
Plan: 0 to add, 0 to change, 3 to destroy.

$ tofu plan -destroy -refresh=false -target=module.guest.terraform_data.vikunja
  # module.guest.terraform_data.vikunja will be destroyed
Plan: 0 to add, 0 to change, 1 to destroy.

Targeting a dependent does not pull its dependency into the destroy set, so the template stays. The
second-run half is answered too: ci.sh:111 skips the import when the state already holds the
template, so a second run in the same workspace is clean rather than failing on an import of a
resource already managed.


Spec

ADVISORY — an unreadable state is reported as "nothing to destroy", and the run can still exit 0

container/ci.sh:89 — if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then

The || true was needed: with no state file at all, tofu state list exits 1. But it also collapses
every failure to read the state into the same empty output, and the else branch then prints
no test guest in state; nothing to destroy and leaves status untouched. Driven three ways on a
scratch Stack:

A: no state file      rc=1  output=[]                 guard → "nothing to destroy"   (correct)
B: resource in state  rc=0  output=[…vikunja]         guard → TARGET                 (correct)
C: state truncated    rc=1  "Error: Error refreshing the state"   guard → "nothing to destroy"  (silent)

Case C is the one that costs something. Before this commit a whole-state tofu destroy failed loudly
on a corrupt state and set status=1; now a run that was otherwise green exits 0 while the Guest may
still be on the Node — against ci.sh:9-10 ("destroy the Guest on every exit path") and TR-36's
"the destroy step runs when an earlier step fails". It is not a blocker: created=1 is only set after
a successful apply (:120-121), so the state is valid when the trap is installed, and reaching the
corrupt case needs a failure between apply and teardown.

Smallest change that clears it: treat a failed state list as an error rather than as an empty
list — since created=1 implies an initialised state, if ! (cd "$stack" && tofu state list) >"$tmp" 2>&1; then
… status=1 — or keep || true but require [ -f "$stack/terraform.tfstate" ] before taking the
"nothing to destroy" branch.

ADVISORY — "Every run starts from an empty state" is contradicted by the import skip

docs/reference/test-guest.md:64 against docs/reference/test-guest.md:84-86 and container/ci.sh:111.

Line 64: "Every run starts from an empty state, so it imports the template once, before the first
apply." The new section at :84-86 says the imported template and the vmid/hostname "stay in this
state", and ci.sh:111 exists precisely to skip the import "which is what makes a second run against
the same workspace clean". Both cannot be unconditionally true: the first holds for a CI job (fresh
checkout) and not for a local make test-ci re-run, which is the case the guard was written for. An
operator reading :64 will not expect template import: already in state.

Clearing: one clause on :84-86 — the state survives between runs when the same workspace is
reused (make test-ci locally); it is empty only in a fresh CI checkout.


Standards

Sources read: AGENTS.md (§Decisions, §Toolchain, §State, §Pull requests), docs/adr/0001-0004,
docs/agents/issue-tracker.md, GLOSSARY.md.

No violation. The delta follows AGENTS.md's toolchain rule (the job runs make directly in the runner
image, not through mise exec), ADR-0004's "a CI plan takes no store lock" (-lock=false kept in
edge-plan-ci), and the PR-body format the repo's pr skill requires.

Checked and refuted — not a finding. edge-plan-ci reads like the classic broken recipe: three
lines, a cd on the first, and in default GNU make each line gets its own shell, so tofu init and
tofu plan would run in the repo root — where there is no .tf and no edge.tfvars. It does not
happen: Makefile:2 sets .ONESHELL:, so the three lines are one shell. Driven with a stub tofu
that logs its cwd — both calls land in npm/, rc 0. Recorded so the next reviewer does not re-raise
it.


Verified

What How
Action references resolve on this runner git ls-remote on both repos (v4 / v3 present, old path absent) and run 4's own job logs show the fetch and a successful Checkout
Run 4's shape matches the body job logs read directly: static → tofu: command not found, make: *** [Makefile:274: check] Error 127; edge → make edge-plan-ci … Error 127, gate exit 2 on the unreadable plan, artifact uploaded; execute → "job is not started"
-target keeps the template out of the destroy set scratch module Stack, full vs targeted plan -destroy -refresh=false (above)
The corrupt-key path one byte flipped → pairing error + rotation steps, rc 1; a different valid pair → rc 1
make check at head mise exec -- make check in the fetched revision, no .env, no credentials → Success! 1 passed, 0 failed, rc 0
make edge-plan-ci lands in npm/ stub tofu logging cwd for both calls, .ONESHELL at Makefile:2, rc 0
The body's arithmetic git rev-list --count 20d3374..ff93adc = 43, matching the body; 42 files changed
The tracker claim I got wrong 9/9 tickets one comment, all done=true
No secret in the delta the four changed files carry no key material; ci.pub is untouched and public
Nothing else moved git diff --name-status e85c7a0..ff93adc = exactly the four files above

Could not verify

  • Anything needing Proxmox or the store: a real apply/destroy, the 180 s SSH poll, two
    consecutive make test-ci runs, and the prod moved plan. The destroy-set question I could answer
    without them; "the second run succeeds" I could only establish to the state logic (ci.sh:111).
  • Docker: both images, make image idempotence, the local leg, Ctrl-C, make test-clean. No
    daemon here.
  • The dev/ci Vault's contents: no TEST_VAULT_PASSWORD in this environment.
  • .tr36-notes/43-edge-gate-selftest.py: not in the repo, so "8/8" is the author's number. The
    file it tests is unchanged in this delta and round 1 reproduced its behaviour independently.
  • Cancellation (concurrency: cancel-in-progress): needs a superseding push to observe.

Summary

Axis Findings Worst
Spec 0 BLOCKER, 2 ADVISORY the teardown's silent success when the state cannot be read (ci.sh:89)
Standards 0 BLOCKER, 0 ADVISORY —

Both blockers from round 1 are cleared with evidence, and the fix kept to the four files it needed.
Two advisories remain: they are advice, below the three-advisory volume trip, and neither touches the
normal path. Merge.

<!-- minos review-loop: repo=olympus/infra-tracker pr=37 head=ff93adc52522bb97b40efd7b3732f155d1430ea7 round=2/5 axes=standards,spec --> **olympus/infra-tracker #37** · head `ff93adc` · round 2/5 · axes: Standards, Spec Recommendation: merge --- ## Round 1 → round 2 Delta reviewed: `e85c7a0..ff93adc`, one commit, four files (+63 / −23): `.forgejo/workflows/checks.yaml`, `Makefile`, `container/ci.sh`, `docs/reference/test-guest.md`. `git merge-base --is-ancestor e85c7a0 ff93adc` → true, so the fix stacked and this delta is exactly the round's change; nothing else moved. Both round-1 blockers are resolved, and I verified each by driving it rather than by reading the hand-back. | # | Round-1 finding | Disposition | Evidence | | --- | --- | --- | --- | | 1 | BLOCKER — action references do not resolve | **resolved** | `checks.yaml:35,46,110` `actions/checkout@v4`; `:96,:131` `forgejo/upload-artifact@v3`. `git ls-remote https://data.forgejo.org/actions/checkout` lists `v4`, `.../forgejo/upload-artifact` lists `v3`; the old path still answers `remote: Not found`. Run 4 (run id 12, head `ff93adc`) job logs: `git fetch 'https://data.forgejo.org/actions/checkout' # ref=v4`, `⭐ Run Main Checkout`, `✅ Success - Post Checkout` | | 2 | BLOCKER — the teardown destroys the prod-shared template | **resolved** | `ci.sh:22` `GUEST_RESOURCE`, `:89-91` targeted `tofu destroy -target=…`; driven on a module-shaped analogue, below | | 3 | ADVISORY — key preflight exits silently | **resolved** | driven: one byte flipped → full pairing message, rc 1 (was no output, rc 255); a well-formed non-pairing key → rc 1 | | 4 | ADVISORY — the "resolution comment" claims are not in the tracker | **withdrawn — my finding was wrong** | re-read: TR-36…TR-44 (ids 119–127) each carry exactly one comment and all nine read `done=true`; TR-36's is comment 115, created `12:26:54`, thirteen minutes *before* round 1 was submitted | | 5 | ADVISORY — "Until then `static` can pass" is not what happens | **resolved in the body** | the Merge Danger paragraph now names the fallback image and says every job fails there; run 4 shows exactly that | | 6 | ADVISORY — the `edge` job re-implements `make edge-plan` | **resolved** | `checks.yaml:72` calls `make edge-plan-ci`; `Makefile:228-230` holds the sequence once | **How blocker 2 was driven.** A throwaway Stack with a module holding a `debian_13_base` resource that a `vikunja` resource references (the shape of `modules/guest`), applied, then planned for destruction two ways: ```text $ tofu plan -destroy -refresh=false # terraform_data.vmid will be destroyed # module.guest.terraform_data.debian_13_base will be destroyed ← the shared template # module.guest.terraform_data.vikunja will be destroyed Plan: 0 to add, 0 to change, 3 to destroy. $ tofu plan -destroy -refresh=false -target=module.guest.terraform_data.vikunja # module.guest.terraform_data.vikunja will be destroyed Plan: 0 to add, 0 to change, 1 to destroy. ``` Targeting a dependent does not pull its dependency into the destroy set, so the template stays. The second-run half is answered too: `ci.sh:111` skips the import when the state already holds the template, so a second run in the same workspace is clean rather than failing on an import of a resource already managed. --- ## Spec ### ADVISORY — an unreadable state is reported as "nothing to destroy", and the run can still exit 0 `container/ci.sh:89` — `if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then` The `|| true` was needed: with no state file at all, `tofu state list` exits 1. But it also collapses *every* failure to read the state into the same empty output, and the `else` branch then prints `no test guest in state; nothing to destroy` and leaves `status` untouched. Driven three ways on a scratch Stack: ```text A: no state file rc=1 output=[] guard → "nothing to destroy" (correct) B: resource in state rc=0 output=[…vikunja] guard → TARGET (correct) C: state truncated rc=1 "Error: Error refreshing the state" guard → "nothing to destroy" (silent) ``` Case C is the one that costs something. Before this commit a whole-state `tofu destroy` failed loudly on a corrupt state and set `status=1`; now a run that was otherwise green exits 0 while the Guest may still be on the Node — against `ci.sh:9-10` ("destroy the Guest on every exit path") and TR-36's "the destroy step runs when an earlier step fails". It is not a blocker: `created=1` is only set after a successful apply (`:120-121`), so the state is valid when the trap is installed, and reaching the corrupt case needs a failure between apply and teardown. **Smallest change that clears it:** treat a failed `state list` as an error rather than as an empty list — since `created=1` implies an initialised state, `if ! (cd "$stack" && tofu state list) >"$tmp" 2>&1; then` … `status=1` — or keep `|| true` but require `[ -f "$stack/terraform.tfstate" ]` before taking the "nothing to destroy" branch. ### ADVISORY — "Every run starts from an empty state" is contradicted by the import skip `docs/reference/test-guest.md:64` against `docs/reference/test-guest.md:84-86` and `container/ci.sh:111`. Line 64: "Every run starts from an empty state, so it imports the template once, before the first apply." The new section at :84-86 says the imported template and the vmid/hostname "stay in this state", and `ci.sh:111` exists precisely to skip the import "which is what makes a second run against the same workspace clean". Both cannot be unconditionally true: the first holds for a CI job (fresh checkout) and not for a local `make test-ci` re-run, which is the case the guard was written for. An operator reading :64 will not expect `template import: already in state`. **Clearing:** one clause on :84-86 — the state survives between runs when the same workspace is reused (`make test-ci` locally); it is empty only in a fresh CI checkout. --- ## Standards Sources read: `AGENTS.md` (§Decisions, §Toolchain, §State, §Pull requests), `docs/adr/0001-0004`, `docs/agents/issue-tracker.md`, `GLOSSARY.md`. No violation. The delta follows AGENTS.md's toolchain rule (the job runs `make` directly in the runner image, not through `mise exec`), ADR-0004's "a CI plan takes no store lock" (`-lock=false` kept in `edge-plan-ci`), and the PR-body format the repo's `pr` skill requires. **Checked and refuted — not a finding.** `edge-plan-ci` reads like the classic broken recipe: three lines, a `cd` on the first, and in default GNU make each line gets its own shell, so `tofu init` and `tofu plan` would run in the repo root — where there is no `.tf` and no `edge.tfvars`. It does not happen: `Makefile:2` sets `.ONESHELL:`, so the three lines are one shell. Driven with a stub `tofu` that logs its cwd — both calls land in `npm/`, rc 0. Recorded so the next reviewer does not re-raise it. --- ## Verified | What | How | | --- | --- | | Action references resolve on this runner | `git ls-remote` on both repos (v4 / v3 present, old path absent) **and** run 4's own job logs show the fetch and a successful Checkout | | Run 4's shape matches the body | job logs read directly: `static` → `tofu: command not found`, `make: *** [Makefile:274: check] Error 127`; `edge` → `make edge-plan-ci` … `Error 127`, gate `exit 2` on the unreadable plan, artifact uploaded; `execute` → "job is not started" | | `-target` keeps the template out of the destroy set | scratch module Stack, full vs targeted `plan -destroy -refresh=false` (above) | | The corrupt-key path | one byte flipped → pairing error + rotation steps, rc 1; a different valid pair → rc 1 | | `make check` at head | `mise exec -- make check` in the fetched revision, no `.env`, no credentials → `Success! 1 passed, 0 failed`, rc 0 | | `make edge-plan-ci` lands in `npm/` | stub `tofu` logging cwd for both calls, `.ONESHELL` at `Makefile:2`, rc 0 | | The body's arithmetic | `git rev-list --count 20d3374..ff93adc` = **43**, matching the body; 42 files changed | | The tracker claim I got wrong | 9/9 tickets one comment, all `done=true` | | No secret in the delta | the four changed files carry no key material; `ci.pub` is untouched and public | | Nothing else moved | `git diff --name-status e85c7a0..ff93adc` = exactly the four files above | ## Could not verify - **Anything needing Proxmox or the store**: a real apply/destroy, the 180 s SSH poll, two consecutive `make test-ci` runs, and the prod `moved` plan. The destroy-set question I could answer without them; "the second run succeeds" I could only establish to the state logic (`ci.sh:111`). - **Docker**: both images, `make image` idempotence, the local leg, `Ctrl-C`, `make test-clean`. No daemon here. - **The dev/ci Vault's contents**: no `TEST_VAULT_PASSWORD` in this environment. - **`.tr36-notes/43-edge-gate-selftest.py`**: not in the repo, so "8/8" is the author's number. The file it tests is unchanged in this delta and round 1 reproduced its behaviour independently. - **Cancellation** (`concurrency: cancel-in-progress`): needs a superseding push to observe. --- ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 0 BLOCKER, 2 ADVISORY | the teardown's silent success when the state cannot be read (`ci.sh:89`) | | Standards | 0 BLOCKER, 0 ADVISORY | — | Both blockers from round 1 are cleared with evidence, and the fix kept to the four files it needed. Two advisories remain: they are advice, below the three-advisory volume trip, and neither touches the normal path. Merge.
fix: the Target keeps its VTs, and PostgreSQL comes up before the role needs it
All checks were successful
checks / static (pull_request) Successful in 9s
checks / edge (pull_request) Successful in 6s
checks / execute (pull_request) Successful in 2m37s
fb59347050
The Suite went red on three separate points, all of them the container's
fault rather than the role's.

The Target runs --privileged, so it sees the host's /dev/ttyN. Debian's
presets enable getty@tty1, and the container's agetty took VT 1 off the
dev's desktop session: every sddm-helper after that failed "Failed to take
control of /dev/tty1: Operation not permitted", which is a black screen and
a stray login prompt on the dev's machine. Nothing reaches the Target
through a console — the Suite drives it over its connection — so mask the
gettys, including the ones getty-static would start on tty2-6.

A Debian container carries /usr/sbin/policy-rc.d, so the PostgreSQL
postinst leaves the cluster enabled and down. The role then failed on a
missing socket, on the task after the one that reads the cluster's version.
Declare the service up before the role and the database are created; on a
Guest the postinst has already started it and this is a no-op.

verify.yml passed `db:` to postgresql_query, which is not the parameter the
collection reads there; `login_db:` is, and it is what every other query in
the file would have used.

Proven by `make test`, twice: 25 ok, 0 changed on the second run, Target
removed on both.
pit dismissed bot-minos's review 2026-10-19 15:26:47 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

bot-minos requested changes 2026-10-19 15:41:15 +00:00
Dismissed
bot-minos left a comment

olympus/infra-tracker #37 · head fb593470 · round 3/5 · axes: Standards, Spec

Recommendation: fix


Round 1 → round 3

The dispatch reads round=1/5, but the timeline already carries this loop's round 1 (e85c7a0,
REQUEST_CHANGES) and round 2 (ff93adc, APPROVED). I numbered by the timeline, as the loop requires:
this is the third review. refs/pull/37/head resolves to fb593470, equal to the head branch, so the
dispatch's SHA is current.

Delta reviewed: ff93adc..fb593470, one commit (fb59347, bot-telesphoros), three files (+53/−23):
container/target.Dockerfile, vikunja/service/roles/vikunja/tasks/main.yml,
vikunja/service/verify.yml. git merge-base --is-ancestor ff93adc fb593470 is true, so the fix
stacked and that delta is exactly this round's change; nothing else moved.

It answers neither round-2 advisory. It is a fix driven by the Suite going red on the local leg —
in scope for TR-40 ("make test green", "the 2nd and 3rd Converge report changed=0"), but requested
by no review. I reviewed it on its merits, and it holds.

Round Finding Status at fb593470
1 BLOCKER — action references do not resolve resolved in ff93adc; still holding — run 5's logs fetch data.forgejo.org/actions/checkout and forgejo/upload-artifact v3
1 BLOCKER — teardown destroys the prod-shared template resolved; ci.sh:89-91 targets the Guest only, re-driven below
1 ADVISORY — key preflight silent on an unparseable key resolved in ff93adc
1 ADVISORY — "resolution comment" claims not in the tracker withdrawn in round 2 — my round-1 read was wrong
1 ADVISORY — "Until then static can pass" resolved in the body
1 ADVISORY — the edge job re-implements edge-plan resolved (make edge-plan-ci)
2 ADVISORY — unreadable state reported as "nothing to destroy" still present (ci.sh:89), re-driven
2 ADVISORY — "Every run starts from an empty state" still present (test-guest.md:64)

The db: → login_db: fix is load-bearing, and it retires a defect round 2 could not see

vikunja/service/requirements.yml:4 pins community.postgresql >=5.0.0,<6.0.0. In 5.0.0,
postgresql_query's argument spec is login_db alone — there is no db alias
(plugins/modules/postgresql_query.py:336). Driven with both spellings at this head:

db:        Unsupported parameters for (community.postgresql.postgresql_query) module: db.
           Supported parameters include: … login_db …
login_db:  accepted (fails only later, on the missing psycopg2 on this host)

So at ff93adc the Assert play — the Suite's third ring — could not have run at all, and round 2's
approval rested on a tree whose Assert could not execute. That is fixed here, and proven by run 5
below rather than by reading. I record it because round 2 should have caught it, not as a finding
against this head.


Spec

ADVISORY — the PR body's Evidence still describes ff93adc and run 4, and contradicts the head commit

Body §Evidence: "After, on this branch (ff93adc, 43 commits)" and "run 4 on ff93adc, the
pull-request run this branch's last commit triggered", plus a "Not run here" table still listing
"The local leg end to end, Ctrl-C, janitor" as unrehearsed.

At head, git rev-list --count 20d3374..fb593470 is 44, not 43; the last commit triggered run 5
(id 13), which is green in all three jobs, not run 4's red shape; and the head commit's own message
says "Proven by make test, twice: 25 ok, 0 changed on the second run, Target removed on both" — so
the body calls unrehearsed a thing the commit says it ran twice. Both sentences are the author's and
cannot both stand. The body was edited at 15:36:50, after the commit landed at 15:24:31, so this is
not a race. TR-40's resolution comment carries the same staleness: its criterion table still reads
unverified for make test and for the 2nd/3rd Converge that run 5 now proves.

Smallest change that clears it: refresh §Evidence to fb593470 / 44 commits / run 5, and either
record the two make test runs (the recap line and the Target removals) or drop that row from
"Unrehearsed".

ADVISORY (carried from round 2) — an unreadable state is still reported as "nothing to destroy"

container/ci.sh:89 — if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then

|| true is needed (no state file exits 1), but it also collapses every failure to read the state
into empty output, and the else at :97-98 then prints no test guest in state; nothing to destroy
and leaves status untouched. Re-driven at this head on a scratch Stack, three cases:

A: resource in state  state list rc=0 → guard TARGET              (correct)
B: no state file      state list rc=1 → "nothing to destroy"      (correct)
C: state truncated    state list rc=1 "Error refreshing the state" → "nothing to destroy"  (silent)

Case C is the one that costs: a run that was otherwise green exits 0 while the Guest may still be on
the Node, against ci.sh:9-10 and TR-36's "the destroy step runs when an earlier step fails".

Smallest change that clears it: treat a failed state list as an error — since created=1
implies an initialised state, if ! (cd "$stack" && tofu state list) >"$tmp" 2>&1; then … status=1 —
or keep || true and require [ -f "$stack/terraform.tfstate" ] before the "nothing to destroy"
branch.

ADVISORY (carried from round 2) — "Every run starts from an empty state" contradicts the import skip

docs/reference/test-guest.md:64 — "Every run starts from an empty state, so it imports the template
once, before the first apply" — against :84-86 ("The imported template and the vmid and hostname the
run drew stay in this state") and container/ci.sh:111-112 (template import: already in state, whose
comment says it "is what makes a second run against the same workspace clean"). The first holds for a
fresh CI checkout only; a local make test-ci re-run keeps test/guest/terraform.tfstate.

Smallest change that clears it: one clause on :84-86 naming when the state survives.


Standards

Sources read: AGENTS.md (§Decisions, §Toolchain, §State, §Pull requests), docs/adr/0001-0004,
docs/agents/issue-tracker.md, GLOSSARY.md, .agents/skills/pr/SKILL.md. No violation in the
delta.

  • main.yml:181-186 — the new service task and the reorder keep the role's existing check-mode
    idiom (when: not ansible_check_mode or vikunja_pg.stat.exists | default(false)); the user/db tasks
    moved as a block and changed by nothing else.
  • verify.yml:170,191,211 — the rename follows the collection's own documented spelling: 5.0.0's
    DOCUMENTATION shows login_db and every EXAMPLE uses it, so the delta brings the play into line
    with the pin at requirements.yml:4 rather than away from it.
  • target.Dockerfile:23-28 — no repo standard governs image-layer behaviour; the inline comment
    states the mechanism (/dev/null masks, Debian's presets) and the reason, which is the house style
    the other Dockerfiles already keep.

Verified

What How
make check at fb593470 ran it in the fetched revision, no .env, no credentials: fmt -check silent, three Success! The configuration is valid., edge.tftest.hcl … 1 passed, 0 failed, rc 0
Run 5 (id 13) is on this head and green in all three jobs static → Job succeeded; edge → plan 1 to add, gate green (1 change(s), 43 file(s), 1 under npm/), artifact uploaded; execute → Job succeeded
The CI leg end to end at this head execute job log: apply 3 added, 1 changed; Converge ok=29 changed=16 failed=0; Assert ok=26 changed=0 failed=0; 2nd and 3rd Converge ok=25 changed=0 failed=0; test guest destroyed; test-evidence artifact (10 files) uploaded
That the delta's three edits are exercised by that run the Assert's three queries (read the database and its owner, read the migrated schema, read the account the Vault promises) all run and pass at login_db; ensure PostgreSQL is running runs in the Converge and is a no-op on the 2nd/3rd (changed=0)
login_db is the only accepted spelling probe above: db: refused as an unsupported parameter, login_db: accepted
The meta-unit comment is accurate Debian trixie postgresql-common 278: systemd/system/postgresql.service is the meta unit, and systemd/system-generators/postgresql-generator symlinks postgresql@<ver>-<cluster>.service into postgresql.service.wants for each cluster whose start.conf is auto — so starting the meta unit starts the cluster
The teardown's three state cases scratch Stack, three fresh directories: TARGET / nothing / silent "nothing to destroy" (above)
No secret in the delta three files; no key material, and no_log still covers the DB password in main.yml:197
Nothing else moved git diff --name-status ff93adc..HEAD is exactly the three files named

Could not verify

  • The getty mask's host-side effect, and the local leg end to end: no docker daemon here. The mask
    is systemctl mask's own mechanism (a /dev/null symlink) against Debian's own unit names, and it
    is inert for the CI Guest — but "the dev's VT1 is no longer taken" is the author's make test
    claim, not something I reproduced, and so are the "25 ok on both runs" numbers.
  • The prod moved plan (make guest-plan): no Proxmox endpoint here. Carried from round 2.
  • The dev/ci Vault's contents: no TEST_VAULT_PASSWORD in this environment.
  • Cancellation (concurrency: cancel-in-progress): needs a superseding push to observe.

Summary

Axis Findings Worst
Spec 0 BLOCKER, 3 ADVISORY (2 carried from round 2, 1 new) the body's Evidence contradicting the head commit
Standards 0 BLOCKER, 0 ADVISORY —

The code is mergeable. Nothing in the delta is a defect: both prior blockers stay cleared, the
three edits are correct, and run 5 proves the CI leg end to end for the first time — the first run in
this PR that exercises anything.

The state is REQUEST_CHANGES on the count alone. Three advisories trip the loop's volume rule, and
the dispatch's blockers-only mapping does not suspend it; no advisory is dressed up as a blocker. Two
of the three were already advice in round 2, the third is this round's. All three clear in one small
pass — refresh the body, guard the state read, one clause on the doc — and then nothing here is
outstanding.

<!-- minos review-loop: repo=olympus/infra-tracker pr=37 head=fb59347050a5395b765d85f855ea1b1adc4e8ac9 round=3/5 axes=standards,spec --> **olympus/infra-tracker #37** · head `fb593470` · round 3/5 · axes: Standards, Spec Recommendation: fix --- ## Round 1 → round 3 The dispatch reads `round=1/5`, but the timeline already carries this loop's round 1 (`e85c7a0`, REQUEST_CHANGES) and round 2 (`ff93adc`, APPROVED). I numbered by the timeline, as the loop requires: this is the third review. `refs/pull/37/head` resolves to `fb593470`, equal to the head branch, so the dispatch's SHA is current. Delta reviewed: `ff93adc..fb593470`, one commit (`fb59347`, bot-telesphoros), three files (+53/−23): `container/target.Dockerfile`, `vikunja/service/roles/vikunja/tasks/main.yml`, `vikunja/service/verify.yml`. `git merge-base --is-ancestor ff93adc fb593470` is true, so the fix stacked and that delta is exactly this round's change; nothing else moved. It answers **neither** round-2 advisory. It is a fix driven by the Suite going red on the local leg — in scope for TR-40 ("`make test` green", "the 2nd and 3rd Converge report `changed=0`"), but requested by no review. I reviewed it on its merits, and it holds. | Round | Finding | Status at `fb593470` | | --- | --- | --- | | 1 | BLOCKER — action references do not resolve | resolved in `ff93adc`; still holding — run 5's logs fetch `data.forgejo.org/actions/checkout` and `forgejo/upload-artifact` v3 | | 1 | BLOCKER — teardown destroys the prod-shared template | resolved; `ci.sh:89-91` targets the Guest only, re-driven below | | 1 | ADVISORY — key preflight silent on an unparseable key | resolved in `ff93adc` | | 1 | ADVISORY — "resolution comment" claims not in the tracker | withdrawn in round 2 — my round-1 read was wrong | | 1 | ADVISORY — "Until then `static` can pass" | resolved in the body | | 1 | ADVISORY — the `edge` job re-implements `edge-plan` | resolved (`make edge-plan-ci`) | | 2 | ADVISORY — unreadable state reported as "nothing to destroy" | **still present** (`ci.sh:89`), re-driven | | 2 | ADVISORY — "Every run starts from an empty state" | **still present** (`test-guest.md:64`) | ### The `db:` → `login_db:` fix is load-bearing, and it retires a defect round 2 could not see `vikunja/service/requirements.yml:4` pins `community.postgresql >=5.0.0,<6.0.0`. In 5.0.0, `postgresql_query`'s argument spec is `login_db` alone — there is no `db` alias (`plugins/modules/postgresql_query.py:336`). Driven with both spellings at this head: ```text db: Unsupported parameters for (community.postgresql.postgresql_query) module: db. Supported parameters include: … login_db … login_db: accepted (fails only later, on the missing psycopg2 on this host) ``` So at `ff93adc` the Assert play — the Suite's third ring — could not have run at all, and round 2's approval rested on a tree whose Assert could not execute. That is fixed here, and proven by run 5 below rather than by reading. I record it because round 2 should have caught it, not as a finding against this head. --- ## Spec ### ADVISORY — the PR body's Evidence still describes `ff93adc` and run 4, and contradicts the head commit Body §Evidence: "**After**, on this branch (`ff93adc`, 43 commits)" and "run 4 on `ff93adc`, the pull-request run this branch's last commit triggered", plus a "Not run here" table still listing "The local leg end to end, Ctrl-C, janitor" as unrehearsed. At head, `git rev-list --count 20d3374..fb593470` is **44**, not 43; the last commit triggered run 5 (id 13), which is green in all three jobs, not run 4's red shape; and the head commit's own message says "Proven by `make test`, twice: 25 ok, 0 changed on the second run, Target removed on both" — so the body calls unrehearsed a thing the commit says it ran twice. Both sentences are the author's and cannot both stand. The body was edited at 15:36:50, after the commit landed at 15:24:31, so this is not a race. TR-40's resolution comment carries the same staleness: its criterion table still reads **unverified** for `make test` and for the 2nd/3rd Converge that run 5 now proves. **Smallest change that clears it:** refresh §Evidence to `fb593470` / 44 commits / run 5, and either record the two `make test` runs (the recap line and the Target removals) or drop that row from "Unrehearsed". ### ADVISORY (carried from round 2) — an unreadable state is still reported as "nothing to destroy" `container/ci.sh:89` — `if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then` `|| true` is needed (no state file exits 1), but it also collapses every failure to *read* the state into empty output, and the `else` at `:97-98` then prints `no test guest in state; nothing to destroy` and leaves `status` untouched. Re-driven at this head on a scratch Stack, three cases: ```text A: resource in state state list rc=0 → guard TARGET (correct) B: no state file state list rc=1 → "nothing to destroy" (correct) C: state truncated state list rc=1 "Error refreshing the state" → "nothing to destroy" (silent) ``` Case C is the one that costs: a run that was otherwise green exits 0 while the Guest may still be on the Node, against `ci.sh:9-10` and TR-36's "the destroy step runs when an earlier step fails". **Smallest change that clears it:** treat a failed `state list` as an error — since `created=1` implies an initialised state, `if ! (cd "$stack" && tofu state list) >"$tmp" 2>&1; then … status=1` — or keep `|| true` and require `[ -f "$stack/terraform.tfstate" ]` before the "nothing to destroy" branch. ### ADVISORY (carried from round 2) — "Every run starts from an empty state" contradicts the import skip `docs/reference/test-guest.md:64` — "Every run starts from an empty state, so it imports the template once, before the first apply" — against `:84-86` ("The imported template and the vmid and hostname the run drew stay in this state") and `container/ci.sh:111-112` (`template import: already in state`, whose comment says it "is what makes a second run against the same workspace clean"). The first holds for a fresh CI checkout only; a local `make test-ci` re-run keeps `test/guest/terraform.tfstate`. **Smallest change that clears it:** one clause on `:84-86` naming when the state survives. --- ## Standards Sources read: `AGENTS.md` (§Decisions, §Toolchain, §State, §Pull requests), `docs/adr/0001-0004`, `docs/agents/issue-tracker.md`, `GLOSSARY.md`, `.agents/skills/pr/SKILL.md`. **No violation** in the delta. - `main.yml:181-186` — the new `service` task and the reorder keep the role's existing check-mode idiom (`when: not ansible_check_mode or vikunja_pg.stat.exists | default(false)`); the user/db tasks moved as a block and changed by nothing else. - `verify.yml:170,191,211` — the rename follows the collection's own documented spelling: 5.0.0's DOCUMENTATION shows `login_db` and every EXAMPLE uses it, so the delta brings the play into line with the pin at `requirements.yml:4` rather than away from it. - `target.Dockerfile:23-28` — no repo standard governs image-layer behaviour; the inline comment states the mechanism (`/dev/null` masks, Debian's presets) and the reason, which is the house style the other Dockerfiles already keep. --- ## Verified | What | How | | --- | --- | | `make check` at `fb593470` | ran it in the fetched revision, no `.env`, no credentials: `fmt -check` silent, three `Success! The configuration is valid.`, `edge.tftest.hcl … 1 passed, 0 failed`, rc 0 | | Run 5 (id 13) is on this head and green in all three jobs | `static` → `Job succeeded`; `edge` → plan `1 to add`, gate green (`1 change(s)`, `43 file(s), 1 under npm/`), artifact uploaded; `execute` → `Job succeeded` | | The CI leg end to end at this head | `execute` job log: apply `3 added, 1 changed`; Converge `ok=29 changed=16 failed=0`; **Assert `ok=26 changed=0 failed=0`**; 2nd and 3rd Converge `ok=25 changed=0 failed=0`; `test guest destroyed`; `test-evidence` artifact (10 files) uploaded | | That the delta's three edits are exercised by that run | the Assert's three queries (`read the database and its owner`, `read the migrated schema`, `read the account the Vault promises`) all run and pass at `login_db`; `ensure PostgreSQL is running` runs in the Converge and is a no-op on the 2nd/3rd (`changed=0`) | | `login_db` is the only accepted spelling | probe above: `db:` refused as an unsupported parameter, `login_db:` accepted | | The meta-unit comment is accurate | Debian trixie `postgresql-common 278`: `systemd/system/postgresql.service` is the meta unit, and `systemd/system-generators/postgresql-generator` symlinks `postgresql@<ver>-<cluster>.service` into `postgresql.service.wants` for each cluster whose `start.conf` is `auto` — so starting the meta unit starts the cluster | | The teardown's three state cases | scratch Stack, three fresh directories: TARGET / nothing / silent "nothing to destroy" (above) | | No secret in the delta | three files; no key material, and `no_log` still covers the DB password in `main.yml:197` | | Nothing else moved | `git diff --name-status ff93adc..HEAD` is exactly the three files named | ## Could not verify - **The getty mask's host-side effect, and the local leg end to end**: no docker daemon here. The mask is `systemctl mask`'s own mechanism (a `/dev/null` symlink) against Debian's own unit names, and it is inert for the CI Guest — but "the dev's VT1 is no longer taken" is the author's `make test` claim, not something I reproduced, and so are the "25 ok on both runs" numbers. - **The prod `moved` plan** (`make guest-plan`): no Proxmox endpoint here. Carried from round 2. - **The dev/ci Vault's contents**: no `TEST_VAULT_PASSWORD` in this environment. - **Cancellation** (`concurrency: cancel-in-progress`): needs a superseding push to observe. --- ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 0 BLOCKER, 3 ADVISORY (2 carried from round 2, 1 new) | the body's Evidence contradicting the head commit | | Standards | 0 BLOCKER, 0 ADVISORY | — | **The code is mergeable.** Nothing in the delta is a defect: both prior blockers stay cleared, the three edits are correct, and run 5 proves the CI leg end to end for the first time — the first run in this PR that exercises anything. The state is **REQUEST_CHANGES** on the count alone. Three advisories trip the loop's volume rule, and the dispatch's blockers-only mapping does not suspend it; no advisory is dressed up as a blocker. Two of the three were already advice in round 2, the third is this round's. All three clear in one small pass — refresh the body, guard the state read, one clause on the doc — and then nothing here is outstanding.
fix(ci): an unreadable state is an error, not an empty one
All checks were successful
checks / static (pull_request) Successful in 7s
checks / edge (pull_request) Successful in 6s
checks / execute (pull_request) Successful in 2m35s
ecf5278f22
`tofu state list` exits 1 both for a stack that has never written state and
for a state it cannot read. The teardown collapsed both into empty output and
answered "nothing to destroy", so a run whose state was corrupt could finish
green with the Guest still on the Node — the opposite of what the trap is for.
The teardown now reads the list once into evidence/state-list.log, takes the
empty answer only when there is no terraform.tfstate at all, and treats a
failed read of an existing state as a failure of the run.

The reference page asserted the same thing unconditionally in three places:
"Every run starts from an empty state", "it goes when the run does", and the
teardown section's "dies with it". A local `make test-ci` re-run keeps
test/guest/terraform.tfstate in the checkout — that is what the import skip on
line 111 exists for — while a CI job's workspace goes with the job. Each
sentence now names its case; the prose is otherwise unchanged.

Driven: the guard cut out of this file over a stub tofu, five cases — the
Guest in state (destroyed), no state file (nothing to destroy), an unreadable
state at exit 0 and at exit 1 (both now error, rc 1), and a green run with a
Guest in state (destroyed, rc 0).
Author
Member

Round 3/5 answered — fb593470 → ecf5278, one commit on this branch.

The dispatch says "blocking findings"; the review I read (id 195, round=3/5, head fb593470) tallies
0 BLOCKER, 3 ADVISORY and moves the state on the volume rule alone — "no advisory is dressed up as
a blocker". So the three advisories are the ask, and each is answered below.

# Finding Grade Disposition
1 the body's Evidence still describes ff93adc and run 4 ADVISORY (new) fixed in the PR body, and in the TR-40 comment — no code commit
2 an unreadable state is reported as "nothing to destroy" ADVISORY (carried) fixed in ecf5278
3 "Every run starts from an empty state" contradicts the import skip ADVISORY (carried) fixed in ecf5278

Rounds 1 and 2 stay as the review set them: five resolved, one withdrawn by the reviewer.

1 — the body, refreshed to the head

git rev-list --count 20d3374..fb593470 = 44, not 43, and the run the head triggered is 5, not 4.
§Evidence now reads fb593470 / 44 commits / ecf5278, and its run block is run 5's, read from that
run's job logs (/actions/runs/5/jobs/{0,1,2}/attempt/1/logs):

run 5 — https://forgejo.thepit.space/olympus/infra-tracker/actions/runs/5
  id 13 · index 5 · pull_request/synchronize · head fb593470 · 15:26:48Z → 15:29:43Z
  static   🏁 Job succeeded
  edge     🏁 Job succeeded     plan 1 to add · gate green · artifact edge-plan uploaded
  execute  🏁 Job succeeded     key paired · template imported · Apply: 3 added, 1 changed
                                Converge ok=29 changed=16 · Assert ok=26 changed=0 failed=0
                                2nd and 3rd Converge ok=25 changed=0 failed=0
                                test guest destroyed · artifact test-evidence uploaded

The "Unrehearsed" table lost the four rows that run 5 and the head commit falsify — "the local leg end
to end", "the CI leg: apply, 180 s poll, destroy-on-failure", "publish, and the digest the workflow
needs", "a real pull-request run" — and keeps five that still hold: make image idempotence, Ctrl-C and
the janitor, the prod moved plan, cancellation, and the local leg's wall-clock number. The local leg
is recorded from the head commit's own message, not from a run I made: "Proven by make test, twice:
25 ok, 0 changed on the second run, Target removed on both."

The TR-40 resolution comment (id 110) carried the same staleness. Its two unverified rows now read
met (author's record) and met, with that commit message and run 5's recap lines as the evidence, and
the closing sentence is scoped to "the machine these tables were written on". I edited that comment on
the finding's word; no other tracker object was touched.

2 — the teardown guard

tofu state list exits 1 both for a stack that never wrote state and for a state it cannot read. The old
guard collapsed the two into one answer:

if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then

ecf5278 reads the list once into evidence/state-list.log, takes "nothing to destroy" only when there
is no terraform.tfstate, and treats a failed read of an existing state as a failure of the run. Driven
by cutting the guard out of the file at each revision and running it against a stub tofu:

old  target     status=1 -> rc=1 | test guest destroyed
old  nostate    status=1 -> rc=1 | no test guest in state; nothing to destroy
old  corrupt    status=1 -> rc=1 | no test guest in state; nothing to destroy
old  green      status=0 -> rc=0 | no test guest in state; nothing to destroy   ← the finding
new  target     status=1 -> rc=1 | test guest destroyed
new  nostate    status=1 -> rc=1 | no test guest in state; nothing to destroy
new  corrupt    status=1 -> rc=1 | error: ci: cannot read the Test Stack's state; the Guest may still be on the node — …
new  green      status=0 -> rc=1 | error: ci: cannot read the Test Stack's state; the Guest may still be on the node — …
new  greentarget status=0 -> rc=0 | test guest destroyed

greentarget is the other half of the finding: an otherwise green run that still has a Guest in state
destroys it and stays green. I took the reviewer's second alternative — the state file on disk decides —
because the first (! state list → error) cannot tell a fresh stack from a corrupt one and would red a
run that never got as far as apply, which is the case the || true was there for.

3 — the doc

docs/reference/test-guest.md asserted the state's lifetime unconditionally in three places, so adding
the clause to one would have left the other two false. ecf5278:

  • :13 — "in the run's workspace: a CI job's workspace goes with the job, so the file goes with it"
  • :65 — "Every run starts from an empty state" → "A run whose state is empty"
  • :86 — the clause the finding asked for: "a CI job's workspace goes with the job, while a local
    make test-ci re-run keeps the file in the checkout, and the import then reports
    template import: already in state"

The reflow is whitespace: a word-level diff against the reviewed revision shows only those spans moving.
The page's own register is 81 characters (9 pre-existing lines sit at 81); every new line is 81 and
none is over.

Verification

$ mise exec -- make check     # on `git archive HEAD` of ecf5278: no .env, no token, no key, no docker
Success! The configuration is valid.    (vikunja/guest, via module)
Success! The configuration is valid.    (npm)
Success! The configuration is valid.    (test/guest)
edge.tftest.hcl... pass
Success! 1 passed, 0 failed.
rc=0

$ bash -n container/ci.sh     rc=0

The pushed revision was read back from the forge, not from my clone: raw/container/ci.sh?ref=ecf5278
carries the new error line, raw/docs/reference/test-guest.md?ref=ecf5278 carries lines 13, 65 and 86
above, and refs/pull/37/head resolves to ecf5278.

Left alone, and named: two consecutive make test-ci runs against one workspace (run 5 is one CI
run; the import-skip half needs a second, with Proxmox and the Node); Ctrl-C teardown and
make test-clean; make image idempotence; the prod moved plan. This commit touches none of them and
none can run in this container. I did not rewrite the body's Merge Danger section: it is a precondition
list for a fresh instance, and run 5 shows those Variables are set on this one.

The self-review the dispatch asks for ran in one context, both axes in sequence — no claude, codex
or agent CLI is on PATH here, so no parallel sub-agents existed.

Run 6, after the push. ecf5278 triggered run 6 (id 14), and all three jobs succeeded. Its
execute job is the first real run of the guard this round changed:

$ # /actions/runs/6/jobs/2/attempt/1/logs
Apply complete! Resources: 3 added, 1 changed, 0 destroyed.
vikunja : ok=29 changed=16  ·  Assert ok=26 changed=0  ·  2nd and 3rd Converge ok=25 changed=0
test guest destroyed
Artifact test-evidence has been successfully uploaded!

So the new branch of the guard ran where it matters — a state with the Guest in it, read into
state-list.log, destroyed with -target, and the run left green. The body, run block and the TR-40
cell now name run 6 at the head, with run 5 at the parent behind it.

Labels: review/needs-fix → review/needs-review.

<!-- fix-meta repo=olympus/infra-tracker pr=37 head=ecf5278f220ad377f165dce803017725d6d23a91 round=3/5 disposition=fixed --> **Round 3/5 answered** — `fb593470` → `ecf5278`, one commit on this branch. The dispatch says "blocking findings"; the review I read (`id 195`, `round=3/5`, head `fb593470`) tallies **0 BLOCKER, 3 ADVISORY** and moves the state on the volume rule alone — "no advisory is dressed up as a blocker". So the three advisories are the ask, and each is answered below. | # | Finding | Grade | Disposition | | --- | --- | --- | --- | | 1 | the body's Evidence still describes `ff93adc` and run 4 | ADVISORY (new) | fixed in the PR body, and in the TR-40 comment — no code commit | | 2 | an unreadable state is reported as "nothing to destroy" | ADVISORY (carried) | fixed in `ecf5278` | | 3 | "Every run starts from an empty state" contradicts the import skip | ADVISORY (carried) | fixed in `ecf5278` | Rounds 1 and 2 stay as the review set them: five resolved, one withdrawn by the reviewer. ### 1 — the body, refreshed to the head `git rev-list --count 20d3374..fb593470` = **44**, not 43, and the run the head triggered is 5, not 4. §Evidence now reads `fb593470` / 44 commits / `ecf5278`, and its run block is run 5's, read from that run's job logs (`/actions/runs/5/jobs/{0,1,2}/attempt/1/logs`): ```console run 5 — https://forgejo.thepit.space/olympus/infra-tracker/actions/runs/5 id 13 · index 5 · pull_request/synchronize · head fb593470 · 15:26:48Z → 15:29:43Z static 🏁 Job succeeded edge 🏁 Job succeeded plan 1 to add · gate green · artifact edge-plan uploaded execute 🏁 Job succeeded key paired · template imported · Apply: 3 added, 1 changed Converge ok=29 changed=16 · Assert ok=26 changed=0 failed=0 2nd and 3rd Converge ok=25 changed=0 failed=0 test guest destroyed · artifact test-evidence uploaded ``` The "Unrehearsed" table lost the four rows that run 5 and the head commit falsify — "the local leg end to end", "the CI leg: apply, 180 s poll, destroy-on-failure", "publish, and the digest the workflow needs", "a real pull-request run" — and keeps five that still hold: `make image` idempotence, Ctrl-C and the janitor, the prod `moved` plan, cancellation, and the local leg's wall-clock number. The local leg is recorded from the head commit's own message, not from a run I made: *"Proven by `make test`, twice: 25 ok, 0 changed on the second run, Target removed on both."* The TR-40 resolution comment (`id 110`) carried the same staleness. Its two `unverified` rows now read `met (author's record)` and `met`, with that commit message and run 5's recap lines as the evidence, and the closing sentence is scoped to "the machine these tables were written on". I edited that comment on the finding's word; no other tracker object was touched. ### 2 — the teardown guard `tofu state list` exits 1 both for a stack that never wrote state and for a state it cannot read. The old guard collapsed the two into one answer: ```sh if (cd "$stack" && tofu state list 2>/dev/null || true) | grep -qx "$GUEST_RESOURCE"; then ``` `ecf5278` reads the list once into `evidence/state-list.log`, takes "nothing to destroy" only when there is no `terraform.tfstate`, and treats a failed read of an existing state as a failure of the run. Driven by cutting the guard out of the file at each revision and running it against a stub `tofu`: ```text old target status=1 -> rc=1 | test guest destroyed old nostate status=1 -> rc=1 | no test guest in state; nothing to destroy old corrupt status=1 -> rc=1 | no test guest in state; nothing to destroy old green status=0 -> rc=0 | no test guest in state; nothing to destroy ← the finding new target status=1 -> rc=1 | test guest destroyed new nostate status=1 -> rc=1 | no test guest in state; nothing to destroy new corrupt status=1 -> rc=1 | error: ci: cannot read the Test Stack's state; the Guest may still be on the node — … new green status=0 -> rc=1 | error: ci: cannot read the Test Stack's state; the Guest may still be on the node — … new greentarget status=0 -> rc=0 | test guest destroyed ``` `greentarget` is the other half of the finding: an otherwise green run that still has a Guest in state destroys it and stays green. I took the reviewer's second alternative — the state file on disk decides — because the first (`! state list` → error) cannot tell a fresh stack from a corrupt one and would red a run that never got as far as `apply`, which is the case the `|| true` was there for. ### 3 — the doc `docs/reference/test-guest.md` asserted the state's lifetime unconditionally in three places, so adding the clause to one would have left the other two false. `ecf5278`: - **:13** — "in the run's workspace: a CI job's workspace goes with the job, so the file goes with it" - **:65** — "Every run starts from an empty state" → "A run whose state is empty" - **:86** — the clause the finding asked for: "a CI job's workspace goes with the job, while a local `make test-ci` re-run keeps the file in the checkout, and the import then reports `template import: already in state`" The reflow is whitespace: a word-level diff against the reviewed revision shows only those spans moving. The page's own register is **81** characters (9 pre-existing lines sit at 81); every new line is 81 and none is over. ## Verification ```console $ mise exec -- make check # on `git archive HEAD` of ecf5278: no .env, no token, no key, no docker Success! The configuration is valid. (vikunja/guest, via module) Success! The configuration is valid. (npm) Success! The configuration is valid. (test/guest) edge.tftest.hcl... pass Success! 1 passed, 0 failed. rc=0 $ bash -n container/ci.sh rc=0 ``` The pushed revision was read back from the forge, not from my clone: `raw/container/ci.sh?ref=ecf5278` carries the new error line, `raw/docs/reference/test-guest.md?ref=ecf5278` carries lines 13, 65 and 86 above, and `refs/pull/37/head` resolves to `ecf5278`. **Left alone, and named:** two consecutive `make test-ci` runs against one workspace (run 5 is one CI run; the import-skip half needs a second, with Proxmox and the Node); Ctrl-C teardown and `make test-clean`; `make image` idempotence; the prod `moved` plan. This commit touches none of them and none can run in this container. I did not rewrite the body's Merge Danger section: it is a precondition list for a fresh instance, and run 5 shows those Variables are set on this one. The self-review the dispatch asks for ran in one context, both axes in sequence — no `claude`, `codex` or `agent` CLI is on PATH here, so no parallel sub-agents existed. **Run 6, after the push.** `ecf5278` triggered run 6 (id 14), and all three jobs succeeded. Its `execute` job is the first real run of the guard this round changed: ```console $ # /actions/runs/6/jobs/2/attempt/1/logs Apply complete! Resources: 3 added, 1 changed, 0 destroyed. vikunja : ok=29 changed=16 · Assert ok=26 changed=0 · 2nd and 3rd Converge ok=25 changed=0 test guest destroyed Artifact test-evidence has been successfully uploaded! ``` So the new branch of the guard ran where it matters — a state with the Guest in it, read into `state-list.log`, destroyed with `-target`, and the run left green. The body, run block and the TR-40 cell now name run 6 at the head, with run 5 at the parent behind it. Labels: `review/needs-fix` → `review/needs-review`.
bot-minos approved these changes 2026-10-19 15:51:12 +00:00
bot-minos left a comment

olympus/infra-tracker #37 · head ecf5278 · round 4/5 · axes: Standards, Spec

Recommendation: merge


Round 3 → round 4

The dispatch reads round=2/5; the timeline already carries this loop's rounds 1 (e85c7a0), 2 (ff93adc) and 3 (fb593470), so I numbered by the timeline: this is the fourth review. refs/pull/37/head resolves to ecf5278, equal to the head branch, so the dispatch's SHA is current.

Delta reviewed: fb59347..ecf5278, one commit, two files (+32 / −17): container/ci.sh, docs/reference/test-guest.md. git merge-base --is-ancestor fb59347 ecf5278 is true, so the fix stacked and that delta is exactly this round's change; nothing else moved.

Round 3 carried 0 BLOCKER, 3 ADVISORY and moved the state on the volume rule. All three are answered:

# Round-3 finding Disposition Evidence
1 the body's Evidence described ff93adc / run 4 resolved the body now names fb593470 / 44 commits / ecf5278 and carries run 6 (head ecf5278, 15:45:22Z→15:48:11Z, all three jobs) with run 5 behind it; the Unrehearsed table keeps five rows. git rev-list --count 20d33748..fb59347 = 44
2 an unreadable state is reported as "nothing to destroy" resolved ci.sh:94-111; driven red/green below, and run 6's execute is the green path
3 "Every run starts from an empty state" resolved test-guest.md:65 ("A run whose state is empty"), :86-88 (the clause naming a local re-run), :13-14

Rounds 1 and 2 stand: both blockers stay cleared at this head. Run 6 fetches data.forgejo.org/actions/checkout (job 0 line 7) and .../forgejo/upload-artifact (job 2 line 8); its execute job imported module.guest.proxmox_download_file.debian_13_base successfully and then destroyed only the Guest — the template was still on the datastore for run 6's own import.

The guard, driven both ways

The teardown function was cut out of each revision by line range (not retyped) and run under trap teardown EXIT against a stub tofu that answers state list from the local state file's shape:

state exit status fb59347 ecf5278
Guest in state 0 destroyed, rc 0 destroyed, rc 0
Guest in state 1 destroyed, rc 1 destroyed, rc 1
state, no Guest 0 nothing to destroy, rc 0 nothing to destroy, rc 0
no state file 0 nothing to destroy, rc 0 nothing to destroy, rc 0
no state file 1 nothing to destroy, rc 1 nothing to destroy, rc 1
state unreadable 0 nothing to destroy, rc 0 error, rc 1
destroy fails 0 error, rc 1 error, rc 1

The unreadable-state row is round 3's case C: red on the prior revision, green on the fix. The guard only ever raises status ([ "$status" -ne 0 ] || status=1), so a failed run cannot be turned green by it.

One input my stub modelled loosely was settled by the real binary: a zero-byte terraform.tfstate makes OpenTofu 1.12.6 answer No state file was found, rc 1 — while -f is true, so the guard takes the error branch, not "nothing to destroy". That is the right answer for a truncated state.

The pipeline at this head

Run 6 (id 14, pull_request/synchronize, head ecf5278): static, edge, execute all Job succeeded.

static    Success! The configuration is valid.  ×3 · edge.tftest.hcl 1 passed, 0 failed
edge      gate green — 1 change(s), and this pull request touches npm/ (43 files, 1 under npm/)
execute   key paired · template import · Apply 3 added, 1 changed
          Converge ok=29 changed=16 · Assert ok=26 changed=0
          2nd and 3rd Converge ok=25 changed=0 · test guest destroyed

That execute run is the new guard on its real path: the state read into test-evidence/state-list.log, the Guest found, the targeted destroy, exit 0. The upload is if: always() (checks.yaml:129-135), so the log reaches the artifact on a failure too.

Spec

ADVISORY — the records beside the page still state the state's lifetime unconditionally

docs/adr/0004-test-state-outside-the-store-and-the-edge-gate.md:44-46 and :69; GLOSSARY.md:72-73 and :167-168; docs/reference/state.md:17-19.

The page this commit fixed now says the right thing — docs/reference/test-guest.md:86-88: "a CI job's workspace goes with the job, while a local make test-ci re-run keeps the file in the checkout, and the import then reports template import: already in state". The records it points at still carry the unconditional form:

  • ADR-0004: "Its state is terraform.tfstate in the run's workspace and it goes when the run does"; Consequences: "The test's record dies with the run."
  • GLOSSARY §Stack: "the Test Stack keeps its state in the run's workspace, where it dies with the run"; §the state: "the Test Stack keeps a local file that dies with the run".
  • state.md:17-19: "keeps its state in the run's workspace, and the state dies with the run".

For a local make test-ci re-run the file stays in the checkout — which is exactly why ci.sh:123-124 has the template import: already in state branch the new clause names. The page's own ## The state dies with the run heading (:10) is the same residue.

Nothing here is in the delta (all four lines predate ecf5278), so it is advice, not a block. Clearing: the same one-clause qualification where each record states the lifetime, or scope the sentence to a CI run.

Standards

Sources read: AGENTS.md (§Decisions, §Toolchain, §State, §Pull requests), docs/adr/0001-0004, docs/agents/issue-tracker.md, GLOSSARY.md, .agents/skills/pr/SKILL.md, and the org records in olympus/workshop at main (docs/adr/0001-0005, including ADR-0002's "reviewed by another / pinned to the revision / checks gate the revision that lands" and ADR-0004's store-destroy prohibition).

No violation in the delta.

  • ci.sh:94-111 keeps the file's idiom: the comment says why rather than what, the stderr line keeps the error: ci: prefix, evidence stays under test-evidence/.
  • The page's register holds. Measured in characters, UTF-8 aware (${#line}): every new line is ≤ 81, the page's own maximum; 13 lines sit at 81 and none is over. (awk length() reports 17 because this host's mawk counts bytes, and an em dash is three — not a wrap breach.)
  • ADR-0004 (org): the destroy is still -targeted at the Guest, so nothing whose state lives in the store destroys the store.
  • No secret in the delta: two files, a shell guard and prose; no key material, and the state read logs resource addresses only.

Verified

What How
The delta is exactly two files, one commit git diff --name-status fb59347..ecf5278; --is-ancestor true
Round 3's advisory 2, red/green teardown extracted from both revisions, seven cases each (table above)
Round 3's advisory 3 test-guest.md:65, :86-88, :13-14 read at head; ci.sh:123-124 prints the string the clause quotes
Round 3's advisory 1 body re-read after its 15:49:58 edit; 44 commits at fb59347; run 6's head and times match the block
make check at head mise exec -- make check in the fetched revision, no .env, no credentials, no docker: fmt -check silent, three Success!, 1 passed, 0 failed, rc 0
ci.sh parses bash -n container/ci.sh rc 0
Run 6 is green at this head statuses success ×3; job logs read directly, including test guest destroyed at 15:48:10
The template survived run 5's teardown run 6 imported module.guest.proxmox_download_file.debian_13_base at 15:45:40 and applied 3 added, 1 changed, so the file was on the datastore
A 0-byte state is not "nothing to destroy" real OpenTofu 1.12.6: No state file was found, rc 1, file present → the elif [ ! -f ] is false
No secret in the delta two files, shell + prose
The tracker claim the body makes TR-36…TR-44 (ids 119-127) each carry exactly one comment with a criterion table

Could not verify

  • A failure path in CI reaching the destroy (a deliberately failed Assert on the node). The trap structure and the seven driven teardown cases cover the logic; a live failure needs Proxmox and the Node.
  • Two consecutive local make test-ci runs, a real apply/destroy and the 180 s poll — no Proxmox endpoint here.
  • Docker legs: both images, make image idempotence, the local leg, Ctrl-C, make test-clean. No daemon.
  • The dev/ci Vault's contents: no TEST_VAULT_PASSWORD in this environment.
  • Cancellation (cancel-in-progress): needs a superseding push to observe.

Summary

Axis Findings Worst
Spec 0 BLOCKER, 1 ADVISORY the ADR, glossary and state page still say the state dies with the run, where the fixed page now qualifies it
Standards 0 BLOCKER, 0 ADVISORY —

All three round-3 advisories are cleared with evidence: the guard is driven red→green on the exact case that was charged, the page states when the state survives, and the body names the head and run 6. The one remaining advisory is a record outside the diff, well below the volume trip, and does not move the verdict. Merge.

<!-- minos review-loop: repo=olympus/infra-tracker pr=37 head=ecf5278f220ad377f165dce803017725d6d23a91 round=4/5 axes=standards,spec --> **olympus/infra-tracker #37** · head `ecf5278` · round 4/5 · axes: Standards, Spec Recommendation: merge --- ## Round 3 → round 4 The dispatch reads `round=2/5`; the timeline already carries this loop's rounds 1 (`e85c7a0`), 2 (`ff93adc`) and 3 (`fb593470`), so I numbered by the timeline: this is the fourth review. `refs/pull/37/head` resolves to `ecf5278`, equal to the head branch, so the dispatch's SHA is current. Delta reviewed: `fb59347..ecf5278`, one commit, two files (+32 / −17): `container/ci.sh`, `docs/reference/test-guest.md`. `git merge-base --is-ancestor fb59347 ecf5278` is true, so the fix stacked and that delta is exactly this round's change; nothing else moved. Round 3 carried **0 BLOCKER, 3 ADVISORY** and moved the state on the volume rule. All three are answered: | # | Round-3 finding | Disposition | Evidence | | --- | --- | --- | --- | | 1 | the body's Evidence described `ff93adc` / run 4 | **resolved** | the body now names `fb593470` / 44 commits / `ecf5278` and carries run 6 (`head ecf5278`, 15:45:22Z→15:48:11Z, all three jobs) with run 5 behind it; the Unrehearsed table keeps five rows. `git rev-list --count 20d33748..fb59347` = 44 | | 2 | an unreadable state is reported as "nothing to destroy" | **resolved** | `ci.sh:94-111`; driven red/green below, and run 6's `execute` is the green path | | 3 | "Every run starts from an empty state" | **resolved** | `test-guest.md:65` ("A run whose state is empty"), `:86-88` (the clause naming a local re-run), `:13-14` | Rounds 1 and 2 stand: both blockers stay cleared at this head. Run 6 fetches `data.forgejo.org/actions/checkout` (job 0 line 7) and `.../forgejo/upload-artifact` (job 2 line 8); its `execute` job imported `module.guest.proxmox_download_file.debian_13_base` successfully and then destroyed only the Guest — the template was still on the datastore for run 6's own import. ### The guard, driven both ways The `teardown` function was cut out of each revision by line range (not retyped) and run under `trap teardown EXIT` against a stub `tofu` that answers `state list` from the local state file's shape: | state | exit status | `fb59347` | `ecf5278` | | --- | --- | --- | --- | | Guest in state | 0 | destroyed, rc 0 | destroyed, rc 0 | | Guest in state | 1 | destroyed, rc 1 | destroyed, rc 1 | | state, no Guest | 0 | nothing to destroy, rc 0 | nothing to destroy, rc 0 | | no state file | 0 | nothing to destroy, rc 0 | nothing to destroy, rc 0 | | no state file | 1 | nothing to destroy, rc 1 | nothing to destroy, rc 1 | | **state unreadable** | **0** | **nothing to destroy, rc 0** | **error, rc 1** | | destroy fails | 0 | error, rc 1 | error, rc 1 | The unreadable-state row is round 3's case C: red on the prior revision, green on the fix. The guard only ever raises `status` (`[ "$status" -ne 0 ] || status=1`), so a failed run cannot be turned green by it. One input my stub modelled loosely was settled by the real binary: a zero-byte `terraform.tfstate` makes OpenTofu 1.12.6 answer `No state file was found`, rc 1 — while `-f` is true, so the guard takes the error branch, not "nothing to destroy". That is the right answer for a truncated state. ### The pipeline at this head Run 6 (id 14, `pull_request/synchronize`, head `ecf5278`): `static`, `edge`, `execute` all **Job succeeded**. ```text static Success! The configuration is valid. ×3 · edge.tftest.hcl 1 passed, 0 failed edge gate green — 1 change(s), and this pull request touches npm/ (43 files, 1 under npm/) execute key paired · template import · Apply 3 added, 1 changed Converge ok=29 changed=16 · Assert ok=26 changed=0 2nd and 3rd Converge ok=25 changed=0 · test guest destroyed ``` That `execute` run is the new guard on its real path: the state read into `test-evidence/state-list.log`, the Guest found, the targeted destroy, exit 0. The upload is `if: always()` (`checks.yaml:129-135`), so the log reaches the artifact on a failure too. ## Spec ### ADVISORY — the records beside the page still state the state's lifetime unconditionally `docs/adr/0004-test-state-outside-the-store-and-the-edge-gate.md:44-46` and `:69`; `GLOSSARY.md:72-73` and `:167-168`; `docs/reference/state.md:17-19`. The page this commit fixed now says the right thing — `docs/reference/test-guest.md:86-88`: "a CI job's workspace goes with the job, while a local `make test-ci` re-run keeps the file in the checkout, and the import then reports `template import: already in state`". The records it points at still carry the unconditional form: - ADR-0004: "Its state is `terraform.tfstate` in the run's workspace **and it goes when the run does**"; Consequences: "The test's record dies with the run." - GLOSSARY §Stack: "the Test Stack keeps its state in the run's workspace, **where it dies with the run**"; §the state: "the Test Stack keeps a local file **that dies with the run**". - `state.md:17-19`: "keeps its state in the run's workspace, and **the state dies with the run**". For a local `make test-ci` re-run the file stays in the checkout — which is exactly why `ci.sh:123-124` has the `template import: already in state` branch the new clause names. The page's own `## The state dies with the run` heading (`:10`) is the same residue. Nothing here is in the delta (all four lines predate `ecf5278`), so it is advice, not a block. Clearing: the same one-clause qualification where each record states the lifetime, or scope the sentence to a CI run. ## Standards Sources read: `AGENTS.md` (§Decisions, §Toolchain, §State, §Pull requests), `docs/adr/0001-0004`, `docs/agents/issue-tracker.md`, `GLOSSARY.md`, `.agents/skills/pr/SKILL.md`, and the org records in `olympus/workshop` at `main` (`docs/adr/0001-0005`, including ADR-0002's "reviewed by another / pinned to the revision / checks gate the revision that lands" and ADR-0004's store-destroy prohibition). **No violation in the delta.** - `ci.sh:94-111` keeps the file's idiom: the comment says why rather than what, the stderr line keeps the `error: ci:` prefix, evidence stays under `test-evidence/`. - The page's register holds. Measured in characters, UTF-8 aware (`${#line}`): every new line is ≤ 81, the page's own maximum; 13 lines sit at 81 and none is over. (`awk length()` reports 17 because this host's mawk counts bytes, and an em dash is three — not a wrap breach.) - ADR-0004 (org): the destroy is still `-target`ed at the Guest, so nothing whose state lives in the store destroys the store. - No secret in the delta: two files, a shell guard and prose; no key material, and the state read logs resource addresses only. ## Verified | What | How | | --- | --- | | The delta is exactly two files, one commit | `git diff --name-status fb59347..ecf5278`; `--is-ancestor` true | | Round 3's advisory 2, red/green | `teardown` extracted from both revisions, seven cases each (table above) | | Round 3's advisory 3 | `test-guest.md:65`, `:86-88`, `:13-14` read at head; `ci.sh:123-124` prints the string the clause quotes | | Round 3's advisory 1 | body re-read after its 15:49:58 edit; 44 commits at `fb59347`; run 6's head and times match the block | | `make check` at head | `mise exec -- make check` in the fetched revision, no `.env`, no credentials, no docker: `fmt -check` silent, three `Success!`, `1 passed, 0 failed`, rc 0 | | `ci.sh` parses | `bash -n container/ci.sh` rc 0 | | Run 6 is green at this head | statuses `success` ×3; job logs read directly, including `test guest destroyed` at 15:48:10 | | The template survived run 5's teardown | run 6 imported `module.guest.proxmox_download_file.debian_13_base` at 15:45:40 and applied `3 added, 1 changed`, so the file was on the datastore | | A 0-byte state is not "nothing to destroy" | real OpenTofu 1.12.6: `No state file was found`, rc 1, file present → the `elif [ ! -f ]` is false | | No secret in the delta | two files, shell + prose | | The tracker claim the body makes | TR-36…TR-44 (ids 119-127) each carry exactly one comment with a criterion table | ## Could not verify - **A failure path in CI reaching the destroy** (a deliberately failed Assert on the node). The trap structure and the seven driven teardown cases cover the logic; a live failure needs Proxmox and the Node. - **Two consecutive local `make test-ci` runs**, a real apply/destroy and the 180 s poll — no Proxmox endpoint here. - **Docker legs**: both images, `make image` idempotence, the local leg, `Ctrl-C`, `make test-clean`. No daemon. - **The dev/ci Vault's contents**: no `TEST_VAULT_PASSWORD` in this environment. - **Cancellation** (`cancel-in-progress`): needs a superseding push to observe. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 0 BLOCKER, 1 ADVISORY | the ADR, glossary and state page still say the state dies with the run, where the fixed page now qualifies it | | Standards | 0 BLOCKER, 0 ADVISORY | — | All three round-3 advisories are cleared with evidence: the guard is driven red→green on the exact case that was charged, the page states when the state survives, and the body names the head and run 6. The one remaining advisory is a record outside the diff, well below the volume trip, and does not move the verdict. Merge.
pit merged commit 0d09bf2a8b into main 2026-10-19 16:08:06 +00:00
pit deleted branch test/tr36-suite-and-ci 2026-10-19 16:08:06 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-tracker!37
No description provided.