The env contract, and this repo reading its own environment from it (WR-47) #12

Merged
pit merged 17 commits from wr39/integration into main 2026-10-28 12:37:05 +00:00
Owner

Summary

This repo authors the env contract the other four vendor, and reads its own environment through it — WR-47's share of the shared-secret epic (WR-39).

  • scripts/env.sh — the one fetch: login (userpass, AppRole, JWT), read every KV v2 path env.map maps, fill what the age class holds, write the repo-root .env whole at 0600 under a stamp line. All or nothing, one login per run, no cache. The file's second line carries the sha of its own body, so a sibling verifies its copy with no second file.
  • env.map — this repo reads no store path (its env is the PROD pair from ~/.secrets/proxmox/prod.age); the literals keep the map and .env.example the same set.
  • make env, make env-check (no store read), make env-test, and make check as the single credential-free command with env-check on the floor.
  • Makefile — check's comment names the page that fixes the floor for all
    five repos and says it lands with olympus/workshop#18, which is not on
    workshop's main yet (WR-42, landed on this branch after the PR opened;
    named here so the change map covers it).
  • age 1.3.2 and openbao 2.7.1 declared and locked.
  • bao/guest declares pool_id = "prod", ignores it after creation and guards the container with prevent_destroy: the attribute is creation-time only and never read back, so on a guest that already exists it would plan a replacement of the store's own container (review round 1, B1).
  • bao/guest/guards.tf — the check the guard cannot be: prevent_destroy
    lives on the resource, so deleting the container's declaration takes it
    along and the plan offers the destroy. The check sits outside the resource
    and references it, so a tree that stops declaring the store fails to load
    instead (review round 2, S1).
  • bao/policies/ci-tracker.hcl — the tracker's plan row for the guest state record (TR-57, landed on this branch after the PR opened; named here so the change map covers it).
  • docs/env-fetch.md — the interface, written once for all five repos; .env.example is now a declared name set, not an invitation to copy and fill.
  • docs/proxmox-credentials.md — the pool question answered where it was left open: pool_id is creation-time only, membership is read out of band, and the pools the handoff creates now exist.

Evidence

  • make check → exit 0, env fetch: every case passed. (70 ok lines: 68 from the fetch's own cases, 2 from env-check), plain, through mise exec --, and with PROXMOX_VE_API_TOKEN, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY unset.
  • make env ACTOR=pit → 2 names · 0 paths · 2 from the age class, .env at 0600, first line # fetched 2026-10-28T11:38:13Z actor=pit store=https://10.12.0.144:8200.
  • make env-check → ok scripts/env.sh matches infra-secrets@137870c6…, ok env.map: 2 names, all declared in .env.example; reds on a one-character pin change and on either direction of a map/example disagreement.
  • The stub suite covers the stamp, 0600, all-or-nothing when one of several paths 404s, byte-identical .env and no .env.tmp on failure, the unnamed-actor refusal listing found keys with zero store calls, and the regular-agent refusal.
  • make validate → Success! The configuration is valid.; tofu fmt -check -recursive -diff → rc 0.
  • The Guest Stack's guard, driven with the locked provider (tofu 1.12.6, bpg/proxmox 0.117.0) over a state written the way the provider reads guest 144, plan -refresh=false, no cluster read or written: at 8948133 the configured pool plans + pool_id = "prod" # forces replacement · Plan: 1 to add, 0 to change, 1 to destroy, where the base config plans Plan: 0 to add, 1 to change, 0 to destroy; at 902a52e the same state plans Plan: 0 to add, 1 to change, 0 to destroy.
  • The guard refuses a genuine replacement at 902a52e: a base-image bump plans Plan: 2 to add, 0 to change, 2 to destroy and then Error: Resource instance cannot be destroyed · prevent_destroy set, but the plan calls for it to be destroyed (rc 1), so make guest stops at plan time instead of destroying guest 144.
  • The guard's third route, driven at this head over the same state: deleting
    the container's declaration and the output that referenced it plans
    Plan: 0 to add, 0 to change, 1 to destroy (rc 0) at 374845f, and
    Error: Reference to undeclared resource on bao/guest/guards.tf (rc 1)
    here. The steady plan is unmoved (Plan: 0 to add, 1 to change, 0 to destroy), plan -destroy and a vm_id change still stop on
    prevent_destroy (rc 1), and a create prints no check warning because the
    condition reads the configured vm_id.

Merge Danger

  • The other four repos will pin this file by the sha of its body: 137870c6d4468fdf468e8b4cd0c31183989612b4b9c67ed861202faabe74d962. None of them carries scripts/env.sh yet — it is a 404 in infra-forge, infra-tracker, infra-silo and infra-semaphore — so nothing reds today; each cutover copies the file verbatim and starts checking the pin, and from then on a change here is a change all four take at a new pin.
  • make check now depends on the repo's toolchain for bao/age; the test runner resolves them through mise which and refuses with the instruction if they are absent.
  • Guest 144's container is now guarded against replacement. pool_id is ForceNew in bpg/proxmox 0.117.0 and containerRead never reads it back, so the state cannot converge by refresh: without prevent_destroy every make guest would plan a destroy-and-create of the container that holds the store and every other Stack's state. With it, any replacement — a base-image bump, a vm_id change — fails the plan until the guard is lifted deliberately (workshop ADR-0004), and a tree that stops declaring the container fails to load rather than planning it away.
  • Guest 144 is already a member of prod (read 2026-10-28: /pools/prod lists 141, 142, 143, 144 and 150), which is what a future create needs; the Stack's declaration sets the pool at creation, and membership after that is read out of band — pvesh get /pools/prod.
## Summary This repo authors the env contract the other four vendor, and reads its own environment through it — WR-47's share of the shared-secret epic (WR-39). - `scripts/env.sh` — the one fetch: login (userpass, AppRole, JWT), read every KV v2 path `env.map` maps, fill what the age class holds, write the repo-root `.env` whole at 0600 under a stamp line. All or nothing, one login per run, no cache. The file's second line carries the sha of its own body, so a sibling verifies its copy with no second file. - `env.map` — this repo reads no store path (its env is the PROD pair from `~/.secrets/proxmox/prod.age`); the literals keep the map and `.env.example` the same set. - `make env`, `make env-check` (no store read), `make env-test`, and `make check` as the single credential-free command with `env-check` on the floor. - `Makefile` — `check`'s comment names the page that fixes the floor for all five repos and says it lands with `olympus/workshop#18`, which is not on `workshop`'s `main` yet (WR-42, landed on this branch after the PR opened; named here so the change map covers it). - `age 1.3.2` and `openbao 2.7.1` declared and locked. - `bao/guest` declares `pool_id = "prod"`, ignores it after creation and guards the container with `prevent_destroy`: the attribute is creation-time only and never read back, so on a guest that already exists it would plan a replacement of the store's own container (review round 1, B1). - `bao/guest/guards.tf` — the check the guard cannot be: `prevent_destroy` lives on the resource, so deleting the container's declaration takes it along and the plan offers the destroy. The check sits outside the resource and references it, so a tree that stops declaring the store fails to load instead (review round 2, S1). - `bao/policies/ci-tracker.hcl` — the tracker's plan row for the guest state record (TR-57, landed on this branch after the PR opened; named here so the change map covers it). - `docs/env-fetch.md` — the interface, written once for all five repos; `.env.example` is now a declared name set, not an invitation to copy and fill. - `docs/proxmox-credentials.md` — the pool question answered where it was left open: `pool_id` is creation-time only, membership is read out of band, and the pools the handoff creates now exist. ## Evidence - `make check` → exit 0, `env fetch: every case passed.` (70 `ok` lines: 68 from the fetch's own cases, 2 from `env-check`), plain, through `mise exec --`, and with `PROXMOX_VE_API_TOKEN`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` unset. - `make env ACTOR=pit` → `2 names · 0 paths · 2 from the age class`, `.env` at 0600, first line `# fetched 2026-10-28T11:38:13Z actor=pit store=https://10.12.0.144:8200`. - `make env-check` → `ok scripts/env.sh matches infra-secrets@137870c6…`, `ok env.map: 2 names, all declared in .env.example`; reds on a one-character pin change and on either direction of a map/example disagreement. - The stub suite covers the stamp, 0600, all-or-nothing when one of several paths 404s, byte-identical `.env` and no `.env.tmp` on failure, the unnamed-actor refusal listing found keys with zero store calls, and the regular-agent refusal. - `make validate` → `Success! The configuration is valid.`; `tofu fmt -check -recursive -diff` → rc 0. - The Guest Stack's guard, driven with the locked provider (tofu 1.12.6, bpg/proxmox 0.117.0) over a state written the way the provider reads guest 144, `plan -refresh=false`, no cluster read or written: at `8948133` the configured pool plans `+ pool_id = "prod" # forces replacement` · `Plan: 1 to add, 0 to change, 1 to destroy`, where the base config plans `Plan: 0 to add, 1 to change, 0 to destroy`; at `902a52e` the same state plans `Plan: 0 to add, 1 to change, 0 to destroy`. - The guard refuses a genuine replacement at `902a52e`: a base-image bump plans `Plan: 2 to add, 0 to change, 2 to destroy` and then `Error: Resource instance cannot be destroyed` · `prevent_destroy set, but the plan calls for it to be destroyed` (rc 1), so `make guest` stops at plan time instead of destroying guest 144. - The guard's third route, driven at this head over the same state: deleting the container's declaration **and** the output that referenced it plans `Plan: 0 to add, 0 to change, 1 to destroy` (rc 0) at `374845f`, and `Error: Reference to undeclared resource` on `bao/guest/guards.tf` (rc 1) here. The steady plan is unmoved (`Plan: 0 to add, 1 to change, 0 to destroy`), `plan -destroy` and a `vm_id` change still stop on `prevent_destroy` (rc 1), and a create prints no check warning because the condition reads the configured `vm_id`. ## Merge Danger - **The other four repos will pin this file by the sha of its body**: `137870c6d4468fdf468e8b4cd0c31183989612b4b9c67ed861202faabe74d962`. None of them carries `scripts/env.sh` yet — it is a `404` in `infra-forge`, `infra-tracker`, `infra-silo` and `infra-semaphore` — so nothing reds today; each cutover copies the file verbatim and starts checking the pin, and from then on a change here is a change all four take at a new pin. - `make check` now depends on the repo's toolchain for `bao`/`age`; the test runner resolves them through `mise which` and refuses with the instruction if they are absent. - **Guest 144's container is now guarded against replacement.** `pool_id` is `ForceNew` in bpg/proxmox 0.117.0 and `containerRead` never reads it back, so the state cannot converge by refresh: without `prevent_destroy` every `make guest` would plan a destroy-and-create of the container that holds the store and every other Stack's state. With it, any replacement — a base-image bump, a `vm_id` change — fails the plan until the guard is lifted deliberately (workshop ADR-0004), and a tree that stops declaring the container fails to load rather than planning it away. - **Guest 144 is already a member of `prod`** (read 2026-10-28: `/pools/prod` lists 141, 142, 143, 144 and 150), which is what a future create needs; the Stack's declaration sets the pool at creation, and membership after that is read out of band — `pvesh get /pools/prod`.
The suite is the specification: a sandbox repo and a sandbox HOME per case, and
a stub OpenBao on 127.0.0.1 answering the four endpoints the fetch speaks, so
every assertion is about an interface the contract fixes — the printed report,
the .env, its mode, its stamp, the request log, and the exit status.

It proved the fetch absent (42 red assertions) before scripts/env.sh was
written, and it runs offline: no credential, no network, no real store.
scripts/env.sh is the origin of the copy the other four repos vendor. It logs
in as the named actor — userpass for the Operator, the AppRole endpoint for the
Admin agent, the JWT door for CI — reads every KV v2 path env.map maps, fills
the PROD pair from prod.age and writes the repo-root .env whole at 0600 under
`# fetched <ts> actor=<actor> store=<address>`.

All or nothing: one path missing, refused or unreachable and nothing is
written, no .env.tmp survives, and a run that could fill no name refuses rather
than replacing a working file with an empty one. One login per run, no cache,
no last-known-good copy, no token on disk, and no value in the transcript.

The line above carries the sha of the file body, so a vendored copy verifies
itself and `env.sh check` reds on one changed byte of the body or one character
of the sha — which is the pin the siblings record.
make env names its actor (ACTOR=, or OLYMPUS_ACTOR) and runs the one fetch;
make env-check compares the vendored copy against its pin and env.map against
.env.example, reading no store at all, so it is the one env target an agent may
run. make check is that plus the fetch's own tests, and nothing else: validate
downloads the provider on a fresh checkout, so it stays out of the floor.

.env.example stops instructing a hand-filled copy: it is the declared name set
the map is compared against, and the fetch is the .env's one writer. The
missing-.env refusal every Guest and service target composes now names make env
as the thing to run.
age was already declared; bao joins it as `openbao = "2.7.1"` — the registry
name is openbao, the binary it installs is bao — and mise lock pins both per
platform under ADR-0001's declare-and-lock rule. The client is pinned to the
store's own release, so the fetch does not run two minor versions apart from
the server it reads.
guest 144 is a member of `prod`, and the re-ACLed PROD credential is granted on
/pool/prod rather than /vms. Without the attribute the provider targets
/vms/<newid> on create, where no static ACL reaches: the container lands
outside the pool and no credential of ours can manage what it made.
docs/env-fetch.md is the page the contract names: the two doors and the CI one,
the map grammar including the literal and transitional rows, the print format
and the stamp, the five properties that are the contract (all or nothing, no
cache, one login, nothing-to-fill refuses, the constant address), the refusals,
the pin and how a repo refreshes it, and what a sibling repo does to vendor the
script. The README points at it, and store-identity.md's deferral of a seed's
home now points at the contract that fixed it.
Two words: the unnamed-actor refusal ends where every other one does, and the
age class is named as `~/.secrets/proxmox/prod.age` rather than as a path with
the home stripped off it. The pin follows the body, as it must.
bot-minos requested changes 2026-10-28 11:57:26 +00:00
Dismissed
bot-minos left a comment

olympus/infra-secrets #12 — round 1/5 · reviewed head 8948133534d1401c0a50114c610165476125bbd5

Recommendation: fix

  • Spec: WR-47 — Vikunja task 166, "infra-secrets authors the env contract and reads its own environment from the store" (project 5 workshop, identifier WR; note docs/agents/issue-tracker.md names project 8, which does not hold it). No linked issue in the PR body; the WR-47 reference in the title is the spec, and its acceptance criteria are what I measured against.
  • Standards: the org records in olympus/workshop docs/adr/ at main (0001–0007), read from the forge; this repo's AGENTS.md and docs/agents/*; the repo has no CONTRIBUTING.md or coding-standards file, so the Fowler smell baseline covered the rest.
  • Head: the dispatch named dec204b; the branch moved while I read, and I examined 8948133 — one commit on top, "ci-tracker reads the guest record's plan key too (TR-57)", adding bao/policies/ci-tracker.hcl (+7 lines). Everything below is at 8948133; the delta does not touch any file in the blocker.

Spec

B1 — BLOCKER — bao/guest/container.tf:28, bao/guest/variables.tf:30

Adding pool_id = "prod" to the existing container makes the next make guest destroy and recreate guest 144 — the container that runs the store.

pool_id on proxmox_virtual_environment_container is ForceNew: true in the provider this repo locks (bpg/proxmox v0.117.0, proxmoxtf/resource/container/container.go:1034-1040), and nothing in container.tf suppresses or guards the diff. Today guest 144 is in no pool — docs/proxmox-credentials.md:81 says "none of the six does yet" and :103 that no pool exists — so its state carries pool_id = "", and the change plans a replacement.

I drove it with the locked provider (tofu 1.12.6, provider 0.117.0, a state written the way the provider reads guest 144, plan -refresh=false, no cluster touched). The control and the treatment differ in exactly this attribute:

config plan
pool_id = "" (base) Plan: 0 to add, 1 to change, 0 to destroy.
pool_id = "prod" (this PR) # proxmox_virtual_environment_container.openbao must be replaced · + pool_id = "prod" # forces replacement · + purge_on_destroy = true · Plan: 1 to add, 0 to change, 1 to destroy.

That is the store: the Guest Stack's own container, whose disk holds the OpenBao data, and inside which every other Stack's state lives (workshop docs/adr/0003, 0004). It breaks the org standard this change is measured against — ADR-0004: "Nothing whose state lives in the store may be able to destroy the store. A run that would remove the store … fails at plan time before anything is touched" — and the repo's own record of the question is docs/proxmox-credentials.md:131-134: "Whether pool_id can be written on an existing guest, or only at creation … the update path was not exercised, and it decides whether the five PROD guests can be moved by an apply or have to join the pool by hand once." The answer is: not by an apply. The PR body and the ticket say nothing about it; the body's Merge Danger section lists only the vendored pin and the toolchain.

Clearing: make the move deliberate rather than incidental, and say so. The smallest change that ends it is a lifecycle { prevent_destroy = true } on proxmox_virtual_environment_container.openbao (ADR-0004's guard), so the replacement is refused at plan time and the pool move happens by hand first; the cheaper alternative is to state in the body and at docs/proxmox-credentials.md:131 that guest 144 must join prod manually before this config lands, and that tofu plan must read 0 to destroy before make guest. Either way the doc line 81 ("none of the six does yet") and the Open question at line 131 need their answer recorded.

A1 — ADVISORY — bao/policies/ci-tracker.hcl:22-27 (commit 8948133)

Scope: the branch gained a TR-57 policy row after this PR was dispatched. The rule itself is coherent — the path matches docs/store-layout.md:79 (secret/tofu-state/tracker-guest/{apply,plan}), and the ADR-0009 citation resolves (infra-silo docs/adr/0009-a-plan-reads-a-record-it-cannot-rewrite.md, the same shorthand docs/store-layout.md:68 uses). What is missing is a line in the PR body's change map: a reader arriving at a WR-47 PR has no way to know a tracker policy moved with it. Either name it in the body or take it to its own PR.

A2 — ADVISORY — the body's arithmetic

The body says make check passed "(42 assertions)". At 8948133 the suite prints 68 ok lines and env-check adds 2 — 70 in total, from env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check | grep -c '^ ok '. The number is stale against the branch it describes; the run itself is green.

A3 — ADVISORY — the body's four-repo claim, and WR-47's AC5

The body's Merge Danger reads "The other four repos pin this file by the sha of its body: 137870c6…. A change here is a change all four take at a new pin — make env-check reds in each until they do." At main none of them carries the file: scripts/env.sh answers 404 in olympus/infra-forge, infra-tracker, infra-silo and infra-semaphore, and infra-tracker's root has no scripts/ directory at all. So there is no pin to red today. This is the same tension as WR-47's AC5 ("git grep -n '# vendored from' in the four sibling repos names this repo at one sha") against the ticket's own Out of scope ("the other four repos' cutovers"): either the sentence describes the cutover and should say so in the future tense, or AC5 belongs to the cutover tickets.

Standards

A4 — ADVISORY — docs/env-fetch.md:184-185

"The pins the four record are the sha in the line and the blob this ticket records: git hash-object scripts/env.sh." That command does not produce the pin. On this head git hash-object scripts/env.sh is aaad049c9b77… — the 40-hex SHA-1 of the blob — while the pin is 137870c6d446…, the 64-hex SHA-256 of the file with the pin line blanked (scripts/env.sh:71-72), and pin_recorded only accepts [0-9a-f]{64} (scripts/env.sh:71). A sibling following the sentence pastes a value the check can never accept; the page's own §"the pin" (lines 155-160) states the right recipe one paragraph earlier. Drop the sentence or point it at env-check's FAIL line, which prints the hash to paste.

A5 — ADVISORY — docs/env-fetch.md:99-100 against scripts/env.sh:336

The page says "a root an actor holds no key for is not an error". The script refuses the whole run in exactly that case: [ -s "$AGE_KEYS/$ACTOR.key" ] || refuse "the age class at $PROD_AGE is on this machine and the $CLASS $ACTOR has no key at …; nothing written." The not held: report is the other case — the age file is not on the machine at all (scripts/env.sh:353-359). One sentence, and an operator reading the page would expect a partial .env where the fetch in fact writes nothing.

Verified (by hand, at 8948133)

WR-47 criterion Result
AC1 make env prints the report and writes .env 0600 under the stamp met — driven through the Makefile with a synthetic HOME (a fresh pit age key, the PROD pair sealed to it): 2 names · 0 paths · 2 from the age class, .env at 600, first line # fetched 2026-10-28T11:55:35Z actor=pit store=https://10.12.0.144:8200, no .env.tmp; with no ACTOR it refused, listed pit, and wrote nothing
AC2 store unreachable writes nothing, .env byte-identical, no .env.tmp met — the suite's case_store_unreachable on a two-path map against a dead port; this repo's own map reads no store path, so the case cannot arise here
AC3 env-check passes with no store; reds on a one-character pin or a missing map key met — green here and in case_check_passes; reds on the pin flip and on both directions of the map/example comparison
AC4 env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check met — rc 0, env fetch: every case passed., plain (not through mise exec)
AC5 the four siblings name this repo at one sha not met — see A3; the ticket's Out-of-scope clause covers the cutovers
AC6 git grep -n pool_id names bao/guest with prod met as a grep, wrong as an apply — see B1
AC7 no live vault-pass / ANSIBLE_VAULT_PASSWORD / .vault.yml reference met — grep -rn over Makefile and bao/ is empty; the hits are docs/ and research/ prose
AC8 make -n check runs nothing that reads a credential met — it prints only ./scripts/env.sh check and ./scripts/tests/run.sh

Also confirmed: the pin is self-consistent (sha256sum of the body with the pin line blanked is 137870c6d446…); age 1.3.2 and openbao 2.7.1 are declared in mise.toml and pinned in mise.lock; .env stays gitignored; the diff carries no secret — the AWS-looking fixture values in scripts/tests/run.sh:182-183 are the public AWS documentation dummies AKIAIOSFODNN7EXAMPLE / wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY, verified by comparison, not by eye. The change has no prior review or comment.

Not verified

  • A real make env against the live store from a machine holding the Operator's seeds — this host holds none; the equivalent was driven against the stub suite and a synthetic HOME.
  • The plan pair against the real cluster — no Proxmox API from here; the replacement was reproduced with the locked provider and a state file, which is the same diff the cluster's state produces (state pool_id = "", config "prod"), but the cluster itself was not planned.
  • The four siblings' cutover pins (A3) — there is nothing on their main to check yet.

Summary

  • Spec: 4 findings — 1 BLOCKER (B1: pool_id replaces the store's container), 3 advisories.
  • Standards: 2 findings — both advisories (A4, A5), the worst being a vendoring instruction that cannot produce the pin.

Worst finding, per axis: Spec — B1, a routine make guest plans -/+ on guest 144; Standards — A4, the page's pin recipe names the wrong command.

<!-- minos review-loop: repo=olympus/infra-secrets pr=12 head=8948133534d1401c0a50114c610165476125bbd5 round=1/5 axes=standards,spec --> **olympus/infra-secrets #12** — round 1/5 · reviewed head `8948133534d1401c0a50114c610165476125bbd5` Recommendation: fix - **Spec**: WR-47 — Vikunja task 166, "infra-secrets authors the env contract and reads its own environment from the store" (project 5 `workshop`, identifier `WR`; note `docs/agents/issue-tracker.md` names project 8, which does **not** hold it). No linked issue in the PR body; the WR-47 reference in the title is the spec, and its acceptance criteria are what I measured against. - **Standards**: the org records in `olympus/workshop` `docs/adr/` at `main` (0001–0007), read from the forge; this repo's `AGENTS.md` and `docs/agents/*`; the repo has no `CONTRIBUTING.md` or coding-standards file, so the Fowler smell baseline covered the rest. - **Head**: the dispatch named `dec204b`; the branch moved while I read, and I examined `8948133` — one commit on top, *"ci-tracker reads the guest record's plan key too (TR-57)"*, adding `bao/policies/ci-tracker.hcl` (+7 lines). Everything below is at `8948133`; the delta does not touch any file in the blocker. ## Spec ### B1 — BLOCKER — `bao/guest/container.tf:28`, `bao/guest/variables.tf:30` **Adding `pool_id = "prod"` to the existing container makes the next `make guest` destroy and recreate guest 144 — the container that runs the store.** `pool_id` on `proxmox_virtual_environment_container` is `ForceNew: true` in the provider this repo locks (`bpg/proxmox` v0.117.0, `proxmoxtf/resource/container/container.go:1034-1040`), and nothing in `container.tf` suppresses or guards the diff. Today guest 144 is in no pool — `docs/proxmox-credentials.md:81` says "none of the six does yet" and `:103` that no pool exists — so its state carries `pool_id = ""`, and the change plans a replacement. I drove it with the locked provider (tofu 1.12.6, provider 0.117.0, a state written the way the provider reads guest 144, `plan -refresh=false`, no cluster touched). The control and the treatment differ in exactly this attribute: | config | plan | | --- | --- | | `pool_id = ""` (base) | `Plan: 0 to add, 1 to change, 0 to destroy.` | | `pool_id = "prod"` (this PR) | `# proxmox_virtual_environment_container.openbao must be replaced` · `+ pool_id = "prod" # forces replacement` · `+ purge_on_destroy = true` · `Plan: 1 to add, 0 to change, 1 to destroy.` | That is the store: the Guest Stack's own container, whose disk holds the OpenBao data, and inside which every other Stack's state lives (workshop `docs/adr/0003`, `0004`). It breaks the org standard this change is measured against — ADR-0004: *"Nothing whose state lives in the store may be able to destroy the store. A run that would remove the store … fails at plan time before anything is touched"* — and the repo's own record of the question is `docs/proxmox-credentials.md:131-134`: *"Whether `pool_id` can be written on an **existing** guest, or only at creation … the update path was not exercised, and it decides whether the five PROD guests can be moved by an apply or have to join the pool by hand once."* The answer is: not by an apply. The PR body and the ticket say nothing about it; the body's *Merge Danger* section lists only the vendored pin and the toolchain. **Clearing:** make the move deliberate rather than incidental, and say so. The smallest change that ends it is a `lifecycle { prevent_destroy = true }` on `proxmox_virtual_environment_container.openbao` (ADR-0004's guard), so the replacement is refused at plan time and the pool move happens by hand first; the cheaper alternative is to state in the body and at `docs/proxmox-credentials.md:131` that guest 144 must join `prod` manually before this config lands, and that `tofu plan` must read `0 to destroy` before `make guest`. Either way the doc line 81 ("none of the six does yet") and the *Open* question at line 131 need their answer recorded. ### A1 — ADVISORY — `bao/policies/ci-tracker.hcl:22-27` (commit `8948133`) Scope: the branch gained a TR-57 policy row after this PR was dispatched. The rule itself is coherent — the path matches `docs/store-layout.md:79` (`secret/tofu-state/tracker-guest/{apply,plan}`), and the ADR-0009 citation resolves (infra-silo `docs/adr/0009-a-plan-reads-a-record-it-cannot-rewrite.md`, the same shorthand `docs/store-layout.md:68` uses). What is missing is a line in the PR body's change map: a reader arriving at a WR-47 PR has no way to know a tracker policy moved with it. Either name it in the body or take it to its own PR. ### A2 — ADVISORY — the body's arithmetic The body says `make check` passed "(42 assertions)". At `8948133` the suite prints **68** `ok` lines and `env-check` adds 2 — 70 in total, from `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check | grep -c '^ ok '`. The number is stale against the branch it describes; the run itself is green. ### A3 — ADVISORY — the body's four-repo claim, and WR-47's AC5 The body's *Merge Danger* reads *"The other four repos pin this file by the sha of its body: `137870c6…`. A change here is a change all four take at a new pin — `make env-check` reds in each until they do."* At `main` none of them carries the file: `scripts/env.sh` answers 404 in `olympus/infra-forge`, `infra-tracker`, `infra-silo` and `infra-semaphore`, and `infra-tracker`'s root has no `scripts/` directory at all. So there is no pin to red today. This is the same tension as WR-47's AC5 (*"`git grep -n '# vendored from'` in the four sibling repos names this repo at one sha"*) against the ticket's own **Out of scope** (*"the other four repos' cutovers"*): either the sentence describes the cutover and should say so in the future tense, or AC5 belongs to the cutover tickets. ## Standards ### A4 — ADVISORY — `docs/env-fetch.md:184-185` *"The pins the four record are the sha in the line and the blob this ticket records: `git hash-object scripts/env.sh`."* That command does not produce the pin. On this head `git hash-object scripts/env.sh` is `aaad049c9b77…` — the 40-hex SHA-1 of the blob — while the pin is `137870c6d446…`, the 64-hex SHA-256 of the file with the pin line blanked (`scripts/env.sh:71-72`), and `pin_recorded` only accepts `[0-9a-f]{64}` (`scripts/env.sh:71`). A sibling following the sentence pastes a value the check can never accept; the page's own §"the pin" (lines 155-160) states the right recipe one paragraph earlier. Drop the sentence or point it at `env-check`'s FAIL line, which prints the hash to paste. ### A5 — ADVISORY — `docs/env-fetch.md:99-100` against `scripts/env.sh:336` The page says *"a root an actor holds no key for is not an error"*. The script refuses the whole run in exactly that case: `[ -s "$AGE_KEYS/$ACTOR.key" ] || refuse "the age class at $PROD_AGE is on this machine and the $CLASS $ACTOR has no key at …; nothing written."` The `not held:` report is the *other* case — the age file is not on the machine at all (`scripts/env.sh:353-359`). One sentence, and an operator reading the page would expect a partial `.env` where the fetch in fact writes nothing. ## Verified (by hand, at `8948133`) | WR-47 criterion | Result | | --- | --- | | AC1 `make env` prints the report and writes `.env` 0600 under the stamp | **met** — driven through the Makefile with a synthetic `HOME` (a fresh `pit` age key, the PROD pair sealed to it): `2 names · 0 paths · 2 from the age class`, `.env` at `600`, first line `# fetched 2026-10-28T11:55:35Z actor=pit store=https://10.12.0.144:8200`, no `.env.tmp`; with no `ACTOR` it refused, listed `pit`, and wrote nothing | | AC2 store unreachable writes nothing, `.env` byte-identical, no `.env.tmp` | **met** — the suite's `case_store_unreachable` on a two-path map against a dead port; this repo's own map reads no store path, so the case cannot arise here | | AC3 `env-check` passes with no store; reds on a one-character pin or a missing map key | **met** — green here and in `case_check_passes`; reds on the pin flip and on both directions of the map/example comparison | | AC4 `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check` | **met** — rc 0, `env fetch: every case passed.`, plain (not through `mise exec`) | | AC5 the four siblings name this repo at one sha | **not met** — see A3; the ticket's Out-of-scope clause covers the cutovers | | AC6 `git grep -n pool_id` names `bao/guest` with `prod` | **met as a grep**, wrong as an apply — see B1 | | AC7 no live `vault-pass` / `ANSIBLE_VAULT_PASSWORD` / `.vault.yml` reference | **met** — `grep -rn` over `Makefile` and `bao/` is empty; the hits are `docs/` and `research/` prose | | AC8 `make -n check` runs nothing that reads a credential | **met** — it prints only `./scripts/env.sh check` and `./scripts/tests/run.sh` | Also confirmed: the pin is self-consistent (`sha256sum` of the body with the pin line blanked is `137870c6d446…`); `age 1.3.2` and `openbao 2.7.1` are declared in `mise.toml` and pinned in `mise.lock`; `.env` stays gitignored; the diff carries no secret — the AWS-looking fixture values in `scripts/tests/run.sh:182-183` are the public AWS documentation dummies `AKIAIOSFODNN7EXAMPLE` / `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`, verified by comparison, not by eye. The change has no prior review or comment. ## Not verified - A real `make env` against the live store from a machine holding the Operator's seeds — this host holds none; the equivalent was driven against the stub suite and a synthetic `HOME`. - The plan pair against the real cluster — no Proxmox API from here; the replacement was reproduced with the locked provider and a state file, which is the same diff the cluster's state produces (state `pool_id = ""`, config `"prod"`), but the cluster itself was not planned. - The four siblings' cutover pins (A3) — there is nothing on their `main` to check yet. ## Summary - **Spec:** 4 findings — **1 BLOCKER (B1: `pool_id` replaces the store's container)**, 3 advisories. - **Standards:** 2 findings — both advisories (A4, A5), the worst being a vendoring instruction that cannot produce the pin. Worst finding, per axis: Spec — B1, a routine `make guest` plans `-/+` on guest 144; Standards — A4, the page's pin recipe names the wrong command.
Member

olympus/infra-secrets #12 — round 1/5 answered at 902a52e: two new commits on 8948133, on the PR's own branch wr39/integration. No force-push, nothing rewritten.

finding grade resolved by what changed
B1 — pool_id = "prod" replaces guest 144 BLOCKER d028e24 lifecycle { prevent_destroy = true } on the container, and pool_id added to ignore_changes; docs/proxmox-credentials.md records the answer to the question it left open (line 81 and the Open bullet)
A1 — the branch gained a policy row the body does not name advisory PR body bao/policies/ci-tracker.hcl (TR-57) named in ## Summary
A2 — the body's assertion count advisory PR body 42 → 70 ok lines (68 fetch cases + 2 env-check), measured at 902a52e
A3 — the four-repo pin claim advisory PR body future tense, and the measurement behind it: scripts/env.sh is a 404 on all four main branches today
A4 — the page's pin recipe advisory 902a52e replaced; git hash-object is the 40-hex SHA-1 of the blob, the pin is the 64-hex SHA-256 of the blanked body
A5 — "a root an actor holds no key for is not an error" advisory 902a52e the not held: report and the two refusals around it are now stated apart, both driven

The advisories were not dispatched — the label moved on the blocker — but each was a false statement in a document this PR itself authored, and each was verifiable here in a minute, so they are corrected rather than carried. The A1/A2/A3 halves are metadata edits (no commit); A4/A5 are the second commit.

Where I departed from B1's own clearing change

The finding offers two: the guard, or the cheaper one — "state that guest 144 must join prod manually before this lands, and that tofu plan must read 0 to destroy before make guest". The second is not achievable, and I measured why:

  • Guest 144 is already a member of prod — pvesh get /pools/prod on burns lists 141 forgejo, 142 vikunja, 143 semaphore, 144 openbao, 150 silo (read-only, 2026-10-28). The hand move has happened.
  • The provider never reads the field back. In bpg/proxmox 0.117.0 mkPoolID appears only in the schema (proxmoxtf/resource/container/container.go:1034, ForceNew: true at :1038), in the clone body (:1374) and in the create body (:2282); containerRead (:2671) never sets it. So the hand move cannot make the plan read 0 to destroy: a guest created before its Stack declared the field keeps pool_id = "" in state, no refresh replaces it, and every subsequent plan re-plans the replacement.
  • Which makes the guard alone safe but permanent: with prevent_destroy and nothing else, the pool diff plans the destroy the guard refuses on every run, so make guest and make guest-plan can never apply anything again. Driven, not argued: the same state with the guard alone answers rc 1, Error: Resource instance cannot be destroyed · prevent_destroy set, but the plan calls for it to be destroyed.

So the commit takes both halves: the guard, plus ignore_changes = [pool_id], so the declaration applies where the provider does apply it — at creation — and the Stack converges instead of failing forever. The trade is stated where a reader meets it: membership after creation is not tofu's, and it is read out of band with pvesh get /pools/prod. That is the same shape container.tf already used for initialization[0].user_account and that proxmox_download_file uses for url/checksum.

The alternative I did not take, and why: the provider has proxmox_pool_membership (0.117.0, importable as <pool>/vm/<vmid>) which manages a membership after creation, and it is the honest route if the boundary is to be tofu-managed. It is not used here because 144 is already a member, so adopting it begins with an import — an Operator call, not this ticket's. It is named on the page and in the body.

Commands run, and what they printed

At 902a52e, in the profile's worktree, through the repo's own manager:

$ env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check
env-check: the vendored copy against its pin, and the map against .env.example.
  ok    scripts/env.sh matches infra-secrets@137870c6d446…d962
  ok    env.map: 2 names, all declared in .env.example
…
env fetch: every case passed.
rc 0        (70 `ok` lines: 68 cases + 2 env-check)

$ mise exec -- make validate
Success! The configuration is valid.
rc 0

$ mise exec -- tofu fmt -check -recursive -diff
(no output) rc 0

The plan pair, in a scratch tree built from git archive <sha> with the locked provider (tofu 1.12.6, bpg/proxmox 0.117.0) and a state written the way the provider reads guest 144 — tofu plan -refresh=false, no cluster read or written:

control, pool_id empty in config and state    Plan: 0 to add, 1 to change, 0 to destroy.
8948133, pool_id = "prod" in config          -/+ … + pool_id = "prod" # forces replacement
                                             Plan: 1 to add, 0 to change, 1 to destroy.
902a52e, the same state                      Plan: 0 to add, 1 to change, 0 to destroy.
902a52e, base image bumped (a real replace)  Plan: 2 to add, 0 to change, 2 to destroy.
                                             Error: Resource instance cannot be destroyed
                                             prevent_destroy set, but the plan calls for it to be destroyed   rc 1

The two cases A5 turns on, driven against the unchanged script with a synthetic HOME:

no age class on the machine   not held: the age class (~/.secrets/proxmox/prod.age is not on this machine)
                              not held: PROXMOX_VE_ENDPOINT (no root on this machine fills it)
                              not held: PROXMOX_VE_API_TOKEN (no root on this machine fills it)
                              refused: nothing could be filled for the Operator pit … nothing written.   rc 1
age class present, no key     refused: the age class at …/prod.age is on this machine and the Operator pit
                              has no key at …/age/pit.key to open it; nothing written.                  rc 1

Read back from the forge at 902a52e (GET /api/v1/repos/olympus/infra-secrets/raw/<path>?ref=902a52e), not from my clone: prevent_destroy = true and ignore_changes = [initialization[0].user_account, pool_id] in bao/guest/container.tf; none of the six does yet and the old Open bullet absent from docs/proxmox-credentials.md; the blob this ticket records absent from docs/env-fetch.md. 10/10 assertions pass.

Not verified

  • make env against the live store from a machine holding the Operator's seeds — this host holds none; unchanged from the previous round, and this round touches nothing on that path.
  • A tofu plan against the cluster: no Proxmox API credential here. The pair above is the locked provider over a written state; the live reads (pvesh get /pools, /pools/prod) were taken over ssh to burns and are read-only.
  • The ACL/token half of docs/proxmox-credentials.md was not re-read. The page now says which read each half comes from rather than presenting the 2026-10-27 census as today's.

Self-review

command -v claude codex agent finds nothing on this host, so the two passes of code-review were run by me in sequence, not by parallel sub-agents. Standards: AGENTS.md, the olympus/workshop ADRs (0004 is the one this change answers to), tofu fmt clean, and the repo's prose/comment conventions (no CONTRIBUTING.md exists). Spec: WR-47 AC1–AC8 — AC6 still holds, git grep -n pool_id names bao/guest with prod; the guard and the ignore are additions the review asked for, not scope WR-47 asked for.

<!-- fix-meta repo=olympus/infra-secrets pr=12 head=902a52ee590100ddf8fc4fe137e2db61ef9ac315 round=1/5 disposition=fixed --> **olympus/infra-secrets #12** — round 1/5 answered at `902a52e`: two new commits on `8948133`, on the PR's own branch `wr39/integration`. No force-push, nothing rewritten. | finding | grade | resolved by | what changed | | --- | --- | --- | --- | | B1 — `pool_id = "prod"` replaces guest 144 | BLOCKER | `d028e24` | `lifecycle { prevent_destroy = true }` on the container, and `pool_id` added to `ignore_changes`; `docs/proxmox-credentials.md` records the answer to the question it left open (line 81 and the *Open* bullet) | | A1 — the branch gained a policy row the body does not name | advisory | PR body | `bao/policies/ci-tracker.hcl` (TR-57) named in `## Summary` | | A2 — the body's assertion count | advisory | PR body | `42` → **70** `ok` lines (68 fetch cases + 2 `env-check`), measured at `902a52e` | | A3 — the four-repo pin claim | advisory | PR body | future tense, and the measurement behind it: `scripts/env.sh` is a `404` on all four `main` branches today | | A4 — the page's pin recipe | advisory | `902a52e` | replaced; `git hash-object` is the 40-hex SHA-1 of the blob, the pin is the 64-hex SHA-256 of the blanked body | | A5 — "a root an actor holds no key for is not an error" | advisory | `902a52e` | the `not held:` report and the two refusals around it are now stated apart, both driven | The advisories were not dispatched — the label moved on the blocker — but each was a false statement in a document this PR itself authored, and each was verifiable here in a minute, so they are corrected rather than carried. The A1/A2/A3 halves are metadata edits (no commit); A4/A5 are the second commit. ## Where I departed from B1's own clearing change The finding offers two: the guard, **or** the cheaper one — "state that guest 144 must join `prod` manually before this lands, and that `tofu plan` must read `0 to destroy` before `make guest`". The second is not achievable, and I measured why: - Guest 144 is **already a member** of `prod` — `pvesh get /pools/prod` on `burns` lists 141 forgejo, 142 vikunja, 143 semaphore, 144 openbao, 150 silo (read-only, 2026-10-28). The hand move has happened. - The provider never reads the field back. In bpg/proxmox 0.117.0 `mkPoolID` appears only in the schema (`proxmoxtf/resource/container/container.go:1034`, `ForceNew: true` at `:1038`), in the clone body (`:1374`) and in the create body (`:2282`); `containerRead` (`:2671`) never sets it. So the hand move cannot make the plan read `0 to destroy`: a guest created before its Stack declared the field keeps `pool_id = ""` in state, no refresh replaces it, and every subsequent plan re-plans the replacement. - Which makes the guard alone **safe but permanent**: with `prevent_destroy` and nothing else, the pool diff plans the destroy the guard refuses on *every* run, so `make guest` and `make guest-plan` can never apply anything again. Driven, not argued: the same state with the guard alone answers rc 1, `Error: Resource instance cannot be destroyed` · `prevent_destroy set, but the plan calls for it to be destroyed`. So the commit takes both halves: the guard, plus `ignore_changes = [pool_id]`, so the declaration applies where the provider does apply it — at creation — and the Stack converges instead of failing forever. The trade is stated where a reader meets it: membership after creation is not tofu's, and it is read out of band with `pvesh get /pools/prod`. That is the same shape `container.tf` already used for `initialization[0].user_account` and that `proxmox_download_file` uses for `url`/`checksum`. The alternative I did **not** take, and why: the provider has `proxmox_pool_membership` (0.117.0, importable as `<pool>/vm/<vmid>`) which manages a membership after creation, and it is the honest route if the boundary is to be tofu-managed. It is not used here because 144 is already a member, so adopting it begins with an import — an Operator call, not this ticket's. It is named on the page and in the body. ## Commands run, and what they printed At `902a52e`, in the profile's worktree, through the repo's own manager: ``` $ env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check env-check: the vendored copy against its pin, and the map against .env.example. ok scripts/env.sh matches infra-secrets@137870c6d446…d962 ok env.map: 2 names, all declared in .env.example … env fetch: every case passed. rc 0 (70 `ok` lines: 68 cases + 2 env-check) $ mise exec -- make validate Success! The configuration is valid. rc 0 $ mise exec -- tofu fmt -check -recursive -diff (no output) rc 0 ``` The plan pair, in a scratch tree built from `git archive <sha>` with the locked provider (tofu 1.12.6, bpg/proxmox 0.117.0) and a state written the way the provider reads guest 144 — `tofu plan -refresh=false`, no cluster read or written: ``` control, pool_id empty in config and state Plan: 0 to add, 1 to change, 0 to destroy. 8948133, pool_id = "prod" in config -/+ … + pool_id = "prod" # forces replacement Plan: 1 to add, 0 to change, 1 to destroy. 902a52e, the same state Plan: 0 to add, 1 to change, 0 to destroy. 902a52e, base image bumped (a real replace) Plan: 2 to add, 0 to change, 2 to destroy. Error: Resource instance cannot be destroyed prevent_destroy set, but the plan calls for it to be destroyed rc 1 ``` The two cases A5 turns on, driven against the unchanged script with a synthetic `HOME`: ``` no age class on the machine not held: the age class (~/.secrets/proxmox/prod.age is not on this machine) not held: PROXMOX_VE_ENDPOINT (no root on this machine fills it) not held: PROXMOX_VE_API_TOKEN (no root on this machine fills it) refused: nothing could be filled for the Operator pit … nothing written. rc 1 age class present, no key refused: the age class at …/prod.age is on this machine and the Operator pit has no key at …/age/pit.key to open it; nothing written. rc 1 ``` Read back from the forge at `902a52e` (`GET /api/v1/repos/olympus/infra-secrets/raw/<path>?ref=902a52e`), not from my clone: `prevent_destroy = true` and `ignore_changes = [initialization[0].user_account, pool_id]` in `bao/guest/container.tf`; `none of the six does yet` and the old `Open` bullet absent from `docs/proxmox-credentials.md`; `the blob this ticket records` absent from `docs/env-fetch.md`. 10/10 assertions pass. ## Not verified - `make env` against the live store from a machine holding the Operator's seeds — this host holds none; unchanged from the previous round, and this round touches nothing on that path. - A `tofu plan` against the cluster: no Proxmox API credential here. The pair above is the locked provider over a written state; the live reads (`pvesh get /pools`, `/pools/prod`) were taken over ssh to `burns` and are read-only. - The ACL/token half of `docs/proxmox-credentials.md` was not re-read. The page now says which read each half comes from rather than presenting the 2026-10-27 census as today's. ## Self-review `command -v claude codex agent` finds nothing on this host, so the two passes of `code-review` were run by me in sequence, not by parallel sub-agents. Standards: `AGENTS.md`, the `olympus/workshop` ADRs (0004 is the one this change answers to), `tofu fmt` clean, and the repo's prose/comment conventions (no `CONTRIBUTING.md` exists). Spec: WR-47 AC1–AC8 — AC6 still holds, `git grep -n pool_id` names `bao/guest` with `prod`; the guard and the ignore are additions the review asked for, not scope WR-47 asked for.
This repo authored the fetch the floor is made of (docs/env-fetch.md); the set
of targets an agent may run is workshop's docs/agents/make-targets.md, and this
target is the name it points at here. A comment only: make check still passes
with no Proxmox credential, no state key and no store.
bot-minos requested changes 2026-10-28 12:17:10 +00:00
Dismissed
bot-minos left a comment

olympus/infra-secrets #12 — round 2/5 · reviewed head 374845f34ddb0cc62a4cbbc94f9ee412a4ef05df

Recommendation: fix

The branch moved while this report was being written: it was read at 902a52e, the review posted on that head was dismissed by the platform when two commits landed seven seconds later, and it has been removed. This is the review of what is there now — 374845f, the merge of 589b93d ("check names the page that fixes the floor for all five repos (WR-42)"), whose own delta against 902a52e is one file: Makefile, +5 comment lines. Nothing in round 1's findings moved with it.

  • Spec: WR-47 — Vikunja task 166, "infra-secrets authors the env contract and reads its own environment from the store" (project 5 workshop, identifier WR; re-read, unchanged, no comments). No linked issue in the PR body; the title's WR-47 reference is the spec. Round 2's contract is round 1's findings plus the ticket's ACs.
  • Standards: the org records in olympus/workshop docs/adr/ at main, read from the forge (0001–0007; ADR-0004 blob 5c8312cc…, the one this change answers to); this repo's AGENTS.md and docs/agents/*; no CONTRIBUTING.md or coding-standards file exists, so the Fowler smell baseline covered the rest.
  • Round: the prior review is pinned to 8948133. The branch has since taken d028e24, 902a52e, then 589b93d + merge 374845f; git merge-base --is-ancestor 902a52e 374845f is true and git diff 902a52e 374845f is the Makefile comment alone, so the round's whole delta is five files.

Round 1 findings — verified resolved

finding resolved by evidence
B1 pool_id = "prod" replaces guest 144 d028e24 — container.tf:74 ignore_changes = [initialization[0].user_account, pool_id], container.tf:81 prevent_destroy = true Driven twice. A replica of the resource with a state written as the provider reads guest 144 (pool_id = ""), plan -refresh=false: control 0 to add, 1 to change, 0 to destroy; pre-fix config 1 to add, 0 to change, 1 to destroy with + pool_id = "prod" # forces replacement; head config 0 to add, 1 to change, 0 to destroy. Then the real bao/guest at 902a52e against the same state: Plan: 0 to add, 2 to change, 0 to destroy — the container is not replaced, and the two in-place changes are the null-defaults the base config plans too (0 to add, 2 to change, 0 to destroy at c14ce96).
A1 the branch gained a policy row the body did not name PR body ## Summary now carries "bao/policies/ci-tracker.hcl — the tracker's plan row for the guest state record (TR-57, landed on this branch after the PR opened; named here so the change map covers it)".
A2 the body's assertion count PR body Counted at this head: env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check → rc 0, 70 ^ ok lines, of which 2 are env-check's and 68 the fetch's cases. The body says 70 (68 + 2).
A3 the four-repo pin claim PR body GET /repos/olympus/<r>/raw/scripts/env.sh?ref=main answers 404 for infra-forge, infra-tracker, infra-silo and infra-semaphore; the body now reads in the future tense and says so. WR-47's AC5 stays unmet, and the ticket's own Out of scope ("the other four repos' cutovers") puts it there.
A4 the page's pin recipe named the wrong command 902a52e — docs/env-fetch.md:188-191 The new sentence is accurate: git hash-object scripts/env.sh → aaad049c9b77… (40 hex), the pin is 137870c6d446… (64 hex) = sha256 of the file with the pin line blanked, and env-check's FAIL prints "the body hashes to %s" with exactly that value (scripts/env.sh:124).
A5 "a root an actor holds no key for is not an error" 902a52e — docs/env-fetch.md:98-104 Both halves driven with a synthetic HOME: age class absent → not held: … ×3 then refused: nothing could be filled … nothing written. rc 1, an existing .env byte-identical (sha256 equal before and after), no .env.tmp; age class present, no actor key → refused: the age class at … is on this machine and the Operator pit has no key at … to open it; nothing written. rc 1. The claim the fix adds — a partial fill is written — also holds: a class holding only PROXMOX_VE_ENDPOINT writes 1 names · 0 paths · 1 from the age class, .env at 0600 with the stamp line and no line for the other name.

Spec

No findings. The delta serves round 1's asks and nothing else: the two .tf files are B1, docs/env-fetch.md is A4/A5, docs/proxmox-credentials.md is B1's page. WR-47's ACs are unchanged, and the one that remains unmet (AC5) is out of the ticket's scope. The body's numbers were re-measured at this head: make check 70 ok, and the guard pair exactly as the body tabulates it.

Standards

S1 — ADVISORY — bao/guest/container.tf:76-78

The new comment says "so a teardown or a replacement is refused at plan time, naming this block, before anything is touched (workshop ADR-0004)". The replacement half and the tofu-initiated teardowns are refused — driven:

plan -destroy                             Plan: 0 to add, 0 to change, 1 to destroy.  → Error: Resource instance cannot be destroyed · prevent_destroy set, but the plan calls for it to be destroyed.  rc 1
plan -target=…container.openbao -destroy  same refusal, rc 1
plan -replace=…container.openbao          same refusal, rc 1
base image bumped (a real replacement)    Plan: 2 to add, 0 to change, 2 to destroy. → same refusal, rc 1

The teardown half is not: deleting the resource block from the configuration takes the lifecycle block with it, so no guard is left to read and the plan proposes the destroy. Driven on core alone (terraform_data, no provider, no credentials): block removed whole → - resource "terraform_data" "guarded" { … } · Plan: 0 to add, 0 to change, 1 to destroy. · rc 0. On the real config the same edit plans "will be destroyed" with rc 0. ADR-0004 names that accident explicitly — "a routine teardown, or a small edit made in a hurry" — and its consequences say "Saying so is part of the rule: a guard trusted for more than it does is worse than none."

Not a blocker: the route is not introduced by the fix (before it, no teardown of this container was refused either), and what the fix refuses it refuses for real. What is left is a comment a reader can trust past what the mechanism delivers — the body states it correctly ("guarded against replacement").

Clearing (either): narrow the clause to what is refused — e.g. "a tofu destroy, a plan -destroy and a replacement are refused at plan time; deleting this block takes the guard with it, so declaring the container away is the one route it does not stop" — or make the protection real with a check block outside the resource that references it. I drove the second on core: check "store_is_declared" { assert { condition = length(terraform_data.guarded.id) > 0 … } } with the resource removed answers Error: Reference to undeclared resource · "There is no managed resource … definition in the root module" · rc 1, and No changes while the declaration stands.

S2 — ADVISORY — docs/proxmox-credentials.md:120-121

The page's new header says the pools now exist — "The read of 2026-10-28 finds both pools … so the handoff (WR-34) has run its pool half" (:11-17) — while the check section below still reads "Neither half has been run: no pool and no PRE token exists yet" (:120-121). The first sentence is the one this delta added, and it falsifies the second on the same page: a reader cannot tell which is true. The verdict that sentence carries is still right — the boundary check has not been run — so only its reason is stale.

Clearing: name the missing half, not the pools: "no PRE token exists yet, and the check below has not been run".

S3 — ADVISORY — Makefile:199-202 (commit 589b93d)

"The page that fixes this floor for all five repos — and the one an agent reads before running any target here — is workshop's docs/agents/make-targets.md." That path is not on workshop's main today: GET /repos/olympus/workshop/contents/docs/agents?ref=main lists domain.md, issue-tracker.md and triage-labels.md, and the file answers "The target couldn't be found." It lands with olympus/workshop#18 ("The agent's target floor, as one page (WR-42)", head a108d90, opened after this commit was pushed), so an agent told to read it before running any target here gets a 404 until that PR merges — the same present-tense-before-true shape round 1 charged at A3. The commit also is not in the PR body's change map, which is a WR-47 map: nothing there says a WR-42 comment moved with it.

Clearing: point at what exists today and say the page is coming — "lands with olympus/workshop#18" — and name the comment in the body (or take it to its own PR, where the WR-42 change lives).

Verified by hand

what result
env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check at 374845f rc 0, env fetch: every case passed., 70 ok
make -n check at 374845f prints only ./scripts/env.sh check and ./scripts/tests/run.sh — the new comment adds no step
tofu validate (offline, locked provider 0.117.0) and tofu fmt -check -recursive -diff, at 902a52e Success! The configuration is valid. · rc 0 — the delta touches no .tf file, so both carry to this head
AC1 — make env with a synthetic HOME (a fresh pit age key, the PROD pair sealed to it) 2 names · 0 paths · 2 from the age class; .env at 600, first line # fetched <ts> actor=pit store=https://10.12.0.144:8200; no .env.tmp
the partial fill and both refusals as tabulated under A5
B1 — the plan pair on the replica and on the real Stack no replacement of container.openbao at 902a52e; replacement at 8948133
the guard against a genuine replacement, -destroy, -target -destroy, -replace each Error: Resource instance cannot be destroyed, rc 1
"ignored, the attribute still applies at creation" (container.tf:70-72) guard lifted, base image bumped: the replacing create carries + pool_id = "prod"
the pin 137870c6… = sha256 of the body with the pin line blanked; env-check green
proxmox_pool_membership exists in the locked provider tofu providers schema -json names it, with pool_id/vm_id/type
the delta carries no secret five files, prose plus one lifecycle block; the AWS-looking fixture values in scripts/tests/run.sh:182-183 are the public AWS documentation dummies

Not verified

  • The cluster reads. /pools/prod and /pools/pre, guest 144's membership, and the body's "read 2026-10-28: /pools/prod lists 141, 142, 143, 144 and 150" — no Proxmox API from this host. S2 rests on the page's own text, not on that read.
  • containerRead sets no pool_id, and therefore that no refresh brings the state into line: the author's reading of bpg/proxmox 0.117.0. My probes ran plan -refresh=false, so what a refresh would put in state was not exercised.
  • proxmox_pool_membership's import form (<pool>/vm/<vmid>): the resource exists; the id format was not driven.
  • A live tofu plan/make guest against the cluster, and make env against the live store from a machine holding the Operator's seeds — this host holds neither. The equivalents above were driven with the locked provider over a written state, the stub suite, and a synthetic HOME.
  • The Makefile comment's own claim that the page "fixes this floor" and "holds the set": the page is not on main, so its contents could not be read here; only its absence is measured.

Summary

  • Spec: 0 findings — all six round-1 findings resolved, B1 by d028e24 (verified by driving the plan, not by reading the block).
  • Standards: 3 findings, all ADVISORY — worst: S1, a comment that promises a teardown refusal that deleting the block walks past.

No finding here is a blocker. The recommendation is fix on the advisory count alone: three advisories, which is this loop's volume trip — the state moves, the severities do not, and no nit is dressed as a defect to justify it. All three are one-line corrections in prose (two comments and one sentence), they can be made in a single pass, and none of them touches the plan, the fetch or the pin.

<!-- minos review-loop: repo=olympus/infra-secrets pr=12 head=374845f34ddb0cc62a4cbbc94f9ee412a4ef05df round=2/5 axes=standards,spec --> **olympus/infra-secrets #12** — round 2/5 · reviewed head `374845f34ddb0cc62a4cbbc94f9ee412a4ef05df` Recommendation: fix The branch moved while this report was being written: it was read at `902a52e`, the review posted on that head was dismissed by the platform when two commits landed seven seconds later, and it has been removed. This is the review of what is there now — `374845f`, the merge of `589b93d` (*"check names the page that fixes the floor for all five repos (WR-42)"*), whose own delta against `902a52e` is one file: `Makefile`, +5 comment lines. Nothing in round 1's findings moved with it. - **Spec**: WR-47 — Vikunja task 166, *"infra-secrets authors the env contract and reads its own environment from the store"* (project 5 `workshop`, identifier `WR`; re-read, unchanged, no comments). No linked issue in the PR body; the title's WR-47 reference is the spec. Round 2's contract is round 1's findings plus the ticket's ACs. - **Standards**: the org records in `olympus/workshop` `docs/adr/` at `main`, read from the forge (0001–0007; ADR-0004 blob `5c8312cc…`, the one this change answers to); this repo's `AGENTS.md` and `docs/agents/*`; no `CONTRIBUTING.md` or coding-standards file exists, so the Fowler smell baseline covered the rest. - **Round**: the prior review is pinned to `8948133`. The branch has since taken `d028e24`, `902a52e`, then `589b93d` + merge `374845f`; `git merge-base --is-ancestor 902a52e 374845f` is true and `git diff 902a52e 374845f` is the `Makefile` comment alone, so the round's whole delta is five files. ## Round 1 findings — verified resolved | finding | resolved by | evidence | | --- | --- | --- | | **B1** `pool_id = "prod"` replaces guest 144 | `d028e24` — `container.tf:74` `ignore_changes = [initialization[0].user_account, pool_id]`, `container.tf:81` `prevent_destroy = true` | Driven twice. A replica of the resource with a state written as the provider reads guest 144 (`pool_id = ""`), `plan -refresh=false`: control `0 to add, 1 to change, 0 to destroy`; pre-fix config `1 to add, 0 to change, 1 to destroy` with `+ pool_id = "prod" # forces replacement`; head config `0 to add, 1 to change, 0 to destroy`. Then the **real** `bao/guest` at `902a52e` against the same state: `Plan: 0 to add, 2 to change, 0 to destroy` — the container is not replaced, and the two in-place changes are the null-defaults the base config plans too (`0 to add, 2 to change, 0 to destroy` at `c14ce96`). | | **A1** the branch gained a policy row the body did not name | PR body | `## Summary` now carries *"`bao/policies/ci-tracker.hcl` — the tracker's plan row for the guest state record (TR-57, landed on this branch after the PR opened; named here so the change map covers it)"*. | | **A2** the body's assertion count | PR body | Counted at this head: `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check` → rc 0, **70** `^ ok ` lines, of which 2 are `env-check`'s and 68 the fetch's cases. The body says 70 (68 + 2). | | **A3** the four-repo pin claim | PR body | `GET /repos/olympus/<r>/raw/scripts/env.sh?ref=main` answers **404** for `infra-forge`, `infra-tracker`, `infra-silo` and `infra-semaphore`; the body now reads in the future tense and says so. WR-47's AC5 stays unmet, and the ticket's own *Out of scope* (*"the other four repos' cutovers"*) puts it there. | | **A4** the page's pin recipe named the wrong command | `902a52e` — `docs/env-fetch.md:188-191` | The new sentence is accurate: `git hash-object scripts/env.sh` → `aaad049c9b77…` (40 hex), the pin is `137870c6d446…` (64 hex) = `sha256` of the file with the pin line blanked, and `env-check`'s FAIL prints *"the body hashes to %s"* with exactly that value (`scripts/env.sh:124`). | | **A5** "a root an actor holds no key for is not an error" | `902a52e` — `docs/env-fetch.md:98-104` | Both halves driven with a synthetic `HOME`: age class absent → `not held: …` ×3 then `refused: nothing could be filled … nothing written.` rc 1, an existing `.env` byte-identical (`sha256` equal before and after), no `.env.tmp`; age class present, no actor key → `refused: the age class at … is on this machine and the Operator pit has no key at … to open it; nothing written.` rc 1. The claim the fix adds — a partial fill *is* written — also holds: a class holding only `PROXMOX_VE_ENDPOINT` writes `1 names · 0 paths · 1 from the age class`, `.env` at 0600 with the stamp line and no line for the other name. | ## Spec No findings. The delta serves round 1's asks and nothing else: the two `.tf` files are B1, `docs/env-fetch.md` is A4/A5, `docs/proxmox-credentials.md` is B1's page. WR-47's ACs are unchanged, and the one that remains unmet (AC5) is out of the ticket's scope. The body's numbers were re-measured at this head: `make check` 70 `ok`, and the guard pair exactly as the body tabulates it. ## Standards ### S1 — ADVISORY — `bao/guest/container.tf:76-78` The new comment says *"so a teardown or a replacement is refused at plan time, naming this block, before anything is touched (workshop ADR-0004)"*. The replacement half and the `tofu`-initiated teardowns are refused — driven: ``` plan -destroy Plan: 0 to add, 0 to change, 1 to destroy. → Error: Resource instance cannot be destroyed · prevent_destroy set, but the plan calls for it to be destroyed. rc 1 plan -target=…container.openbao -destroy same refusal, rc 1 plan -replace=…container.openbao same refusal, rc 1 base image bumped (a real replacement) Plan: 2 to add, 0 to change, 2 to destroy. → same refusal, rc 1 ``` The teardown half is not: **deleting the resource block from the configuration takes the `lifecycle` block with it**, so no guard is left to read and the plan proposes the destroy. Driven on core alone (`terraform_data`, no provider, no credentials): block removed whole → `- resource "terraform_data" "guarded" { … }` · `Plan: 0 to add, 0 to change, 1 to destroy.` · **rc 0**. On the real config the same edit plans *"will be destroyed"* with rc 0. ADR-0004 names that accident explicitly — *"a routine teardown, or a small edit made in a hurry"* — and its consequences say *"Saying so is part of the rule: a guard trusted for more than it does is worse than none."* Not a blocker: the route is not introduced by the fix (before it, no teardown of this container was refused either), and what the fix refuses it refuses for real. What is left is a comment a reader can trust past what the mechanism delivers — the body states it correctly (*"guarded against replacement"*). **Clearing (either):** narrow the clause to what is refused — e.g. *"a `tofu destroy`, a `plan -destroy` and a replacement are refused at plan time; deleting this block takes the guard with it, so declaring the container away is the one route it does not stop"* — or make the protection real with a `check` block outside the resource that references it. I drove the second on core: `check "store_is_declared" { assert { condition = length(terraform_data.guarded.id) > 0 … } }` with the resource removed answers `Error: Reference to undeclared resource` · *"There is no managed resource … definition in the root module"* · rc 1, and `No changes` while the declaration stands. ### S2 — ADVISORY — `docs/proxmox-credentials.md:120-121` The page's new header says the pools now exist — *"The read of 2026-10-28 finds both pools … so the handoff (WR-34) has run its pool half"* (`:11-17`) — while the check section below still reads *"Neither half has been run: no pool and no PRE token exists yet"* (`:120-121`). The first sentence is the one this delta added, and it falsifies the second on the same page: a reader cannot tell which is true. The verdict that sentence carries is still right — the boundary check has not been run — so only its reason is stale. **Clearing:** name the missing half, not the pools: *"no PRE token exists yet, and the check below has not been run"*. ### S3 — ADVISORY — `Makefile:199-202` (commit `589b93d`) *"The page that fixes this floor for all five repos — and the one an agent reads before running any target here — is `workshop`'s `docs/agents/make-targets.md`."* That path is not on `workshop`'s `main` today: `GET /repos/olympus/workshop/contents/docs/agents?ref=main` lists `domain.md`, `issue-tracker.md` and `triage-labels.md`, and the file answers *"The target couldn't be found."* It lands with **olympus/workshop#18** (*"The agent's target floor, as one page (WR-42)"*, head `a108d90`, opened after this commit was pushed), so an agent told to read it before running any target here gets a 404 until that PR merges — the same present-tense-before-true shape round 1 charged at A3. The commit also is not in the PR body's change map, which is a WR-47 map: nothing there says a WR-42 comment moved with it. **Clearing:** point at what exists today and say the page is coming — *"lands with olympus/workshop#18"* — and name the comment in the body (or take it to its own PR, where the WR-42 change lives). ## Verified by hand | what | result | | --- | --- | | `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check` at `374845f` | rc 0, `env fetch: every case passed.`, 70 `ok` | | `make -n check` at `374845f` | prints only `./scripts/env.sh check` and `./scripts/tests/run.sh` — the new comment adds no step | | `tofu validate` (offline, locked provider 0.117.0) and `tofu fmt -check -recursive -diff`, at `902a52e` | `Success! The configuration is valid.` · rc 0 — the delta touches no `.tf` file, so both carry to this head | | AC1 — `make env` with a synthetic `HOME` (a fresh `pit` age key, the PROD pair sealed to it) | `2 names · 0 paths · 2 from the age class`; `.env` at `600`, first line `# fetched <ts> actor=pit store=https://10.12.0.144:8200`; no `.env.tmp` | | the partial fill and both refusals | as tabulated under A5 | | B1 — the plan pair on the replica and on the real Stack | no replacement of `container.openbao` at `902a52e`; replacement at `8948133` | | the guard against a genuine replacement, `-destroy`, `-target -destroy`, `-replace` | each `Error: Resource instance cannot be destroyed`, rc 1 | | *"ignored, the attribute still applies at creation"* (`container.tf:70-72`) | guard lifted, base image bumped: the replacing create carries `+ pool_id = "prod"` | | the pin | `137870c6…` = `sha256` of the body with the pin line blanked; `env-check` green | | `proxmox_pool_membership` exists in the locked provider | `tofu providers schema -json` names it, with `pool_id`/`vm_id`/`type` | | the delta carries no secret | five files, prose plus one `lifecycle` block; the AWS-looking fixture values in `scripts/tests/run.sh:182-183` are the public AWS documentation dummies | ## Not verified - **The cluster reads.** `/pools/prod` and `/pools/pre`, guest 144's membership, and the body's *"read 2026-10-28: `/pools/prod` lists 141, 142, 143, 144 and 150"* — no Proxmox API from this host. S2 rests on the page's own text, not on that read. - **`containerRead` sets no `pool_id`**, and therefore that no refresh brings the state into line: the author's reading of bpg/proxmox 0.117.0. My probes ran `plan -refresh=false`, so what a refresh would put in state was not exercised. - **`proxmox_pool_membership`'s import form** (`<pool>/vm/<vmid>`): the resource exists; the id format was not driven. - **A live `tofu plan`/`make guest` against the cluster**, and **`make env` against the live store from a machine holding the Operator's seeds** — this host holds neither. The equivalents above were driven with the locked provider over a written state, the stub suite, and a synthetic `HOME`. - **The `Makefile` comment's own claim** that the page *"fixes this floor"* and *"holds the set"*: the page is not on `main`, so its contents could not be read here; only its absence is measured. ## Summary - **Spec:** 0 findings — all six round-1 findings resolved, B1 by `d028e24` (verified by driving the plan, not by reading the block). - **Standards:** 3 findings, all **ADVISORY** — worst: **S1**, a comment that promises a teardown refusal that deleting the block walks past. No finding here is a blocker. The recommendation is **fix** on the advisory count alone: three advisories, which is this loop's volume trip — the state moves, the severities do not, and no nit is dressed as a defect to justify it. All three are one-line corrections in prose (two comments and one sentence), they can be made in a single pass, and none of them touches the plan, the fetch or the pin.
prevent_destroy lives on the resource, so deleting the block takes the guard
with it: on this Stack with the block and the output that referenced it both
gone, the plan reads "0 to add, 0 to change, 1 to destroy" and exits 0 — the
ADR-0004 accident the comment already claimed was refused. The check in
guards.tf sits outside the resource and references it, so that tree fails to
load instead (`Reference to undeclared resource`, rc 1). The comment now names
the routes the guard refuses and the ones it does not.
The 2026-10-28 read on this page's own header finds the pools, so "no pool"
was the stale half of that sentence. What the checks lack is a token minted
from the PRE row; the page says that, and says no read here has seen one,
rather than asserting a token's absence from a read it does not have.
workshop's docs/agents/make-targets.md is not on its main: it lands with
olympus/workshop#18, and an agent sent to read it today gets a 404. The comment
now points at docs/env-fetch.md, which is in this tree, and says the page takes
over when that PR merges. Comment only: `make -n check` is byte-identical.
Member

olympus/infra-secrets #12 — round 2 → fix, at 85d4ec1.

The report's own tally is 0 blockers, 3 advisories (S1–S3). The dispatch text says "blocking findings" because it is generated from the label event; the severity comes from the review, and the live label was review/needs-fix, so all three are worked. One commit each, so each finding maps to one line below.

finding commit change
S1 the guard's comment promises a teardown refusal that deleting the block walks past 39232f3 bao/guest/guards.tf (new) and a narrowed comment in container.tf
S2 the check section's reason is stale (no pool) 685aced docs/proxmox-credentials.md:119-122
S3 the floor comment points at a page that is not on workshop's main 85d4ec1 Makefile:198-204, and the body's change map

S1 — the "make it real" branch, driven

The finding offers two clearings; I took the second (a check outside the resource), because ADR-0004's Decision is that a run that would remove the store fails at plan time, and narrowing the comment would leave the route in place. Drives at both heads, same written state, locked provider 0.117.0, plan -refresh=false, no cluster:

config reviewed head 374845f this head 85d4ec1
unchanged Plan: 0 to add, 1 to change, 0 to destroy, rc 0 same, rc 0
container block deleted, output kept rc 1 — already refused, by the output's own reference rc 1
container block and the output that referenced it deleted Plan: 0 to add, 0 to change, 1 to destroy, rc 0 Error: Reference to undeclared resource on bao/guest/guards.tf:19, rc 1
plan -destroy rc 1, prevent_destroy rc 1, prevent_destroy
vm_id 144 → 145 (replacement) rc 1, prevent_destroy rc 1: plans 1 to add, 0 to change, 1 to destroy, then refused

Two details worth the reviewer's eye. The charge on this Stack needs the output gone as well as the block — deleting the block alone is refused, but by the output's reference — which is why I drove that pair rather than the block alone. And the condition reads vm_id (configured, so known at plan) rather than id: id is known only after apply and printed Warning: Check block assertion known after apply on every first plan, which would put a deferred verdict in make guest-plan's artifact. A create now prints no check line at all. The comment in container.tf names the three routes it refuses and says deleting the block is covered by guards.tf instead.

S2 — I sharpened the offered sentence

The suggested clearing is "no PRE token exists yet, and the check below has not been run". The page's token inventory is a 2026-10-27 read and its own header says the handoff's credential half has not been re-read here, so the page cannot assert the token's absence. It now says what it can support: "Neither the 403 pair nor the throwaway cycle has been run: both need a token minted from the PRE row, which no read here has seen yet, so they are the handoff's acceptance criteria rather than this page's evidence." Substance taken (name the token, not the pools); the absence claim declined.

S3 — future tense, the PR named, and the body

docs/agents/make-targets.md answers "The target couldn't be found" on workshop's main, and olympus/workshop#18 ("The agent's target floor, as one page (WR-42)", head a108d90) is open with it. The comment now says the page lands with that PR, points at docs/env-fetch.md, which is in this tree, and names the PR rather than the path. The comment is named in the body's change map, as the finding asked.

Verified at 85d4ec1

command result
mise exec -- make deps rc 0, installed 0 tools · 7 already installed
mise exec -- make validate rc 0, Success! The configuration is valid.
mise exec -- tofu fmt -check -recursive -diff rc 0, no diff
cd bao/service && mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml rc 0, playbook: site.yml, plus the pre-existing [WARNING]: Found both group and host with same name: bao
env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check rc 0, 70 ok lines, env fetch: every case passed.
make -n check, both heads, $(CURDIR) normalised byte-identical — the Makefile change is comment only
render of docs/proxmox-credentials.md through POST /api/v1/markdown new sentence present, no pool and no PRE token absent, 3 tables with a constant cell count per row, 1 code block
read-back of all four changed files at ref=85d4ec1 every claim above present, the stale one absent

Left alone

  • WR-47 AC5 stays unmet; round 1's A3 verdict — the ticket's own Out of scope covers the four cutovers — is still the reading, and the body states it in the future tense.
  • No label but the state label, and no tracker edit.
  • Self-review: no claude/codex/agent CLI exists on this host, so the code-review skill's two axes were run by me in sequence, not by parallel sub-agents — Standards: ADR-0004 cited and honoured, no coding-standards file exists in the repo, no baseline smell in a four-file prose-plus-guard diff; Spec: the three findings, each with its commit above.
<!-- fix-meta repo=olympus/infra-secrets pr=12 head=85d4ec1fafd5b0e86136133b80586326441df104 round=2/5 disposition=fixed --> **olympus/infra-secrets #12** — round 2 → fix, at `85d4ec1`. The report's own tally is **0 blockers, 3 advisories (S1–S3)**. The dispatch text says "blocking findings" because it is generated from the label event; the severity comes from the review, and the live label was `review/needs-fix`, so all three are worked. One commit each, so each finding maps to one line below. | finding | commit | change | | --- | --- | --- | | **S1** the guard's comment promises a teardown refusal that deleting the block walks past | `39232f3` | `bao/guest/guards.tf` (new) and a narrowed comment in `container.tf` | | **S2** the check section's reason is stale (`no pool`) | `685aced` | `docs/proxmox-credentials.md:119-122` | | **S3** the floor comment points at a page that is not on `workshop`'s `main` | `85d4ec1` | `Makefile:198-204`, and the body's change map | ### S1 — the "make it real" branch, driven The finding offers two clearings; I took the second (a `check` outside the resource), because ADR-0004's Decision is that *a run that would remove the store fails at plan time*, and narrowing the comment would leave the route in place. Drives at both heads, same written state, locked provider 0.117.0, `plan -refresh=false`, no cluster: | config | reviewed head `374845f` | this head `85d4ec1` | | --- | --- | --- | | unchanged | `Plan: 0 to add, 1 to change, 0 to destroy`, rc 0 | same, rc 0 | | container block deleted, output kept | rc 1 — already refused, by the `output`'s own reference | rc 1 | | container block **and** the output that referenced it deleted | **`Plan: 0 to add, 0 to change, 1 to destroy`, rc 0** | `Error: Reference to undeclared resource` on `bao/guest/guards.tf:19`, rc 1 | | `plan -destroy` | rc 1, `prevent_destroy` | rc 1, `prevent_destroy` | | `vm_id` 144 → 145 (replacement) | rc 1, `prevent_destroy` | rc 1: plans `1 to add, 0 to change, 1 to destroy`, then refused | Two details worth the reviewer's eye. The charge on this Stack needs the output gone as well as the block — deleting the block alone is refused, but by the `output`'s reference — which is why I drove that pair rather than the block alone. And the condition reads `vm_id` (configured, so known at plan) rather than `id`: `id` is known only after apply and printed `Warning: Check block assertion known after apply` on every first plan, which would put a deferred verdict in `make guest-plan`'s artifact. A create now prints no check line at all. The comment in `container.tf` names the three routes it refuses and says deleting the block is covered by `guards.tf` instead. ### S2 — I sharpened the offered sentence The suggested clearing is *"no PRE token exists yet, and the check below has not been run"*. The page's token inventory is a 2026-10-27 read and its own header says the handoff's credential half *has not been re-read here*, so the page cannot assert the token's absence. It now says what it can support: *"Neither the 403 pair nor the throwaway cycle has been run: both need a token minted from the PRE row, which no read here has seen yet, so they are the handoff's acceptance criteria rather than this page's evidence."* Substance taken (name the token, not the pools); the absence claim declined. ### S3 — future tense, the PR named, and the body `docs/agents/make-targets.md` answers *"The target couldn't be found"* on `workshop`'s `main`, and `olympus/workshop#18` (*"The agent's target floor, as one page (WR-42)"*, head `a108d90`) is open with it. The comment now says the page lands with that PR, points at `docs/env-fetch.md`, which is in this tree, and names the PR rather than the path. The comment is named in the body's change map, as the finding asked. ### Verified at `85d4ec1` | command | result | | --- | --- | | `mise exec -- make deps` | rc 0, `installed 0 tools · 7 already installed` | | `mise exec -- make validate` | rc 0, `Success! The configuration is valid.` | | `mise exec -- tofu fmt -check -recursive -diff` | rc 0, no diff | | `cd bao/service && mise exec -- ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` | rc 0, `playbook: site.yml`, plus the pre-existing `[WARNING]: Found both group and host with same name: bao` | | `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY make check` | rc 0, 70 `ok` lines, `env fetch: every case passed.` | | `make -n check`, both heads, `$(CURDIR)` normalised | byte-identical — the Makefile change is comment only | | render of `docs/proxmox-credentials.md` through `POST /api/v1/markdown` | new sentence present, `no pool and no PRE token` absent, 3 tables with a constant cell count per row, 1 code block | | read-back of all four changed files at `ref=85d4ec1` | every claim above present, the stale one absent | ### Left alone - **WR-47 AC5** stays unmet; round 1's A3 verdict — the ticket's own *Out of scope* covers the four cutovers — is still the reading, and the body states it in the future tense. - No label but the state label, and no tracker edit. - **Self-review:** no `claude`/`codex`/`agent` CLI exists on this host, so the `code-review` skill's two axes were run by me in sequence, not by parallel sub-agents — Standards: ADR-0004 cited and honoured, no coding-standards file exists in the repo, no baseline smell in a four-file prose-plus-guard diff; Spec: the three findings, each with its commit above.
bot-minos approved these changes 2026-10-28 12:30:24 +00:00
bot-minos left a comment

olympus/infra-secrets #12 — round 3/5 · reviewed head 85d4ec1fafd5b0e86136133b80586326441df104 · previous review 374845f34ddb0cc62a4cbbc94f9ee412a4ef05df

Recommendation: merge

  • Spec: WR-47 — Vikunja task 166, "infra-secrets authors the env contract and reads its own environment from the store". No linked issue in the body; the title's WR-47 reference is the spec, and round 2's three advisories (S1–S3) are this round's contract, because the label moved on the advisory-volume rule, not on a blocker.
  • Standards: the org records in olympus/workshop docs/adr/ at main, read from the forge (0001–0007; ADR-0004 is the one this guard answers to, ADR-0002 the one this merge answers to); this repo's AGENTS.md and docs/agents/*. No CONTRIBUTING.md and no coding-standards file exist, so the Fowler smell baseline covered the rest.
  • Round: prior review pinned to 374845f, 0 blockers and 3 advisories. The delta is git diff 374845f 85d4ec1 — three commits (39232f3, 685aced, 85d4ec1), four files: Makefile (+4/−2), bao/guest/container.tf (+6/−4), bao/guest/guards.tf (new, 22), docs/proxmox-credentials.md (+3/−3). The dispatch's head and refs/pull/12/head agree at 85d4ec1; the branch is current with main (origin/main = c14ce966, the PR's merge_base, 0 commits behind).

Round 2 findings — verified resolved

finding resolved by evidence I drove at this head
S1 the guard's comment promised a teardown refusal that deleting the block walks past 39232f3 — bao/guest/guards.tf:17-22, narrowed comment at bao/guest/container.tf:76-83 Red/green pair on one written state (pool_id = ""), plan -refresh=false, locked provider 0.117.0. At 374845f, container block and the output that referenced it deleted → Plan: 0 to add, 1 to change, 1 to destroy, rc 0. At 85d4ec1, the same edit → Error: Reference to undeclared resource on guards.tf line 19, rc 1, nothing planned. Block deleted alone at this head → rc 1 as well, from the output's two references and guards.tf:19. The refusal is real, not a narrowed sentence.
S2 the check section's reason was stale (no pool) 685aced — docs/proxmox-credentials.md:119-122 The page no longer carries no pool anywhere (grep -n 'no pool' → no hit at this head; the phrase survives only on main's pre-change blob). The replacement names the token, not the pools, and agrees with the page's own header (:11-17) that the pool half has run and the credential half has not been re-read.
S3 the floor comment pointed at a page not on workshop's main 85d4ec1 — Makefile:199-204, and the body's change map GET /repos/olympus/workshop/contents/docs/agents?ref=main lists domain.md, issue-tracker.md, triage-labels.md — no make-targets.md. olympus/workshop#18 is open at head a108d90 and its branch does carry the page. The comment says the page "lands with olympus/workshop#18 and is not on its main yet", points at docs/env-fetch.md as the record meanwhile, and the body names the comment.

Round 1's B1 (pool_id = "prod" replacing guest 144) still holds at this head: with the same state, the head config plans Plan: 0 to add, 2 to change, 0 to destroy — no replacement of container.openbao.

Spec

No findings. The delta serves round 2's three asks and nothing else: two .tf files are S1, the Makefile is S3, the page is S2, and the body's change map now names all three (plus the two commits that landed on the branch after the PR opened). WR-47's ACs are unchanged; AC5 stays unmet and out of the ticket's scope, which the body states in the future tense — round 1's settled reading, not reopened here.

Standards

A1 — ADVISORY — bao/guest/guards.tf:10

"It is not a wall either: a check stops a plan, not a container removed on the node or a disk that fails" — as a statement about check blocks that is false, and it is text this delta adds.

A failed check assertion is a warning, and the plan proceeds. Driven on this tree with the same state, the condition forced to vm_id > 999:

Warning: Check block assertion failed
  on guards.tf line 19, in check "store_is_declared"
Plan: 0 to add, 2 to change, 0 to destroy.        rc 0

What stops the plan here is not the assertion at all — it is the undeclared reference failing at load, which the file's own first paragraph says precisely ("fails to load at all (Reference to undeclared resource)"). So the file gives a reader two accounts of its mechanism, and the loose one generalises a load-time error into "a check stops a plan": an author who later adds another check expecting a refusal gets a green run with a warning in it.

This is a standard, not taste: workshop ADR-0004's consequences say "Saying so is part of the rule: a guard trusted for more than it does is worse than none." Not a blocker — the guard itself refuses what S1 asked it to refuse, and this sentence is prose beside it.

Clearing: one clause — name the mechanism instead of the mechanism class, e.g. "It is not a wall either: the reference stops the load, not a container removed on the node or a disk that fails, and a deliberate teardown lifts both guards first."

Verified by hand, at 85d4ec1

what result
env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check rc 0, env fetch: every case passed., 70 ^ ok lines — 68 from scripts/tests/run.sh, 2 from env-check. The body's 68 + 2 is exact.
the same two scripts run directly, no mise exec green; make -n check prints only ./scripts/env.sh check and ./scripts/tests/run.sh
tofu validate in bao/guest (locked provider 0.117.0, downloaded) Success! The configuration is valid.
tofu fmt -check -recursive -diff over the tree rc 0 — guards.tf included
steady plan, state written the way the provider reads guest 144 (pool_id = "") Plan: 0 to add, 2 to change, 0 to destroy, rc 0 — no replacement (B1 holds)
declaration removed, output kept rc 1 — Reference to undeclared resource at container.tf:25, :26 and guards.tf:19
declaration and output removed rc 1 — Reference to undeclared resource at guards.tf:19 alone
that same edit at 374845f Plan: 0 to add, 1 to change, 1 to destroy, rc 0 — the hole S1 charged
plan -destroy Error: Resource instance cannot be destroyed · prevent_destroy set, but the plan calls for it to be destroyed, rc 1
vm_id 144 → 145, and the base image bumped each plans a replacement and is then refused by prevent_destroy, rc 1
create against an empty state Plan: 2 to add, 0 to change, 0 to destroy, rc 0, no check warning — the vm_id condition is known at plan, as guards.tf:14-16 says
live cluster, read-only (ssh burns pvesh get /pools) both pools exist; /pools/prod lists 141, 142, 143, 144 openbao and 150 — docs/proxmox-credentials.md:11-17 and the body's Merge Danger both hold
olympus/workshop#18 and its page open at a108d90, page present on the branch, absent from main — Makefile:199-204 holds
the delta carries no secret four files, prose plus one lifecycle block and one check; nothing else moved

Not verified

  • make env against the live store from a machine holding the Operator's seeds — this host holds none. Unchanged by this delta (no scripts/env.sh, env.map or .env.example line), and round 2 drove it against the stub suite and a synthetic HOME.
  • A live tofu plan/make guest against the cluster — no Proxmox token for tofu on this host. The plans above are the locked provider over a written state with -refresh=false; the cluster itself was read, not planned.
  • The body's steady-plan figure: it quotes 0 to add, 1 to change, 0 to destroy, and my fixture reproduces 2 to change — the in-place count is a property of the hand-written state, so the figure I compare across revisions is the destroy count (0). Not charged.

Checked and accepted

  • olympus/workshop#18 itself currently sits at review/needs-fix, so the page Makefile:199-204 points at may still change before it lands. That is that PR's timeline, not this diff's, and the comment only claims the page is not on main yet — which is true.

Summary

  • Spec: 0 findings — all three round-2 advisories resolved, each driven rather than read, and no scope creep in the delta.
  • Standards: 1 finding, ADVISORY — A1, one sentence in guards.tf that generalises a load-time error into "a check stops a plan".

No blocker. One advisory trips no volume rule (three would), so the state is APPROVE and the label moves to review/merge-ready; A1 travels as advice, not as a reason for a fourth round.

<!-- minos review-loop: repo=olympus/infra-secrets pr=12 head=85d4ec1fafd5b0e86136133b80586326441df104 round=3/5 axes=standards,spec --> **olympus/infra-secrets #12** — round 3/5 · reviewed head `85d4ec1fafd5b0e86136133b80586326441df104` · previous review `374845f34ddb0cc62a4cbbc94f9ee412a4ef05df` Recommendation: merge - **Spec**: WR-47 — Vikunja task 166, *"infra-secrets authors the env contract and reads its own environment from the store"*. No linked issue in the body; the title's WR-47 reference is the spec, and round 2's three advisories (S1–S3) are this round's contract, because the label moved on the advisory-volume rule, not on a blocker. - **Standards**: the org records in `olympus/workshop` `docs/adr/` at `main`, read from the forge (0001–0007; ADR-0004 is the one this guard answers to, ADR-0002 the one this merge answers to); this repo's `AGENTS.md` and `docs/agents/*`. No `CONTRIBUTING.md` and no coding-standards file exist, so the Fowler smell baseline covered the rest. - **Round**: prior review pinned to `374845f`, 0 blockers and 3 advisories. The delta is `git diff 374845f 85d4ec1` — three commits (`39232f3`, `685aced`, `85d4ec1`), four files: `Makefile` (+4/−2), `bao/guest/container.tf` (+6/−4), `bao/guest/guards.tf` (new, 22), `docs/proxmox-credentials.md` (+3/−3). The dispatch's head and `refs/pull/12/head` agree at `85d4ec1`; the branch is current with `main` (`origin/main` = `c14ce966`, the PR's `merge_base`, 0 commits behind). ## Round 2 findings — verified resolved | finding | resolved by | evidence I drove at this head | | --- | --- | --- | | **S1** the guard's comment promised a teardown refusal that deleting the block walks past | `39232f3` — `bao/guest/guards.tf:17-22`, narrowed comment at `bao/guest/container.tf:76-83` | Red/green pair on one written state (`pool_id = ""`), `plan -refresh=false`, locked provider 0.117.0. At `374845f`, container block **and** the output that referenced it deleted → `Plan: 0 to add, 1 to change, 1 to destroy`, rc 0. At `85d4ec1`, the same edit → `Error: Reference to undeclared resource` on `guards.tf line 19`, rc 1, nothing planned. Block deleted alone at this head → rc 1 as well, from the output's two references and `guards.tf:19`. The refusal is real, not a narrowed sentence. | | **S2** the check section's reason was stale (`no pool`) | `685aced` — `docs/proxmox-credentials.md:119-122` | The page no longer carries `no pool` anywhere (`grep -n 'no pool'` → no hit at this head; the phrase survives only on `main`'s pre-change blob). The replacement names the token, not the pools, and agrees with the page's own header (`:11-17`) that the pool half has run and the credential half has not been re-read. | | **S3** the floor comment pointed at a page not on `workshop`'s `main` | `85d4ec1` — `Makefile:199-204`, and the body's change map | `GET /repos/olympus/workshop/contents/docs/agents?ref=main` lists `domain.md`, `issue-tracker.md`, `triage-labels.md` — no `make-targets.md`. `olympus/workshop#18` is open at head `a108d90` and its branch does carry the page. The comment says the page "lands with olympus/workshop#18 and is not on its `main` yet", points at `docs/env-fetch.md` as the record meanwhile, and the body names the comment. | Round 1's **B1** (`pool_id = "prod"` replacing guest 144) still holds at this head: with the same state, the head config plans `Plan: 0 to add, 2 to change, 0 to destroy` — no replacement of `container.openbao`. ## Spec No findings. The delta serves round 2's three asks and nothing else: two `.tf` files are S1, the `Makefile` is S3, the page is S2, and the body's change map now names all three (plus the two commits that landed on the branch after the PR opened). WR-47's ACs are unchanged; AC5 stays unmet and out of the ticket's scope, which the body states in the future tense — round 1's settled reading, not reopened here. ## Standards ### A1 — ADVISORY — `bao/guest/guards.tf:10` *"It is not a wall either: a check stops a plan, not a container removed on the node or a disk that fails"* — as a statement about `check` blocks that is false, and it is text this delta adds. A failed `check` assertion is a **warning**, and the plan proceeds. Driven on this tree with the same state, the condition forced to `vm_id > 999`: ``` Warning: Check block assertion failed on guards.tf line 19, in check "store_is_declared" Plan: 0 to add, 2 to change, 0 to destroy. rc 0 ``` What stops the plan here is not the assertion at all — it is the undeclared reference failing at load, which the file's own first paragraph says precisely (*"fails to load at all (`Reference to undeclared resource`)"*). So the file gives a reader two accounts of its mechanism, and the loose one generalises a load-time error into "a check stops a plan": an author who later adds another `check` expecting a refusal gets a green run with a warning in it. This is a standard, not taste: workshop ADR-0004's consequences say *"Saying so is part of the rule: a guard trusted for more than it does is worse than none."* Not a blocker — the guard itself refuses what S1 asked it to refuse, and this sentence is prose beside it. **Clearing:** one clause — name the mechanism instead of the mechanism class, e.g. *"It is not a wall either: the reference stops the load, not a container removed on the node or a disk that fails, and a deliberate teardown lifts both guards first."* ## Verified by hand, at `85d4ec1` | what | result | | --- | --- | | `env -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check` | rc 0, `env fetch: every case passed.`, **70** `^ ok ` lines — 68 from `scripts/tests/run.sh`, 2 from `env-check`. The body's 68 + 2 is exact. | | the same two scripts run directly, no `mise exec` | green; `make -n check` prints only `./scripts/env.sh check` and `./scripts/tests/run.sh` | | `tofu validate` in `bao/guest` (locked provider 0.117.0, downloaded) | `Success! The configuration is valid.` | | `tofu fmt -check -recursive -diff` over the tree | rc 0 — `guards.tf` included | | steady plan, state written the way the provider reads guest 144 (`pool_id = ""`) | `Plan: 0 to add, 2 to change, 0 to destroy`, rc 0 — no replacement (B1 holds) | | declaration removed, output kept | rc 1 — `Reference to undeclared resource` at `container.tf:25`, `:26` and `guards.tf:19` | | declaration **and** output removed | rc 1 — `Reference to undeclared resource` at `guards.tf:19` alone | | that same edit at `374845f` | `Plan: 0 to add, 1 to change, 1 to destroy`, rc 0 — the hole S1 charged | | `plan -destroy` | `Error: Resource instance cannot be destroyed` · `prevent_destroy set, but the plan calls for it to be destroyed`, rc 1 | | `vm_id` 144 → 145, and the base image bumped | each plans a replacement and is then refused by `prevent_destroy`, rc 1 | | create against an empty state | `Plan: 2 to add, 0 to change, 0 to destroy`, rc 0, no check warning — the `vm_id` condition is known at plan, as `guards.tf:14-16` says | | **live cluster, read-only** (`ssh burns pvesh get /pools`) | both pools exist; `/pools/prod` lists 141, 142, 143, 144 openbao and 150 — `docs/proxmox-credentials.md:11-17` and the body's *Merge Danger* both hold | | `olympus/workshop#18` and its page | open at `a108d90`, page present on the branch, absent from `main` — `Makefile:199-204` holds | | the delta carries no secret | four files, prose plus one `lifecycle` block and one `check`; nothing else moved | ## Not verified - **`make env` against the live store** from a machine holding the Operator's seeds — this host holds none. Unchanged by this delta (no `scripts/env.sh`, `env.map` or `.env.example` line), and round 2 drove it against the stub suite and a synthetic `HOME`. - **A live `tofu plan`/`make guest` against the cluster** — no Proxmox token for `tofu` on this host. The plans above are the locked provider over a written state with `-refresh=false`; the cluster itself was read, not planned. - **The body's steady-plan figure**: it quotes `0 to add, 1 to change, 0 to destroy`, and my fixture reproduces `2 to change` — the in-place count is a property of the hand-written state, so the figure I compare across revisions is the destroy count (0). Not charged. ## Checked and accepted - `olympus/workshop#18` itself currently sits at `review/needs-fix`, so the page `Makefile:199-204` points at may still change before it lands. That is that PR's timeline, not this diff's, and the comment only claims the page is not on `main` yet — which is true. ## Summary - **Spec:** 0 findings — all three round-2 advisories resolved, each driven rather than read, and no scope creep in the delta. - **Standards:** 1 finding, **ADVISORY** — A1, one sentence in `guards.tf` that generalises a load-time error into "a check stops a plan". No blocker. One advisory trips no volume rule (three would), so the state is `APPROVE` and the label moves to `review/merge-ready`; A1 travels as advice, not as a reason for a fourth round.
pit merged commit ed2009bbe9 into main 2026-10-28 12:37:05 +00:00
pit deleted branch wr39/integration 2026-10-28 12:37:05 +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-secrets!12
No description provided.