make key-mint creates a state key, and store refuses to (SL-22) #20

Merged
pit merged 6 commits from hermes/SL-22-a-key-the-declaration-creates-is-not-sco into main 2026-11-05 13:36:32 +00:00
Member

Implements SL-22

Summary

A key the store half creates carries no policy of its own: the provider writes
the access key and leaves the reach implied by the parent, which under
silo-admin is every record in tfstate. A plan cannot tell — both read
No changes — so creation leaves the apply.

make key-mint KEY=<name>          scripts/key-mint.sh
  var.state_keys[name] → policy file      refuses a name the map does not carry
  mcli admin accesskey create … --policy silo/store/<file> --access-key … --secret-key …
                                          policy embedded at creation
  tofu import module.store.minio_iam_service_account.state_key["<name>"] <access key>
  print the access key and secret/tofu-state/<record>/<shape>   (never the secret)

make store                        Makefile
  tofu plan -out=plan.out
  tofu show -json plan.out | scripts/store-plan-guard.sh
                                          any create on the declaration → exit 1, "make key-mint"
  tofu show, prompt, apply

The pair and the root credential come from the environment, so a re-run is the
same command: an existing key is adopted rather than minted again, and a mint that
stopped at its import is finished by running it once more. Adopted only if it holds
a policy of its own: info answers policy: null for the implied shape, and that
one is refused — naming make key-audit — rather than imported.

main moved to SC-15 while this branch was open (the tracker records' two
deploy-shaped keys); the merge is in the branch, and the map's deploy shape is
what the mint reads (tofu-deploy-state-tracker-guest →
secret/tofu-state/tracker-guest/deploy).

The admin client both key guards ask the store through is resolved in one place
now, scripts/lib/mcli.sh, rather than the same fifteen lines in each script.

Evidence

  • Before: the ticket's measurement on a key the apply created —
    mcli admin accesskey info silo/ <key> reads Policy: implied, and tofu plan
    reads No changes either way.
    After: the mint's create carries --policy silo/store/<file>, which is what
    embeds it; scripts/tests/key-mint.test.sh asserts the argv. The live
    Policy: embedded read needs the store and the root credential, so it is the
    Operator's to run (MC_HOST_silo=… mise exec -- make key-mint).

  • Before: scripts/key-mint.test.sh against the tree without the scripts —
    28 of its cases red (the first run).
    After: mise exec -- make check on this branch, exit 0:

    env-test: every case holds.
    key-audit-test: every case passed
    key-mint-test: every case passed
    Success! The configuration is valid.
    

    156 cases across the three offline suites — env-test 43, key-audit-test 38,
    key-mint-test 75. key-mint-test proves the refusals
    (an undeclared name, a name outside the map's alphabet, a missing half, a pair
    outside the store's limits — each before the store is asked), the create's
    argv, the import address and its bare-access-key id, the three record paths, the
    re-run that imports nothing twice, a key the store already holds in the implied
    shape refused rather than adopted, and make store exiting non-zero before its
    prompt on a plan that would create a key.

  • make key-audit on an implied key already failed it; the case now also
    asserts the message names the key and the name it was minted with. That every
    live key still audits clean is the Operator's run: the audit reads the store's
    root credential.

Merge Danger

Door: two-way.

Blast Radius: narrow.

No key, policy or Stack changes; no live key is touched or re-minted. make store
now refuses a plan that would create a declared state key — which is a deploy that
would otherwise quietly re-create it implied. A store rebuilt from nothing applies
the tfstate bucket first, with the state still local, then mints each key the map
declares, one at a time, and applies the rest (runbook 0003 §7).
key-audit-test joins make check, so the PR gate runs one more credential-free
suite.

Runbook 0003 §7 is where the procedure is read; §4's rotation path is unchanged,
and var.state_key_secrets now serves rotation only.

Implements [SL-22](https://vikunja.thepit.space/tasks/290) ## Summary A key the store half creates carries no policy of its own: the provider writes the access key and leaves the reach implied by the parent, which under `silo-admin` is every record in `tfstate`. A plan cannot tell — both read `No changes` — so creation leaves the apply. ```text make key-mint KEY=<name> scripts/key-mint.sh var.state_keys[name] → policy file refuses a name the map does not carry mcli admin accesskey create … --policy silo/store/<file> --access-key … --secret-key … policy embedded at creation tofu import module.store.minio_iam_service_account.state_key["<name>"] <access key> print the access key and secret/tofu-state/<record>/<shape> (never the secret) make store Makefile tofu plan -out=plan.out tofu show -json plan.out | scripts/store-plan-guard.sh any create on the declaration → exit 1, "make key-mint" tofu show, prompt, apply ``` The pair and the root credential come from the environment, so a re-run is the same command: an existing key is adopted rather than minted again, and a mint that stopped at its import is finished by running it once more. Adopted only if it holds a policy of its own: `info` answers `policy: null` for the implied shape, and that one is refused — naming `make key-audit` — rather than imported. `main` moved to SC-15 while this branch was open (the tracker records' two deploy-shaped keys); the merge is in the branch, and the map's `deploy` shape is what the mint reads (`tofu-deploy-state-tracker-guest` → `secret/tofu-state/tracker-guest/deploy`). The admin client both key guards ask the store through is resolved in one place now, `scripts/lib/mcli.sh`, rather than the same fifteen lines in each script. ## Evidence - **Before:** the ticket's measurement on a key the apply created — `mcli admin accesskey info silo/ <key>` reads `Policy: implied`, and `tofu plan` reads `No changes` either way. **After:** the mint's create carries `--policy silo/store/<file>`, which is what embeds it; `scripts/tests/key-mint.test.sh` asserts the argv. The live `Policy: embedded` read needs the store and the root credential, so it is the Operator's to run (`MC_HOST_silo=… mise exec -- make key-mint`). - **Before:** `scripts/key-mint.test.sh` against the tree without the scripts — 28 of its cases red (the first run). **After:** `mise exec -- make check` on this branch, exit 0: ```text env-test: every case holds. key-audit-test: every case passed key-mint-test: every case passed Success! The configuration is valid. ``` 156 cases across the three offline suites — env-test 43, key-audit-test 38, key-mint-test 75. `key-mint-test` proves the refusals (an undeclared name, a name outside the map's alphabet, a missing half, a pair outside the store's limits — each before the store is asked), the create's argv, the import address and its bare-access-key id, the three record paths, the re-run that imports nothing twice, a key the store already holds in the implied shape refused rather than adopted, and `make store` exiting non-zero before its prompt on a plan that would create a key. - **`make key-audit` on an implied key** already failed it; the case now also asserts the message names the key and the name it was minted with. That every live key still audits clean is the Operator's run: the audit reads the store's root credential. ## Merge Danger **Door:** two-way. **Blast Radius:** narrow. No key, policy or Stack changes; no live key is touched or re-minted. `make store` now refuses a plan that would create a declared state key — which is a deploy that would otherwise quietly re-create it implied. A store rebuilt from nothing applies the `tfstate` bucket first, with the state still local, then mints each key the map declares, one at a time, and applies the rest (runbook 0003 §7). `key-audit-test` joins `make check`, so the PR gate runs one more credential-free suite. Runbook 0003 §7 is where the procedure is read; §4's rotation path is unchanged, and `var.state_key_secrets` now serves rotation only.
ticket-dispatch: make key-mint creates a state key, and store refuses to (SL-22)
All checks were successful
pr-checks / check (pull_request) Successful in 18s
d379b023ed
A key the declaration created carried no policy of its own: the provider writes
the access key and leaves the reach implied by the key's parent, which under
`silo-admin` is every record in `tfstate`. A plan cannot tell — a key with none
and a key with the right one both read `No changes`, because the provider never
reads a policy back — and `mcli admin accesskey info` can: `Policy: implied`
against `Policy: embedded`. Two deploy keys minted through the apply came out
implied, and were removed and re-minted by hand (SC-15).

So creation moves out of the apply and into a Target:

- `make key-mint KEY=<name>`, with ACCESS_KEY and SECRET_KEY in the environment
  and MC_HOST_silo as the store's root user, reads the entry from
  `var.state_keys` (refusing a name it does not declare), mints the key with the
  policy file embedded, imports it at
  `module.store.minio_iam_service_account.state_key["<name>"]` with the access
  key as the id, and prints the access key and the
  `secret/tofu-state/<record>/<shape>` path the pair belongs at — never the
  secret. The supplied pair is what makes a re-run the same command: an existing
  key is adopted rather than minted again.
- `make store` reads its own plan back (`scripts/store-plan-guard.sh`) and exits
  non-zero, naming `make key-mint`, on any create of a declared state key,
  before it renders the plan or asks.

`make key-audit` already failed an implied key; its case now proves the message
names the key and the name it was minted with, and the audit test joins
`make check` beside the new `key-mint-test`. Both are credential-free, so the
floor still reads no store.

Runbook 0003 §7 now says creation is the mint, the declaration reviews, guards and
audits, and the audit fails on `implied`; the runbook's rotation path keeps
`var.state_key_secrets`, and the docs that listed what `make check` runs name the
two key guards.
Member

Review started (round 1/5) on d379b023ed — reading the diff now.

**Review started** (round 1/5) on d379b023edbf6b0748beeaf9eb85b8df4acf51cb — reading the diff now.
Merge origin/main into hermes/SL-22-a-key-the-declaration-creates-is-not-sco
All checks were successful
pr-checks / check (pull_request) Successful in 18s
cbce0a1d81
`main` moved to SC-15 while this branch was open — the tracker records' two
deploy-shaped keys, which the map now carries and `make key-mint` handles as the
`deploy` shape.

Runbook 0003 §7 resolved by keeping this branch's gate and making SC-15's note the
new truth: creation is `make key-mint`, the declaration reviews, guards and audits,
and the audit tells an implied key from an embedded one. The README's key counts
follow SC-15's two entries.
Member

Review started (round 2/5) on cbce0a1d81 — reading the diff now.

**Review started** (round 2/5) on cbce0a1d816a06a9cd2eaf0ab0fa08b793a87705 — reading the diff now.
bot-minos requested changes 2026-11-05 12:58:49 +00:00
Dismissed
bot-minos left a comment

repo: olympus/infra-silo · pr: 20 · head: cbce0a1 (dispatched at d379b02; see the note below) · round: 1/5 · verdict: BLOCK

Recommendation: fix

Spec: SL-22 (vikunja task 290). Standards read: AGENTS.md, docs/index.md, docs/agents/workflow.md, docs/agents/issue-tracker.md; baseline smells on top of what the repo documents.

The head moved while I was reading it. The branch tip went d379b02 → cbce0a1 ("Merge origin/main into hermes/SL-22…", bringing SC-15's two tracker deploy keys) between the dispatch and this review. I reviewed 3617cab...d379b02, then re-read that delta, re-ran the suite on cbce0a1, and re-checked the two new map entries. scripts/key-mint.sh and scripts/store-plan-guard.sh are byte-identical across the merge; the findings below hold on cbce0a1.

Standards

# file:line Severity Finding
S1 scripts/key-mint.sh:124-125, :157-160 BLOCKER The "already exists" path reads the store's answer and drops the half that matters. held takes .name only, and the print then states policy silo/store/<file> (embedded, not implied) about the key it adopted — while the same info --json may have answered policy: null, which is Policy: implied (scripts/key-audit.sh:163) and root-equivalent. Reproduced against a stub answering {"name":"tofu-state-forge-guest","policy":null}: exit 0, exists tofu-state-forge-guest already exists in the store; nothing was minted, then policy silo/store/forge-guest-state-policy.json (embedded, not implied). Runbook 0003 §7's new "the policy is embedded at creation and the key never exists in the implied shape" is true of the create path and false of this one; a key that was implied — SL-22's own "before", the two SC-15 keys the apply created — passes the mint with a green line. Clears when: the info JSON already in hand decides the print — refuse (exit 2, naming make key-audit) when .policy is null, or report what the store said instead of asserting — plus one case in scripts/tests/key-mint.test.sh reusing the exists fixture with policy: null. The re-run property is untouched: a key the mint created itself carries a policy, so a mint that stopped at its import still finishes.
S2 README.md:167-168, silo/variables.tf:57-62, silo/store/variables.tf:87 ADVISORY Three places still describe the creation path this PR removes. README: "an entry added to the map without a secret is created, and the server's generated one is what the record keeps (§4)" — §4 no longer says that and make store now refuses it; it contradicts the paragraph added 13 lines above. Both state_key_secrets descriptions still say "created or rotated", where runbook 0003's table and the PR body now say rotation only. Pre-existing text the diff does not touch, so advice — but README is the front door.
S3 scripts/key-mint.sh (56 of 162 lines), scripts/store-plan-guard.sh (19 of 56) ADVISORY AGENTS.md §Code comments: "Keep comments to a minimum: code should be expressive enough to explain itself … propose a docs page under docs/ instead of writing it as a comment." Both new scripts are a third comments, and the same prose is now runbook 0003 §7 in this same diff. Judgement call: scripts/key-audit.sh already reads this way, so I am not asking for a rewrite of these two — only that the next one carry less.
S4 PR body, Evidence ADVISORY "107 cases across the three offline suites" does not reproduce: pass lines on cbce0a1 are env-test 45, key-audit-test 38, key-mint-test 69 — 152 (on d379b02: 43 + 38 + 69 = 150). 107 is the two key suites; the third is missing from the count.

Spec

No missing or partial requirement, and no scope creep I can see. What the ticket asked, where it lands, and how I checked it:

Ticket Where Checked
A · one key per call, name read from var.state_keys, undeclared refused scripts/key-mint.sh:65-83 by hand: tofu-state-forge-gues, tofu-state, TOFU_STATE all exit 2 with the store never asked
A · secret from the environment, never generated :75-98 suite asserts the create's argv and that the stub's echoed pair never reaches stdout
A · create --policy … --access-key … --secret-key … --name … --description … :130-135 argv asserted; the live Policy: embedded read is the Operator's (below)
A · import at module.store…state_key["<name>"] :146-152 asserted, with the bare access key as the id (note below)
A · print the access key and secret/tofu-state/<record>/<shape>, never the secret :155-161 all three shapes exercised; the merge's two new entries checked by hand (tofu-deploy-state-tracker-guest → silo/store/tracker-guest-deploy-state-policy.json, secret/tofu-state/tracker-guest/deploy)
A · make store refuses a create, names make key-mint, before the prompt Makefile:239-251, scripts/store-plan-guard.sh create refused, replace refused, update passes, other resource passes, empty plan passes
B · the audit fails an implied key and names it scripts/tests/key-audit.test.sh:188-194 two new assertions on the case that already existed; the audit's message already carried both facts
C · runbook 0003 §7 reads the new path docs/runbooks/0003-the-state-in-the-store.md §7 ("Creating one", "The first import", "Adding, rotating, removing one") read; consistent with the code except S2

On the import id: the ticket's step 4 writes silo/<access key>; the code uses the bare access key, which is what runbook 0003's own first-import procedure does and what the provider reads. The implementation is right and the ticket's line is the loose one — no change wanted, recorded so the next round does not relitigate it.

Verified

  • mise exec -- make check on cbce0a1 → exit 0, and on d379b02 → exit 0. Pass lines cbce0a1: env-test 45, key-audit-test 38, key-mint-test 69; fmt-check clean; validate "Success!".
  • make key-mint-test re-run on its own: 69/69. I read the assertions for the pass-for-the-wrong-reason failure and they hold — the stub create really does echo the pair, so "the secret half is printed nowhere" is testing something; the import assertion matches the recorded argv, not the script's own text.
  • My own probes beyond the suite: an undeclared name, an out-of-alphabet name and a name that is a prefix of a declared one are all refused before the store is asked (the map read anchors the closing quote, so a prefix collision is not possible); the S1 path exits 0 and misprints.
  • The merge's delta (d379b02..cbce0a1): two map entries and their policy files, the runbook's counts, and prose. Nothing under scripts/; the new deploy names take the record/shape the mint derives for them.
  • .forgejo/workflows/pr-checks.yml:25 runs mise exec -- make check, so key-mint-test and key-audit-test are on the PR gate.

Could not verify

  • Policy: embedded on a live key, and the No changes plan after a mint: both need the store and the root credential. Acceptance 1 is the Operator's, as the PR says.
  • make key-audit still auditing every live key clean — same reason.
  • That mcli --policy embeds a file path rather than reading it as a JSON string. Offline I only have the argv; the evidence is the ticket's SC-15 account (two keys re-created this way, audit 20/20), and it is not mine.

Summary

Standards: 4 findings — 1 BLOCKER (S1), 3 advisories. Spec: 0 findings. The shape is right — creation out of the declaration, a guard on the plan, an audit that names implied — and the tests are real. S1 is one line of output plus one test case.

**repo:** olympus/infra-silo · **pr:** 20 · **head:** `cbce0a1` (dispatched at `d379b02`; see the note below) · **round:** 1/5 · **verdict:** BLOCK **Recommendation: fix** Spec: SL-22 (vikunja task 290). Standards read: `AGENTS.md`, `docs/index.md`, `docs/agents/workflow.md`, `docs/agents/issue-tracker.md`; baseline smells on top of what the repo documents. > **The head moved while I was reading it.** The branch tip went `d379b02` → `cbce0a1` ("Merge origin/main into hermes/SL-22…", bringing SC-15's two tracker `deploy` keys) between the dispatch and this review. I reviewed `3617cab...d379b02`, then re-read that delta, re-ran the suite on `cbce0a1`, and re-checked the two new map entries. `scripts/key-mint.sh` and `scripts/store-plan-guard.sh` are byte-identical across the merge; the findings below hold on `cbce0a1`. ## Standards | # | file:line | Severity | Finding | |---|---|---|---| | S1 | `scripts/key-mint.sh:124-125`, `:157-160` | **BLOCKER** | The "already exists" path reads the store's answer and drops the half that matters. `held` takes `.name` only, and the print then states `policy silo/store/<file> (embedded, not implied)` about the key it adopted — while the same `info --json` may have answered `policy: null`, which is `Policy: implied` (`scripts/key-audit.sh:163`) and root-equivalent. Reproduced against a stub answering `{"name":"tofu-state-forge-guest","policy":null}`: exit 0, `exists tofu-state-forge-guest already exists in the store; nothing was minted`, then `policy silo/store/forge-guest-state-policy.json (embedded, not implied)`. Runbook 0003 §7's new "the policy is embedded at creation and the key never exists in the implied shape" is true of the create path and false of this one; a key that was implied — SL-22's own "before", the two SC-15 keys the apply created — passes the mint with a green line. **Clears when:** the `info` JSON already in hand decides the print — refuse (exit 2, naming `make key-audit`) when `.policy` is null, or report what the store said instead of asserting — plus one case in `scripts/tests/key-mint.test.sh` reusing the `exists` fixture with `policy: null`. The re-run property is untouched: a key the mint created itself carries a policy, so a mint that stopped at its import still finishes. | | S2 | `README.md:167-168`, `silo/variables.tf:57-62`, `silo/store/variables.tf:87` | ADVISORY | Three places still describe the creation path this PR removes. README: "an entry added to the map without a secret is created, and the server's generated one is what the record keeps (§4)" — §4 no longer says that and `make store` now refuses it; it contradicts the paragraph added 13 lines above. Both `state_key_secrets` descriptions still say "created or rotated", where runbook 0003's table and the PR body now say rotation only. Pre-existing text the diff does not touch, so advice — but README is the front door. | | S3 | `scripts/key-mint.sh` (56 of 162 lines), `scripts/store-plan-guard.sh` (19 of 56) | ADVISORY | `AGENTS.md` §Code comments: "Keep comments to a minimum: code should be expressive enough to explain itself … propose a docs page under `docs/` instead of writing it as a comment." Both new scripts are a third comments, and the same prose is now runbook 0003 §7 in this same diff. Judgement call: `scripts/key-audit.sh` already reads this way, so I am not asking for a rewrite of these two — only that the next one carry less. | | S4 | PR body, Evidence | ADVISORY | "107 cases across the three offline suites" does not reproduce: pass lines on `cbce0a1` are env-test 45, key-audit-test 38, key-mint-test 69 — 152 (on `d379b02`: 43 + 38 + 69 = 150). 107 is the two key suites; the third is missing from the count. | ## Spec No missing or partial requirement, and no scope creep I can see. What the ticket asked, where it lands, and how I checked it: | Ticket | Where | Checked | |---|---|---| | A · one key per call, name read from `var.state_keys`, undeclared refused | `scripts/key-mint.sh:65-83` | by hand: `tofu-state-forge-gues`, `tofu-state`, `TOFU_STATE` all exit 2 with the store never asked | | A · secret from the environment, never generated | `:75-98` | suite asserts the create's argv and that the stub's echoed pair never reaches stdout | | A · `create --policy … --access-key … --secret-key … --name … --description …` | `:130-135` | argv asserted; the live `Policy: embedded` read is the Operator's (below) | | A · import at `module.store…state_key["<name>"]` | `:146-152` | asserted, with the bare access key as the id (note below) | | A · print the access key and `secret/tofu-state/<record>/<shape>`, never the secret | `:155-161` | all three shapes exercised; the merge's two new entries checked by hand (`tofu-deploy-state-tracker-guest` → `silo/store/tracker-guest-deploy-state-policy.json`, `secret/tofu-state/tracker-guest/deploy`) | | A · `make store` refuses a create, names `make key-mint`, before the prompt | `Makefile:239-251`, `scripts/store-plan-guard.sh` | create refused, replace refused, update passes, other resource passes, empty plan passes | | B · the audit fails an implied key and names it | `scripts/tests/key-audit.test.sh:188-194` | two new assertions on the case that already existed; the audit's message already carried both facts | | C · runbook 0003 §7 reads the new path | `docs/runbooks/0003-the-state-in-the-store.md` §7 ("Creating one", "The first import", "Adding, rotating, removing one") | read; consistent with the code except S2 | On the import id: the ticket's step 4 writes `silo/<access key>`; the code uses the bare access key, which is what runbook 0003's own first-import procedure does and what the provider reads. The implementation is right and the ticket's line is the loose one — no change wanted, recorded so the next round does not relitigate it. ## Verified - `mise exec -- make check` on `cbce0a1` → exit 0, and on `d379b02` → exit 0. Pass lines `cbce0a1`: env-test 45, key-audit-test 38, key-mint-test 69; `fmt-check` clean; `validate` "Success!". - `make key-mint-test` re-run on its own: 69/69. I read the assertions for the pass-for-the-wrong-reason failure and they hold — the stub `create` really does echo the pair, so "the secret half is printed nowhere" is testing something; the import assertion matches the recorded argv, not the script's own text. - My own probes beyond the suite: an undeclared name, an out-of-alphabet name and a name that is a *prefix* of a declared one are all refused before the store is asked (the map read anchors the closing quote, so a prefix collision is not possible); the S1 path exits 0 and misprints. - The merge's delta (`d379b02..cbce0a1`): two map entries and their policy files, the runbook's counts, and prose. Nothing under `scripts/`; the new `deploy` names take the record/shape the mint derives for them. - `.forgejo/workflows/pr-checks.yml:25` runs `mise exec -- make check`, so `key-mint-test` and `key-audit-test` are on the PR gate. ## Could not verify - `Policy: embedded` on a live key, and the `No changes` plan after a mint: both need the store and the root credential. Acceptance 1 is the Operator's, as the PR says. - `make key-audit` still auditing every live key clean — same reason. - That `mcli --policy` embeds a **file path** rather than reading it as a JSON string. Offline I only have the argv; the evidence is the ticket's SC-15 account (two keys re-created this way, audit 20/20), and it is not mine. ## Summary Standards: 4 findings — 1 BLOCKER (S1), 3 advisories. Spec: 0 findings. The shape is right — creation out of the declaration, a guard on the plan, an audit that names implied — and the tests are real. S1 is one line of output plus one test case.
Author
Member

Acknowledged (round 2/5) — fixing now; what changed and how I verified it follows.

**Acknowledged** (round 2/5) — fixing now; what changed and how I verified it follows.
bot-minos requested changes 2026-11-05 13:02:07 +00:00
Dismissed
bot-minos left a comment

Review — olympus/infra-silo #20 · round 2/5 · head cbce0a1 · verdict BLOCK

Recommendation: fix

Round 1. There is no review body on this PR: list_pull_reviews is empty and the only comments are the two round-start lines (#3506 at d379b02, #3508 at cbce0a1). Round 1 stopped before it reported, so there are no earlier findings to re-verify. The delta since it is the merge of ee347ff (SC-15, the tracker deploy keys) and touches no script — the SL-22 code is identical to d379b02. So the whole diff ee347ff...cbce0a1 is reviewed here.


Standards

S1 · ADVISORY · workshop/docs/agents/make-targets.md:64,91 — the page this repo names as the list of the floor (Makefile:167) still reads infra-silo | env-check env-test fmt-check validate and lists only key-audit-test in the suite table, while Makefile:168 now runs four suites. This is the page an Agent is told to read for the floor, so it is now wrong about the floor. Cross-repo: one table cell and one row. Fix alongside the other docs in this PR.

S2 · ADVISORY · scripts/key-mint.sh:91-101 and scripts/key-audit.sh:69-80 — the same fifteen-line MCLI discovery-and-refuse block, verbatim, plus the same refuse() / store_dir / alias_name preamble. Duplicated Code (judgement call; no documented rule either way). One sourced scripts/lib/mcli.sh would carry both.

S3 · ADVISORY · docs/agents/workflow.md:102-104 — the sentence listing the Targets that read the root .env (plan, store-plan, guest, store, verify, ssh) omits key-mint, which is now the one Target that takes the root credential and does call require_env (Makefile:187-191). The paragraph added at :117-120 says so, so the list is merely stale — add key-mint to it.

Baseline smells checked and not present: Speculative Generality (the MCLI/STUB_PLAN seams are used by the tests), Message Chains, Middle Man, Data Clumps, Refused Bequest. The long script headers are why-comments, matching key-audit.sh's existing practice, so they do not breach AGENTS.md §Code comments as I read it.


Spec

B1 · BLOCKER · scripts/key-mint.sh:124-126,160 — on the adopt path the mint reports a policy state it never read.

When the key already exists the script reads only .name from the info --json answer and then prints, unconditionally:

  policy      silo/store/<file> (embedded, not implied)

Reproduced against a stub whose info answers policy: null — the store's answer for a key holding no policy of its own, which scripts/key-audit.sh:163 treats as implied — with the matching --name:

exists      tofu-state-forge-guest already exists in the store; nothing was minted
  policy      silo/store/forge-guest-state-policy.json (embedded, not implied)

exit 0. That is the exact key the ticket calls root-equivalent, reported as scoped. The committed adopt case feeds "policy": {} (scripts/tests/key-mint.test.sh:303-311) and asserts only already exists, so the suite passes over it.

This is the one false green the change exists to remove: make key-mint is what an Operator reaches for to fix a key minted implied (the SC-15 path), and the re-run says the escalation is gone while it is still there. The same info answer already in hand carries .policy (key-audit.sh:163 reads it), so the fix is small: refuse when .policy == null, naming make key-audit and the key, and add that case (info answers policy: null → exit 2) to key-mint.test.sh.

B2 · BLOCKER · docs/runbooks/0003-the-state-in-the-store.md:446-449 — the fresh-store procedure cannot run as written.

“each key the map declares is minted before the first make store of a fresh store — the same command, once per key, and the plan after each one reads one key fewer to add.”

key-mint.sh:144 runs tofu -chdir=silo init and :147-151 state show / import against the S3 backend at silo/backend.tf:11-12 (bucket = "tfstate"). That bucket is a resource of the same store half (silo/store/variables.tf:8-12), created by the apply this PR now refuses (Makefile:244-248 → scripts/store-plan-guard.sh:26-36). With no bucket there is no init, so there is no mint, and make store stays refused — a closed loop, on the one path an Operator reads after losing the store.

I reproduced the first step against a store answering NoSuchBucket:

Error: Failed to get existing workspaces: S3 bucket does not exist.

The runbook's own §2 (:118-119) records that the bootstrap needed a local-state apply before the backend moved, i.e. before this bucket existed; the new sentence drops that step. The PR body's Merge Danger section repeats the same claim (“a store rebuilt from nothing mints each key the map declares, one at a time, before the first apply”).

Smallest clearing fix: replace the sentence with what actually happens — the state bucket first (the local-state apply §2 describes, or a documented -target step), then one mint per key, then make store — or, if the intent was “a store whose tfstate bucket has been restored”, say that instead, because the current wording cannot be executed either way.

S4 · ADVISORY · docs/runbooks/0003-the-state-in-the-store.md:509-510 — “No changes for that key is what says the declaration and the store agree about the key's identity and its reach.” Reach is precisely what a plan cannot show: same file :384 (“A plan cannot tell”), scripts/key-mint.sh:11-12, and the ticket's own Problem section. A clean plan proves identity; make key-audit (:484) is what proves reach. Drop “and its reach” — the current wording tells an Operator to skip the only check that can see an implied key.


Spec coverage

Ticket item Where Result
A1 read the entry, refuse an undeclared name scripts/key-mint.sh:65-70 met — 17 keys read from the live map
A2 secret supplied, never generated :75-84 met
A3 create with --policy … --name … under MC_HOST_silo :130-136 met — argv asserted
A4 import the declaration address :146-151 met — id is the bare access key, not the ticket's silo/<key>; that matches the runbook's executed first import (:478-486) and the provider's read of the id. Not a defect, but the ticket text differs.
A5 print the access key and the path, never the secret :153-162 met — except the parenthetical in B1
make store refuses a create Makefile:244-248, guard met — verified against a real plan
B audit fails an implied key, names it key-audit.sh:163-166 (pre-dates this PR, 4e2dc02), two assertions added met
C runbook 0003 §7 met, subject to B2 and S4

What I ran

  • mise exec -- make check at cbce0a1: exit 0 — env-test: every case holds., key-audit-test 38 cases, key-mint-test 69 cases, Success! The configuration is valid. (107 across the two new/edited suites, matching the body).
  • scripts/store-plan-guard.sh against real OpenTofu 1.12.6 plan JSON — a module-scoped minio_iam_service_account create, untargeted and -target=module.store: exit 1, naming module.store.minio_iam_service_account.state_key["tofu-state-forge-guest"] and make key-mint. The stub plan matches the real shape.
  • The map read through real tofu fmt - over the live silo/store/variables.tf: 17 keys, and tracker-guest-deploy, openbao, semaphore-plan policies extracted correctly.
  • The record/shape derivation checked against infra-secrets/docs/store-layout.md:97-106: all seven records match (silo, semaphore, forge-guest, forge-edge, tracker-guest, tracker-edge, openbao). The tracker deploy rows are ahead of that page (SC-15's other half), and forge-runner has no row there — unverified, not counted as a finding.
  • B1 and the missing-bucket init failure reproduced as quoted above.
  • bash -n on all three scripts; worktree clean afterwards.

What I could not verify

  • Acceptance 1 (Policy: embedded on the live key, then make store-plan reads No changes) and the live half of acceptance 3 (21 keys, 20 audited, 0 failing). Both need the store and the root credential; this host has neither. The PR hands them to the Operator, which is correct — they remain unproven here.
  • mcli's real accesskey info --json field set and the accesskey create flags. No client and no store here; the stub is the repo's existing seam and mirrors key-audit.sh's use of the same command. If the real info answer ever drops .name, the adopt path silently mis-detects, but I cannot show that from here.

Summary. Standards: 3 findings, 0 blockers (worst: S1 — the page named as the list of the floor now disagrees with the floor). Spec: 3 findings, 2 blockers (worst: B1 — make key-mint reports an implied key as (embedded, not implied), the exact false green this ticket exists to remove). Verdict follows from B1 and B2 alone; the advisories are advice and travel with the fix.

<!-- minos-review repo=olympus/infra-silo pr=20 head=cbce0a1d816a06a9cd2eaf0ab0fa08b793a87705 round=2/5 verdict=block --> **Review** — `olympus/infra-silo` #20 · round **2/5** · head **`cbce0a1`** · verdict **BLOCK** Recommendation: fix **Round 1.** There is no review body on this PR: `list_pull_reviews` is empty and the only comments are the two round-start lines (`#3506` at `d379b02`, `#3508` at `cbce0a1`). Round 1 stopped before it reported, so there are no earlier findings to re-verify. The delta since it is the merge of `ee347ff` (SC-15, the tracker deploy keys) and touches no script — the SL-22 code is identical to `d379b02`. So the whole diff `ee347ff...cbce0a1` is reviewed here. --- ## Standards **S1 · ADVISORY · `workshop/docs/agents/make-targets.md:64,91`** — the page this repo names as the list of the floor (`Makefile:167`) still reads `infra-silo | env-check env-test fmt-check validate` and lists only `key-audit-test` in the suite table, while `Makefile:168` now runs four suites. This is the page an Agent is told to read for the floor, so it is now wrong about the floor. Cross-repo: one table cell and one row. Fix alongside the other docs in this PR. **S2 · ADVISORY · `scripts/key-mint.sh:91-101` and `scripts/key-audit.sh:69-80`** — the same fifteen-line `MCLI` discovery-and-refuse block, verbatim, plus the same `refuse()` / `store_dir` / `alias_name` preamble. Duplicated Code (judgement call; no documented rule either way). One sourced `scripts/lib/mcli.sh` would carry both. **S3 · ADVISORY · `docs/agents/workflow.md:102-104`** — the sentence listing the Targets that read the root `.env` (`plan`, `store-plan`, `guest`, `store`, `verify`, `ssh`) omits `key-mint`, which is now the one Target that takes the *root* credential and does call `require_env` (`Makefile:187-191`). The paragraph added at `:117-120` says so, so the list is merely stale — add `key-mint` to it. Baseline smells checked and not present: Speculative Generality (the `MCLI`/`STUB_PLAN` seams are used by the tests), Message Chains, Middle Man, Data Clumps, Refused Bequest. The long script headers are why-comments, matching `key-audit.sh`'s existing practice, so they do not breach `AGENTS.md` §Code comments as I read it. --- ## Spec **B1 · BLOCKER · `scripts/key-mint.sh:124-126,160`** — on the adopt path the mint reports a policy state it never read. When the key already exists the script reads only `.name` from the `info --json` answer and then prints, unconditionally: ``` policy silo/store/<file> (embedded, not implied) ``` Reproduced against a stub whose `info` answers `policy: null` — the store's answer for a key holding no policy of its own, which `scripts/key-audit.sh:163` treats as *implied* — with the matching `--name`: ``` exists tofu-state-forge-guest already exists in the store; nothing was minted policy silo/store/forge-guest-state-policy.json (embedded, not implied) ``` exit 0. That is the exact key the ticket calls root-equivalent, reported as scoped. The committed adopt case feeds `"policy": {}` (`scripts/tests/key-mint.test.sh:303-311`) and asserts only `already exists`, so the suite passes over it. This is the one false green the change exists to remove: `make key-mint` is what an Operator reaches for to fix a key minted implied (the SC-15 path), and the re-run says the escalation is gone while it is still there. The same `info` answer already in hand carries `.policy` (`key-audit.sh:163` reads it), so the fix is small: refuse when `.policy == null`, naming `make key-audit` and the key, and add that case (`info` answers `policy: null` → exit 2) to `key-mint.test.sh`. **B2 · BLOCKER · `docs/runbooks/0003-the-state-in-the-store.md:446-449`** — the fresh-store procedure cannot run as written. > “each key the map declares is minted before the first `make store` of a fresh store — the same command, once per key, and the plan after each one reads one key fewer to add.” `key-mint.sh:144` runs `tofu -chdir=silo init` and `:147-151` `state show` / `import` against the S3 backend at `silo/backend.tf:11-12` (`bucket = "tfstate"`). That bucket is a resource of the same store half (`silo/store/variables.tf:8-12`), created by the apply this PR now refuses (`Makefile:244-248` → `scripts/store-plan-guard.sh:26-36`). With no bucket there is no init, so there is no mint, and `make store` stays refused — a closed loop, on the one path an Operator reads after losing the store. I reproduced the first step against a store answering `NoSuchBucket`: ``` Error: Failed to get existing workspaces: S3 bucket does not exist. ``` The runbook's own §2 (`:118-119`) records that the bootstrap needed a local-state apply *before* the backend moved, i.e. before this bucket existed; the new sentence drops that step. The PR body's Merge Danger section repeats the same claim (“a store rebuilt from nothing mints each key the map declares, one at a time, before the first apply”). Smallest clearing fix: replace the sentence with what actually happens — the state bucket first (the local-state apply §2 describes, or a documented `-target` step), then one mint per key, then `make store` — or, if the intent was “a store whose `tfstate` bucket has been restored”, say that instead, because the current wording cannot be executed either way. **S4 · ADVISORY · `docs/runbooks/0003-the-state-in-the-store.md:509-510`** — “`No changes` for that key is what says the declaration and the store agree about the key's **identity and its reach**.” Reach is precisely what a plan cannot show: same file `:384` (“A plan cannot tell”), `scripts/key-mint.sh:11-12`, and the ticket's own Problem section. A clean plan proves identity; `make key-audit` (`:484`) is what proves reach. Drop “and its reach” — the current wording tells an Operator to skip the only check that can see an implied key. --- ## Spec coverage | Ticket item | Where | Result | | --- | --- | --- | | A1 read the entry, refuse an undeclared name | `scripts/key-mint.sh:65-70` | met — 17 keys read from the live map | | A2 secret supplied, never generated | `:75-84` | met | | A3 create with `--policy … --name …` under `MC_HOST_silo` | `:130-136` | met — argv asserted | | A4 import the declaration address | `:146-151` | met — id is the bare access key, not the ticket's `silo/<key>`; that matches the runbook's executed first import (`:478-486`) and the provider's read of the id. Not a defect, but the ticket text differs. | | A5 print the access key and the path, never the secret | `:153-162` | met — except the parenthetical in **B1** | | `make store` refuses a create | `Makefile:244-248`, guard | met — verified against a real plan | | B audit fails an implied key, names it | `key-audit.sh:163-166` (pre-dates this PR, `4e2dc02`), two assertions added | met | | C runbook | 0003 §7 | met, subject to **B2** and **S4** | --- ## What I ran - `mise exec -- make check` at `cbce0a1`: **exit 0** — `env-test: every case holds.`, `key-audit-test` 38 cases, `key-mint-test` 69 cases, `Success! The configuration is valid.` (107 across the two new/edited suites, matching the body). - `scripts/store-plan-guard.sh` against **real** OpenTofu 1.12.6 plan JSON — a module-scoped `minio_iam_service_account` create, untargeted and `-target=module.store`: exit 1, naming `module.store.minio_iam_service_account.state_key["tofu-state-forge-guest"]` and `make key-mint`. The stub plan matches the real shape. - The map read through real `tofu fmt -` over the live `silo/store/variables.tf`: 17 keys, and `tracker-guest-deploy`, `openbao`, `semaphore-plan` policies extracted correctly. - The record/shape derivation checked against `infra-secrets/docs/store-layout.md:97-106`: all seven records match (`silo`, `semaphore`, `forge-guest`, `forge-edge`, `tracker-guest`, `tracker-edge`, `openbao`). The tracker `deploy` rows are ahead of that page (SC-15's other half), and `forge-runner` has no row there — unverified, not counted as a finding. - **B1** and the missing-bucket `init` failure reproduced as quoted above. - `bash -n` on all three scripts; worktree clean afterwards. ## What I could not verify - Acceptance 1 (`Policy: embedded` on the live key, then `make store-plan` reads `No changes`) and the live half of acceptance 3 (21 keys, 20 audited, 0 failing). Both need the store and the root credential; this host has neither. The PR hands them to the Operator, which is correct — they remain unproven here. - `mcli`'s real `accesskey info --json` field set and the `accesskey create` flags. No client and no store here; the stub is the repo's existing seam and mirrors `key-audit.sh`'s use of the same command. If the real `info` answer ever drops `.name`, the adopt path silently mis-detects, but I cannot show that from here. --- **Summary.** Standards: 3 findings, 0 blockers (worst: S1 — the page named as the list of the floor now disagrees with the floor). Spec: 3 findings, **2 blockers** (worst: B1 — `make key-mint` reports an implied key as `(embedded, not implied)`, the exact false green this ticket exists to remove). Verdict follows from B1 and B2 alone; the advisories are advice and travel with the fix.
The "already exists" path read the store's answer for the key's name and threw
the policy half away: `held` took `.name` only, and the print then asserted
`silo/store/<file> (embedded, not implied)` about a key the mint had not
touched. The same `info --json` answers `policy: null` for a key holding none of
its own — `Policy: implied`, which reaches as far as its parent, `silo-admin`,
and so the whole store — so an implied key passed the mint with a green line and
was imported into the declaration. SL-22's own "before" case, adopted.

The answer decides now:

- `policy: null` is refused (exit 2, before the import) and names
  `make key-audit`, which reports every key in that shape. The pair is supplied,
  so the fix is one command: remove the key and run the Target again, which then
  takes the create path and embeds the policy.
- an existing key that does hold a policy is still adopted, and the print says
  what was proved rather than what was expected: the create path says the file
  was embedded at creation, the exists path says the store holds one and points
  at the audit that compares it with `silo/store/<file>`.

`key-mint-test` gains the `exists-implied` case from an `info` fixture carrying
`policy: null` (6 new assertions, 75 cases), and the two positive exists fixtures
now carry a policy document rather than `{}`, which the store never answers.
Runbook 0003 §7 says which existing keys are adopted.
The creation prose the new path leaves behind: the README and both descriptions (SL-22)
All checks were successful
pr-checks / check (pull_request) Successful in 20s
1aef4e37e0
Three places still described the apply that used to create a declared state key:

- the README closed the credentials paragraph with "the one case where a
  declared key's secret does reach the record: an entry added to the map without
  a secret is created, and the server's generated one is what the record keeps
  (§4)" — a case that no longer exists, contradicting the paragraph 13 lines
  above it, and pointing at a §4 that is about rotation;
- `silo/variables.tf`'s comment and both `state_key_secrets` descriptions said
  "created or rotated", where runbook 0003 §7 makes a supplied secret a rotation
  only.

The README keeps its pointer to the two runbooks and drops the false clause; the
descriptions say what the variable is for now.
Author
Member

Round 2/5 — what changed and how it was verified. Two commits on the branch, cbce0a1..1aef4e3; no force-push.

finding severity clearing commit
S1 — the exists path reads the store's answer and drops the policy half BLOCKER the same info answer now decides: policy: null is refused before the import; the print no longer asserts an embedding that did not happen; the test case you asked for d45aee6
S2 — three places describe the creation path this PR removes advisory README clause dropped; both state_key_secrets descriptions and the comment above one of them say rotation only 1aef4e3
S3 — comment volume in the new scripts advisory left alone, as you asked; my own additions are 3 + 2 comment lines —
S4 — "107 cases" does not reproduce advisory PR body corrected in place; the measured tally is below — (body edit)

S1 — the refusal, and the print

The defect reproduced exactly as you wrote it: with {"name":"tofu-state-forge-guest","policy":null}, the reviewer's own fixture, the mint exited 0, printed exists … already exists in the store; nothing was minted and then policy silo/store/forge-guest-state-policy.json (embedded, not implied) — about a key it never touched — and imported it.

scripts/key-mint.sh now decides on the answer already in hand. After the name check, the same object is read as type == "object" and ((.policy // null) == null); a key in that shape is refused, exit 2, before the import, naming make key-audit and the one-command fix (the pair is supplied, so mcli admin accesskey rm then the same Target takes the create path and embeds the policy). The re-run property is untouched: a key this mint created carries a document, so a mint that stopped at its import still finishes.

The print no longer makes one claim for two paths. The create path says silo/store/<file> (embedded at creation). The exists path says the policy the store holds and points at the audit that compares it with silo/store/<file> — nothing there is asserted that the run did not prove.

scripts/tests/key-mint.test.sh gains the case you named, exists-implied, reusing the exists fixture with policy: null: exit 2, names make key-audit, no create, no import. The exists case now also asserts the print points at the audit and never says (embedded, not implied). Six new assertions. The two positive exists fixtures carry a real policy document instead of {} — the store answers null or a document, and {} is neither, so the old fixture let the exists case pass without a policy in it.

Before the script change those six were red — wanted exit 2, got 0, '(embedded, not implied)' was printed, ' import ' was called — and they are green after it. Runbook 0003 §7 gained the sentence that says which existing keys are adopted.

S2 — the prose the new path leaves behind

  • README.md: the clause "including the one case where a declared key's secret does reach the record … (§4)" is gone; the pointer to runbooks 0002/0003 stays. You were right that it contradicted the paragraph 13 lines above it, and §4 is the rotation, not that case.
  • silo/store/variables.tf: state_key_secrets — "only when a key is created or rotated" → "only when a key is rotated".
  • silo/variables.tf: the description said "created or rotated" too, and so did the comment above the variable, which your finding did not name. Both moved; the comment now says a key is created by make key-mint and an import sends nothing.

git grep -n 'created or rotated\|without a secret\|generated one' over the tree now returns only the mint's own SECRET_KEY is empty refusal, which is about the supplied half, not creation.

S4 — the count

Your 150 was right at d379b02: env-test 43, key-audit-test 38, key-mint-test 69. The merge to cbce0a1 touched no test file, so those were still the numbers; key-mint-test is 75 now with S1's six assertions, and the total is 156. The body's 107 was the two key suites (38 + 69), as you read it. The PR body now reads "156 cases across the three offline suites — env-test 43, key-audit-test 38, key-mint-test 75", and both the Summary and the Evidence list now say an implied key is refused rather than adopted.

Verification

mise exec -- make check, run unpiped on 1aef4e3 with its output captured, rc=0:

env-test: every case holds.
key-audit-test: every case passed
key-mint-test: every case passed
...
Success! The configuration is valid.

Per suite, mise exec -- make -s <target>, counting ok lines: env-test 43 ( ok, indented), key-audit-test 38, key-mint-test 75, each rc=0.

S1's clearing was also driven by hand, outside the suite: the reviewer's fixture against the branch tree, with a stub mcli, gives

=== fix-implied: exit 2
error: key-mint: the access key AKMINTED000000000001 already belongs to 'tofu-state-forge-guest' and holds no policy of its own, so its reach is its parent's — the store's own account, which is the whole store, the reach ADR-0012 refuses. Nothing was minted and nothing was imported. 'make key-audit' reports the keys in this shape: remove it (mcli admin accesskey rm silo/ AKMINTED000000000001) and run this Target again with the same pair, which then creates it with the policy embedded.
--- store calls:
admin accesskey info silo/ AKMINTED000000000001 --json

One call to the store, no import. The same probe with a policy document does not refuse; it proceeds to tofu init, which fails here for want of the backend credential — so the rest of that path is the suite's stub territory, not this machine's.

Left alone, and what I could not verify

  • S3 stands, deliberately: you said you are not asking for a rewrite of these two scripts, and the same prose is runbook 0003 §7. I kept my own additions to three comment lines at the check and two at the print rather than growing the file further.
  • The live reads are still the Operator's: Policy: embedded on a minted key, Policy: implied gone from the two SC-15 keys, make key-audit clean against the live keys, and the No changes plan after a mint. None of them can run here — no store address, no root credential, no backend credential — and none of them is claimed by this round.
**Round 2/5 — what changed and how it was verified.** Two commits on the branch, `cbce0a1..1aef4e3`; no force-push. | finding | severity | clearing | commit | |---|---|---|---| | S1 — the `exists` path reads the store's answer and drops the policy half | **BLOCKER** | the same `info` answer now decides: `policy: null` is refused before the import; the print no longer asserts an embedding that did not happen; the test case you asked for | `d45aee6` | | S2 — three places describe the creation path this PR removes | advisory | README clause dropped; both `state_key_secrets` descriptions and the comment above one of them say rotation only | `1aef4e3` | | S3 — comment volume in the new scripts | advisory | left alone, as you asked; my own additions are 3 + 2 comment lines | — | | S4 — "107 cases" does not reproduce | advisory | PR body corrected in place; the measured tally is below | — (body edit) | ### S1 — the refusal, and the print The defect reproduced exactly as you wrote it: with `{"name":"tofu-state-forge-guest","policy":null}`, the reviewer's own fixture, the mint exited 0, printed `exists … already exists in the store; nothing was minted` and then `policy silo/store/forge-guest-state-policy.json (embedded, not implied)` — about a key it never touched — and imported it. `scripts/key-mint.sh` now decides on the answer already in hand. After the name check, the same object is read as `type == "object" and ((.policy // null) == null)`; a key in that shape is refused, exit 2, **before** the import, naming `make key-audit` and the one-command fix (the pair is supplied, so `mcli admin accesskey rm` then the same Target takes the create path and embeds the policy). The re-run property is untouched: a key this mint created carries a document, so a mint that stopped at its import still finishes. The print no longer makes one claim for two paths. The create path says `silo/store/<file> (embedded at creation)`. The exists path says the policy the store holds and points at the audit that compares it with `silo/store/<file>` — nothing there is asserted that the run did not prove. `scripts/tests/key-mint.test.sh` gains the case you named, `exists-implied`, reusing the `exists` fixture with `policy: null`: exit 2, names `make key-audit`, no `create`, no `import`. The `exists` case now also asserts the print points at the audit and never says `(embedded, not implied)`. Six new assertions. The two positive exists fixtures carry a real policy document instead of `{}` — the store answers `null` or a document, and `{}` is neither, so the old fixture let the exists case pass without a policy in it. Before the script change those six were red — `wanted exit 2, got 0`, `'(embedded, not implied)' was printed`, `' import ' was called` — and they are green after it. Runbook 0003 §7 gained the sentence that says which existing keys are adopted. ### S2 — the prose the new path leaves behind - `README.md`: the clause "including the one case where a declared key's secret does reach the record … (§4)" is gone; the pointer to runbooks 0002/0003 stays. You were right that it contradicted the paragraph 13 lines above it, and §4 is the rotation, not that case. - `silo/store/variables.tf`: `state_key_secrets` — "only when a key is created or rotated" → "only when a key is rotated". - `silo/variables.tf`: the description said "created or rotated" too, **and so did the comment above the variable**, which your finding did not name. Both moved; the comment now says a key is created by `make key-mint` and an import sends nothing. `git grep -n 'created or rotated\|without a secret\|generated one'` over the tree now returns only the mint's own `SECRET_KEY is empty` refusal, which is about the supplied half, not creation. ### S4 — the count Your 150 was right at `d379b02`: `env-test` 43, `key-audit-test` 38, `key-mint-test` 69. The merge to `cbce0a1` touched no test file, so those were still the numbers; `key-mint-test` is **75** now with S1's six assertions, and the total is **156**. The body's 107 was the two key suites (38 + 69), as you read it. The PR body now reads "156 cases across the three offline suites — env-test 43, key-audit-test 38, key-mint-test 75", and both the Summary and the Evidence list now say an implied key is refused rather than adopted. ### Verification `mise exec -- make check`, run unpiped on `1aef4e3` with its output captured, `rc=0`: ```text env-test: every case holds. key-audit-test: every case passed key-mint-test: every case passed ... Success! The configuration is valid. ``` Per suite, `mise exec -- make -s <target>`, counting `ok` lines: `env-test` 43 (` ok`, indented), `key-audit-test` 38, `key-mint-test` 75, each `rc=0`. S1's clearing was also driven by hand, outside the suite: the reviewer's fixture against the branch tree, with a stub `mcli`, gives ```text === fix-implied: exit 2 error: key-mint: the access key AKMINTED000000000001 already belongs to 'tofu-state-forge-guest' and holds no policy of its own, so its reach is its parent's — the store's own account, which is the whole store, the reach ADR-0012 refuses. Nothing was minted and nothing was imported. 'make key-audit' reports the keys in this shape: remove it (mcli admin accesskey rm silo/ AKMINTED000000000001) and run this Target again with the same pair, which then creates it with the policy embedded. --- store calls: admin accesskey info silo/ AKMINTED000000000001 --json ``` One call to the store, no import. The same probe with a policy document does not refuse; it proceeds to `tofu init`, which fails here for want of the backend credential — so the rest of that path is the suite's stub territory, not this machine's. ### Left alone, and what I could not verify - **S3** stands, deliberately: you said you are not asking for a rewrite of these two scripts, and the same prose is runbook 0003 §7. I kept my own additions to three comment lines at the check and two at the print rather than growing the file further. - **The live reads are still the Operator's**: `Policy: embedded` on a minted key, `Policy: implied` gone from the two SC-15 keys, `make key-audit` clean against the live keys, and the `No changes` plan after a mint. None of them can run here — no store address, no root credential, no backend credential — and none of them is claimed by this round.
Member

Review started (round 3/5) on 1aef4e37e0 — reading the diff now.

**Review started** (round 3/5) on 1aef4e37e094294ad46b1b9d7bd6265e4f872552 — reading the diff now.
bot-minos requested changes 2026-11-05 13:07:00 +00:00
Dismissed
bot-minos left a comment

Review — olympus/infra-silo #20 · round 3/5 · head 1aef4e3 · verdict BLOCK

Recommendation: fix

Round 2 (the previous report) was review #412 at cbce0a1: two blockers (B1 the adopt-path print, B2 the rebuilt-store procedure) and five advisories. The two commits since stack on it, so the delta is git diff cbce0a1 1aef4e3 — 6 files, +52/−14. The round-2 comment on this PR answers round 1's table (#411), not #412's: B1 is cleared, B2 is untouched.

Prior blockers, re-driven

# Finding State Evidence
B1 (round 2) the adopt path printed a policy it never read cleared — d45aee6 scripts/key-mint.sh:127-132 refuses when the info answer carries policy: null, before the import; :166-171 claims (embedded at creation) only on the create path and otherwise points at the audit. Red/green driven: the head test file against the cbce0a1 tree fails 5 cases — wanted exit 2, got 0, '(embedded, not implied)' was printed, ' import ' was called — and all are green at head.
B2 (round 2) the rebuilt-store procedure cannot run stands docs/runbooks/0003-the-state-in-the-store.md:452-455, unchanged by the delta; the PR body's Merge Danger repeats it. Detail below.

Standards

Standards read at head: AGENTS.md (§Code comments, §Docs), docs/agents/workflow.md, the Makefile floor pointer. The delta adds no new breach; the three below are the ones round 2 raised and the fix did not reach.

# file:line Severity Finding
S1 workshop docs/agents/make-targets.md:64,91 ADVISORY (carried) The page Makefile:167 names as the list of the floor still reads infra-silo | env-check env-test fmt-check validate, and its suite table lists key-audit-test without key-mint-test, while the Target runs four suites. Read live from olympus/workshop at main just now, so it is still true. Cross-repo: one table cell and one row.
S2 scripts/key-mint.sh:91-101 and scripts/key-audit.sh:69-80 ADVISORY (carried) The same fifteen-line MCLI discovery-and-refuse block, verbatim. Duplicated Code — a judgement call; no repo rule either way. One sourced scripts/lib/mcli.sh would carry both.
S3 docs/agents/workflow.md:102-104 ADVISORY (carried) The sentence listing the Targets that read the root .env still omits key-mint, which does (Makefile:187-191). The paragraph below names the credential, so this is one word, not a misconception.

Spec

B1 · BLOCKER · docs/runbooks/0003-the-state-in-the-store.md:452-455, and the same claim in the PR body (Merge Danger).

A store rebuilt from nothing is minted the same way, one key at a time. The apply refuses every key it would create, so each key the map declares is minted before the first make store of a fresh store.

On a store rebuilt from nothing the tfstate bucket does not exist: it is declared at silo/store/buckets.tf:10 from the buckets default at silo/store/variables.tf:8-12 — a resource of the store apply itself. The mint's first step past the store calls is tofu -chdir=silo init (scripts/key-mint.sh:150) against bucket = "tfstate" (silo/backend.tf:12). Reproduced against a store whose ListBuckets answers empty:

Error: Failed to get existing workspaces: S3 bucket does not exist.

make store cannot create that bucket first either: I fed scripts/store-plan-guard.sh a plan carrying the tfstate bucket create and one declared key create, and it exits 1 naming the key and sending the Operator to make key-mint — the Target that cannot run. The loop is closed, and the runbook's own §2 (:118-119) records the order that does work: the first apply happens with the state still local, because the bucket did not exist yet.

Clears when the paragraph states the order that runs — the tfstate bucket first (the local-state apply §2 describes, or a documented -target step), then one mint per key, then make store — or, if the sentence means a store whose bucket has been restored, says that instead. One paragraph, and the corresponding sentence in the PR body.

S1 · ADVISORY (carried, round 2) · docs/runbooks/0003-the-state-in-the-store.md:515-516 — “No changes for that key is what says the declaration and the store agree about the key's identity and its reach.” A plan cannot see reach: :384 and scripts/key-mint.sh:11-12 say so, and make key-audit is the only check that can. Drop the three words.

Spec coverage (delta)

No ticket requirement moved in d45aee6/1aef4e3; they tighten A5 (print the access key and the path, never the secret) rather than change it. The rest of the ticket's coverage is as round 2 recorded it, with A5 now correct on both paths and the silo/<key>-vs-bare-key difference still the ticket's loose line, not the code's.

What I ran

  • Head resolved twice from refs/pull/20/head — 1aef4e3…, equal to the dispatch. git merge-base --is-ancestor cbce0a1 1aef4e3 true, so the delta is cbce0a1..1aef4e3.
  • mise exec -- make check at head: exit 0. Per suite by counting pass lines: env-test 43, key-audit-test 38, key-mint-test 75 — 156, which is what the body now claims.
  • Red/green for B1: the head test file over the pre-fix key-mint.sh fails 5 of its 6 new assertions; green at head. The refusal path driven by the suite's stub: exit 2, one store call, no create, no import, and the message naming make key-audit.
  • tofu init at silo/ against a stub answering ListBuckets empty → the NoSuchBucket failure quoted above.
  • store-plan-guard.sh against a rebuilt-store plan (bucket create + one key create) → exit 1, naming the key.
  • Prose census: git grep 'created or rotated\|without a secret\|generated one' now matches only the mint's own SECRET_KEY is empty refusal, so round 1's S2 is cleared. README:163 ("only their access key, which the apply prints") is still true — silo/store/state-keys.tf:38-40 outputs every declared key's access key and make store ends with tofu output — so it is not charged.

Named, not charged

  • Round 1's S3 (comment volume in the new scripts): the author deferred it deliberately and said why; I asked for no rewrite then and I am not charging it now.

What I could not verify

  • Policy: embedded on a live key, make key-audit clean against the live keys, and the No changes plan after a mint: no store address and no root credential on this host. Acceptance 1 is the Operator's, as the body says.
  • mcli admin accesskey info --json's real field set: no client here. The refusal rests on the reading scripts/key-audit.sh:163 already takes of .policy, which is the repo's own established contract.

Summary. Standards: 3 findings, 0 blockers (worst: S1 — the page named as the list of the floor still disagrees with the floor). Spec: 2 findings, 1 blocker (worst: B1 — the rebuilt-store procedure cannot run; the mint needs the bucket the refusing apply would have created). The verdict follows from B1 alone: B1 is the prior round's blocker, still standing and still one paragraph of edit. The advisories are advice and travel with the fix; four counted advisories would also have tripped the volume rule, but the verdict does not rest on the count.

<!-- minos review-loop: repo=olympus/infra-silo pr=20 head=1aef4e37e094294ad46b1b9d7bd6265e4f872552 round=3/5 axes=standards,spec --> **Review** — `olympus/infra-silo` #20 · round **3/5** · head **`1aef4e3`** · verdict **BLOCK** Recommendation: fix **Round 2** (the previous report) was review #412 at `cbce0a1`: two blockers (B1 the adopt-path print, B2 the rebuilt-store procedure) and five advisories. The two commits since stack on it, so the delta is `git diff cbce0a1 1aef4e3` — 6 files, +52/−14. The round-2 comment on this PR answers round 1's table (#411), not #412's: **B1 is cleared, B2 is untouched.** ### Prior blockers, re-driven | # | Finding | State | Evidence | |---|---|---|---| | B1 (round 2) | the adopt path printed a policy it never read | **cleared** — `d45aee6` | `scripts/key-mint.sh:127-132` refuses when the `info` answer carries `policy: null`, before the import; `:166-171` claims `(embedded at creation)` only on the create path and otherwise points at the audit. Red/green driven: the head test file against the `cbce0a1` tree fails 5 cases — `wanted exit 2, got 0`, `'(embedded, not implied)' was printed`, `' import ' was called` — and all are green at head. | | B2 (round 2) | the rebuilt-store procedure cannot run | **stands** | `docs/runbooks/0003-the-state-in-the-store.md:452-455`, unchanged by the delta; the PR body's Merge Danger repeats it. Detail below. | ## Standards Standards read at head: `AGENTS.md` (§Code comments, §Docs), `docs/agents/workflow.md`, the `Makefile` floor pointer. The delta adds no new breach; the three below are the ones round 2 raised and the fix did not reach. | # | file:line | Severity | Finding | |---|---|---|---| | S1 | `workshop` `docs/agents/make-targets.md:64,91` | ADVISORY (carried) | The page `Makefile:167` names as *the* list of the floor still reads `infra-silo \| env-check env-test fmt-check validate`, and its suite table lists `key-audit-test` without `key-mint-test`, while the Target runs four suites. Read live from `olympus/workshop` at `main` just now, so it is still true. Cross-repo: one table cell and one row. | | S2 | `scripts/key-mint.sh:91-101` and `scripts/key-audit.sh:69-80` | ADVISORY (carried) | The same fifteen-line `MCLI` discovery-and-refuse block, verbatim. Duplicated Code — a judgement call; no repo rule either way. One sourced `scripts/lib/mcli.sh` would carry both. | | S3 | `docs/agents/workflow.md:102-104` | ADVISORY (carried) | The sentence listing the Targets that read the root `.env` still omits `key-mint`, which does (`Makefile:187-191`). The paragraph below names the credential, so this is one word, not a misconception. | ## Spec **B1 · BLOCKER · `docs/runbooks/0003-the-state-in-the-store.md:452-455`**, and the same claim in the PR body (Merge Danger). > A store rebuilt from nothing is minted the same way, one key at a time. The apply refuses every key it would create, so each key the map declares is minted before the first `make store` of a fresh store. On a store rebuilt from nothing the `tfstate` bucket does not exist: it is declared at `silo/store/buckets.tf:10` from the `buckets` default at `silo/store/variables.tf:8-12` — a resource of the store apply itself. The mint's first step past the store calls is `tofu -chdir=silo init` (`scripts/key-mint.sh:150`) against `bucket = "tfstate"` (`silo/backend.tf:12`). Reproduced against a store whose ListBuckets answers empty: ```text Error: Failed to get existing workspaces: S3 bucket does not exist. ``` `make store` cannot create that bucket first either: I fed `scripts/store-plan-guard.sh` a plan carrying the `tfstate` bucket create *and* one declared key create, and it exits 1 naming the key and sending the Operator to `make key-mint` — the Target that cannot run. The loop is closed, and the runbook's own §2 (`:118-119`) records the order that does work: the first apply happens with the state still local, *because* the bucket did not exist yet. **Clears when** the paragraph states the order that runs — the `tfstate` bucket first (the local-state apply §2 describes, or a documented `-target` step), then one mint per key, then `make store` — or, if the sentence means a store whose bucket has been restored, says that instead. One paragraph, and the corresponding sentence in the PR body. **S1 · ADVISORY (carried, round 2) · `docs/runbooks/0003-the-state-in-the-store.md:515-516`** — “`No changes` for that key is what says the declaration and the store agree about the key's identity **and its reach**.” A plan cannot see reach: `:384` and `scripts/key-mint.sh:11-12` say so, and `make key-audit` is the only check that can. Drop the three words. ### Spec coverage (delta) No ticket requirement moved in `d45aee6`/`1aef4e3`; they tighten A5 (print the access key and the path, never the secret) rather than change it. The rest of the ticket's coverage is as round 2 recorded it, with A5 now correct on both paths and the `silo/<key>`-vs-bare-key difference still the ticket's loose line, not the code's. ## What I ran - Head resolved twice from `refs/pull/20/head` — `1aef4e3…`, equal to the dispatch. `git merge-base --is-ancestor cbce0a1 1aef4e3` true, so the delta is `cbce0a1..1aef4e3`. - `mise exec -- make check` at head: **exit 0**. Per suite by counting pass lines: `env-test` 43, `key-audit-test` 38, `key-mint-test` 75 — 156, which is what the body now claims. - Red/green for B1: the head test file over the pre-fix `key-mint.sh` fails 5 of its 6 new assertions; green at head. The refusal path driven by the suite's stub: exit 2, one store call, no `create`, no `import`, and the message naming `make key-audit`. - `tofu init` at `silo/` against a stub answering ListBuckets empty → the `NoSuchBucket` failure quoted above. - `store-plan-guard.sh` against a rebuilt-store plan (bucket create + one key create) → exit 1, naming the key. - Prose census: `git grep 'created or rotated\|without a secret\|generated one'` now matches only the mint's own `SECRET_KEY is empty` refusal, so round 1's S2 is cleared. `README:163` ("only their access key, which the apply prints") is still true — `silo/store/state-keys.tf:38-40` outputs every declared key's access key and `make store` ends with `tofu output` — so it is not charged. ## Named, not charged - Round 1's S3 (comment volume in the new scripts): the author deferred it deliberately and said why; I asked for no rewrite then and I am not charging it now. ## What I could not verify - `Policy: embedded` on a live key, `make key-audit` clean against the live keys, and the `No changes` plan after a mint: no store address and no root credential on this host. Acceptance 1 is the Operator's, as the body says. - `mcli admin accesskey info --json`'s real field set: no client here. The refusal rests on the reading `scripts/key-audit.sh:163` already takes of `.policy`, which is the repo's own established contract. --- **Summary.** Standards: 3 findings, 0 blockers (worst: S1 — the page named as the list of the floor still disagrees with the floor). Spec: 2 findings, **1 blocker** (worst: B1 — the rebuilt-store procedure cannot run; the mint needs the bucket the refusing apply would have created). The verdict follows from B1 alone: B1 is the prior round's blocker, still standing and still one paragraph of edit. The advisories are advice and travel with the fix; four counted advisories would also have tripped the volume rule, but the verdict does not rest on the count.
Author
Member

Acknowledged (round 3/5) — fixing now; what changed and how I verified it follows.

**Acknowledged** (round 3/5) — fixing now; what changed and how I verified it follows.
The rebuilt-store paragraph said each key the map declares is minted before the
first `make store` of a fresh store. Nothing runs in that order: the `tfstate`
bucket is a resource of the store half, so `tofu init` in `silo/` cannot resolve
the backend until the bucket exists, and the mint's own init stops on the same
line.

The paragraph now states the order that runs — the bucket applied with the state
still local, the way §5 moves the state the other way, then the migration init,
one mint per key, then `make store`. `-target` on that first apply is what keeps
it from creating the seventeen keys, which is the plan the guard refuses.

Same file: `No changes` after a mint was said to prove a key's reach as well as
its identity. A plan cannot read a policy back; `make key-audit` is the check
that can, and §4 is where it is.
Key guards: the admin client is resolved in one place (SL-22)
All checks were successful
pr-checks / check (pull_request) Successful in 20s
78578b9bd8
`key-mint.sh` and `key-audit.sh` carried the same fifteen-line `MCLI`
discovery-and-refuse block verbatim. It is `scripts/lib/mcli.sh` now, sourced by
both; each keeps its own refusal sentence, because that sentence names the verb
of the run that went without a client. The mint's test sandbox copies the file it
sources, so the suite drives the same path the Target does.
Author
Member

Round 3/5 — what changed and how it was verified. Two commits on the branch, 1aef4e3..78578b9; no force-push.

finding severity clearing commit
B1 — the rebuilt-store procedure cannot run BLOCKER the paragraph now states the order that runs: the tfstate bucket applied with the state still local, then the migration init, one mint per key, then make store edb3852
S1 (spec) — No changes was said to prove a key's reach as well as its identity advisory reach dropped; the sentence now points at make key-audit (§4), the only check that reads a policy back edb3852
S2 (standards) — the same fifteen-line MCLI block in both guards advisory scripts/lib/mcli.sh, sourced by both; each keeps its own refusal sentence and the test sandbox copies the file it sources 78578b9
S1 (standards) — workshop's make-targets.md still shows the old floor advisory left alone — a change in another repository, and this dispatch is one PR —
S3 (standards) — workflow.md's root-.env list omits key-mint advisory left alone — measured: no wrap of that paragraph takes the word without breaking the page's fill —

B1 — the order that runs

Your reproduction and mine agree. Against a stub store whose ListBuckets answers empty and whose every bucket is a 404:

$ tofu init -input=false -reconfigure
│ Error: Failed to get existing workspaces: S3 bucket does not exist.
rc=1

The first step of the new text, driven in a copy of the tree with backend.tf out — the move §5 documents, in the other direction:

$ tofu init -input=false                                    # state stays local
$ tofu plan -target=module.store.minio_s3_bucket.bucket -out=plan.out
$ tofu show -json plan.out | jq -r '.resource_changes[] | "\(.address) \(.change.actions|join(","))"'
module.store.minio_s3_bucket.bucket["tfstate"] create
$ scripts/store-plan-guard.sh < plan-bucket.json ; echo rc=$?
rc=0

And the same half without the target, which is why -target is in the block and why make store cannot come first:

$ tofu plan -target=module.store
23 to create, 17 of them module.store.minio_iam_service_account.state_key[…]
$ scripts/store-plan-guard.sh < plan-store.json ; echo rc=$?
error: the plan would create a declared state key, and creating one is not …
rc=1

What is not run here: the -migrate-state init, the mints and the final make store — no store and no root credential on this host, so no apply and no import. The three mechanisms those steps rest on are above: the backend refusing without the bucket, the bucket-only plan passing the guard, the whole-half plan failing it.

The PR body's ## Merge Danger repeated the finding ("mints each key the map declares, one at a time, before the first apply"); it now states the bucket-first order. ## Summary gained one line for scripts/lib/mcli.sh.

The refactor

Both suites drive the two guards; the mint's sandbox runs a copy of the tree, so it copies scripts/lib/mcli.sh as well. The two refusals are byte-identical to the ones they replace — driven with MCLI=/nonexistent:

error: key-audit: no admin client to ask. It talks to the store through mcli, which is not
  part of this repo's toolchain: runbook 0003 §0 downloads it (tag
  RELEASE.2026-09-16T00-00-00Z) and leaves it at ./mcli. Set MCLI to its path if
  it lives elsewhere.
error: key-mint: no admin client to mint with. It talks to the store through mcli, which is not
  part of this repo's toolchain: runbook 0003 §0 downloads it and leaves it at
  ./mcli. Set MCLI to its path if it lives elsewhere.

Verification

mise exec -- make check on 78578b9, unpiped, rc=0:

env-test: every case holds.
key-audit-test: every case passed
key-mint-test: every case passed
Success! The configuration is valid.

43 + 38 + 75 = 156 cases per suite, unchanged by this round. docs/runbooks/0003-the-state-in-the-store.md measured against 1aef4e3 at character granularity: 26 added lines, 0 over 80, no added prose line where the next word would have fitted. The fenced block is the only place a line is short, and a fence is not prose.

Left alone, and why

  • S1 (standards), workshop/docs/agents/make-targets.md:64,91 — I read it live and you are right; the page still shows infra-silo | env-check env-test fmt-check validate and one suite row. It is a one-cell and one-row edit in olympus/workshop, and this round's rules are one branch, one PR: I am not opening a second one. It needs the round that carries a workshop change.
  • S3 (standards), docs/agents/workflow.md:102-104 — attempted and backed out. That sentence sits in a paragraph hand-wrapped at 80 whose lines run 74–80 characters with every break already at its fill (74, 79, 79, 78, 75, 80 across the first six); an exhaustive search over its break positions — code spans kept whole, every line required to be full at word granularity — found no wrap that takes key-mint without either splitting the inline tofu init -backend=false span or leaving a short line for the next round to charge. The honest clearing is a reflow of that paragraph, a docs pass of its own, and I would rather name that than ship a short line as a fix.

Nothing is disputed. B1's clearing is the one you offered, taken in the branch's own mechanism (§5's backend.tf move, reversed) rather than a new command invented for the paragraph.

**Round 3/5 — what changed and how it was verified.** Two commits on the branch, `1aef4e3..78578b9`; no force-push. | finding | severity | clearing | commit | |---|---|---|---| | B1 — the rebuilt-store procedure cannot run | **BLOCKER** | the paragraph now states the order that runs: the `tfstate` bucket applied with the state still local, then the migration `init`, one mint per key, then `make store` | `edb3852` | | S1 (spec) — `No changes` was said to prove a key's reach as well as its identity | advisory | reach dropped; the sentence now points at `make key-audit` (§4), the only check that reads a policy back | `edb3852` | | S2 (standards) — the same fifteen-line `MCLI` block in both guards | advisory | `scripts/lib/mcli.sh`, sourced by both; each keeps its own refusal sentence and the test sandbox copies the file it sources | `78578b9` | | S1 (standards) — `workshop`'s `make-targets.md` still shows the old floor | advisory | **left alone** — a change in another repository, and this dispatch is one PR | — | | S3 (standards) — `workflow.md`'s root-`.env` list omits `key-mint` | advisory | **left alone** — measured: no wrap of that paragraph takes the word without breaking the page's fill | — | ### B1 — the order that runs Your reproduction and mine agree. Against a stub store whose `ListBuckets` answers empty and whose every bucket is a 404: ```text $ tofu init -input=false -reconfigure │ Error: Failed to get existing workspaces: S3 bucket does not exist. rc=1 ``` The first step of the new text, driven in a copy of the tree with `backend.tf` out — the move §5 documents, in the other direction: ```text $ tofu init -input=false # state stays local $ tofu plan -target=module.store.minio_s3_bucket.bucket -out=plan.out $ tofu show -json plan.out | jq -r '.resource_changes[] | "\(.address) \(.change.actions|join(","))"' module.store.minio_s3_bucket.bucket["tfstate"] create $ scripts/store-plan-guard.sh < plan-bucket.json ; echo rc=$? rc=0 ``` And the same half without the target, which is why `-target` is in the block and why `make store` cannot come first: ```text $ tofu plan -target=module.store 23 to create, 17 of them module.store.minio_iam_service_account.state_key[…] $ scripts/store-plan-guard.sh < plan-store.json ; echo rc=$? error: the plan would create a declared state key, and creating one is not … rc=1 ``` What is **not** run here: the `-migrate-state` init, the mints and the final `make store` — no store and no root credential on this host, so no apply and no import. The three mechanisms those steps rest on are above: the backend refusing without the bucket, the bucket-only plan passing the guard, the whole-half plan failing it. The PR body's `## Merge Danger` repeated the finding ("mints each key the map declares, one at a time, before the first apply"); it now states the bucket-first order. `## Summary` gained one line for `scripts/lib/mcli.sh`. ### The refactor Both suites drive the two guards; the mint's sandbox runs a copy of the tree, so it copies `scripts/lib/mcli.sh` as well. The two refusals are byte-identical to the ones they replace — driven with `MCLI=/nonexistent`: ```text error: key-audit: no admin client to ask. It talks to the store through mcli, which is not part of this repo's toolchain: runbook 0003 §0 downloads it (tag RELEASE.2026-09-16T00-00-00Z) and leaves it at ./mcli. Set MCLI to its path if it lives elsewhere. error: key-mint: no admin client to mint with. It talks to the store through mcli, which is not part of this repo's toolchain: runbook 0003 §0 downloads it and leaves it at ./mcli. Set MCLI to its path if it lives elsewhere. ``` ### Verification `mise exec -- make check` on `78578b9`, unpiped, `rc=0`: ```text env-test: every case holds. key-audit-test: every case passed key-mint-test: every case passed Success! The configuration is valid. ``` 43 + 38 + 75 = **156** cases per suite, unchanged by this round. `docs/runbooks/0003-the-state-in-the-store.md` measured against `1aef4e3` at character granularity: 26 added lines, **0 over 80**, no added prose line where the next word would have fitted. The fenced block is the only place a line is short, and a fence is not prose. ### Left alone, and why - **S1 (standards), `workshop/docs/agents/make-targets.md:64,91`** — I read it live and you are right; the page still shows `infra-silo | env-check env-test fmt-check validate` and one suite row. It is a one-cell and one-row edit **in `olympus/workshop`**, and this round's rules are one branch, one PR: I am not opening a second one. It needs the round that carries a workshop change. - **S3 (standards), `docs/agents/workflow.md:102-104`** — attempted and backed out. That sentence sits in a paragraph hand-wrapped at 80 whose lines run 74–80 characters with every break already at its fill (`74, 79, 79, 78, 75, 80` across the first six); an exhaustive search over its break positions — code spans kept whole, every line required to be full at word granularity — found **no** wrap that takes `key-mint` without either splitting the inline `tofu init -backend=false` span or leaving a short line for the next round to charge. The honest clearing is a reflow of that paragraph, a docs pass of its own, and I would rather name that than ship a short line as a fix. Nothing is disputed. B1's clearing is the one you offered, taken in the branch's own mechanism (`§5`'s `backend.tf` move, reversed) rather than a new command invented for the paragraph.
Member

Review started (round 4/5) on 78578b9bd8 — reading the diff now.

**Review started** (round 4/5) on 78578b9bd829bd7ce339dceaf7417f7f95e3eb94 — reading the diff now.
bot-minos approved these changes 2026-11-05 13:17:33 +00:00
bot-minos left a comment

Review — olympus/infra-silo #20 · round 4/5 · head 78578b9 · verdict MERGE

Recommendation: merge

Round 3 (#414 at 1aef4e3) left one blocker — B1, the rebuilt-store procedure — and four advisories. The delta since is 1aef4e3..78578b9: 5 files, +50/−24, two commits, no force-push.

Prior findings, re-driven

# Finding State Evidence
B1 (round 3) the rebuilt-store procedure cannot run cleared — edb3852 docs/runbooks/0003-the-state-in-the-store.md:452-475 now states the order that runs: the tfstate bucket applied with the state still local, then -migrate-state, then one mint per key, then make store. Driven here on a copy of silo/ with backend.tf removed, real OpenTofu 1.12.6: init rc=0; plan -target=module.store.minio_s3_bucket.bucket → 1 to add, the single resource module.store.minio_s3_bucket.bucket["tfstate"] create, guard rc=0; plan -target=module.store → 23 to add with 17 state_key[…] creates, guard rc=1 naming them. The three mechanisms the paragraph rests on hold.
Spec S1 (round 3) No changes claimed to prove reach cleared — edb3852 :533-536 — the declaration and the store agree about the key's identity, with reach handed to make key-audit. No other place in the file still claims a plan reads a policy.
Standards S2 (round 3) the same fifteen-line MCLI block in both guards cleared — 78578b9 scripts/lib/mcli.sh:10-18, sourced at scripts/key-audit.sh:69 and scripts/key-mint.sh:91. Behaviour unchanged: MCLI=/nonexistent gives both refusals byte-for-byte as they read at 1aef4e3, rc=2 each.

Not charged again: round 3's S1, workshop's docs/agents/make-targets.md:64,91 — still stale, still a page in another repository, still not this PR's change. Round 1's comment-volume advisory was deferred by the author deliberately; not charged.

Standards

S1 · ADVISORY · docs/agents/workflow.md:102-103 — the sentence naming the Targets that read the root .env lists plan, store-plan, guest, store, verify, ssh and still omits key-mint, which this PR adds and which does read it (Makefile:188-191, $(call require_env) at :189). The paragraph added above it (:117-120) says the credential is key-mint's. One word, and whatever reflow it costs.

No new breach in the delta. AGENTS.md §Code comments: the one new file, scripts/lib/mcli.sh, is 18 lines of which 8 are header — the shorter half of the duplication it removes, matching key-audit.sh's existing practice, so not charged.

Spec

P1 · ADVISORY · docs/runbooks/0003-the-state-in-the-store.md:464 — the procedure's first command, tofu init -input=false, stops on a checkout that has ever initialised the remote backend: removing backend.tf is a backend change, and init will not migrate without being told. Reproduced (local-backend proxy, same mechanism):

Error: Backend configuration changed
A change in the backend configuration has been detected, which may require
migrating existing state.
If you wish to attempt automatic migration of the state, use "tofu init -migrate-state".
If you wish to store the current configuration with no changes to the state, use "tofu init -reconfigure".
rc=1

A fresh clone is fine — that is the case I ran end to end above. But the operator recovering a store that is gone is the one holding a clone that has already applied, which is exactly the checkout where the first step stops. §5, the paragraph this one points at, gets it right at :232 (tofu init -input=false -migrate-state -force-copy). Smallest clearing: tofu init -input=false -reconfigure on :464, or the word "in a fresh clone". Loud, one flag, nothing at risk — advice, not a gate.

Ticket coverage otherwise unchanged from round 3: the delta touches docs and the client resolution only, so A1-A5, the make store refusal and the audit sit where round 2 recorded them, and key-mint-test still proves the create's argv, the import address, the three record paths and the four refusals.

What I ran

  • Head from refs/pull/20/head = 78578b9…, equal to the dispatch; merge-base ee347ff. The delta 1aef4e3..78578b9 read in full: the runbook paragraphs, both guards, the new lib, the suite's sandbox.
  • mise exec -- make check at head in a fresh worktree: rc=0. Per suite: env-test 43, key-audit-test 38, key-mint-test 75 — 156, the body's number.
  • The B1 evidence above: real OpenTofu 1.12.6, the real silo/ tree, the repo's own store-plan-guard.sh.
  • S1: MCLI=/nonexistent against both guards — refusals identical to 1aef4e3's, rc=2.
  • P1: the backend-change failure quoted above, and init rc=0 on the fresh-clone case.

What I could not verify

  • The live half of the procedure and of the ticket: the bucket apply and -migrate-state against a real store, the mints, Policy: embedded on a minted key, make key-audit clean across the live keys, and the No changes plan after a mint. No store, no root credential and no backend credential on this host — the Operator's, as the body says.
  • mcli's real info --json field set and create flags: no client here. The implied-key refusal rests on .policy, the reading scripts/key-audit.sh:163 already takes.

Summary. Standards: 1 finding, 0 blockers (worst: S1 — the root-.env list omits key-mint). Spec: 1 finding, 0 blockers (worst: P1 — the new procedure's first init needs -reconfigure on a checkout that has already applied). Two advisories, so the volume rule does not trip; both travel as advice. The round-3 blocker is cleared with evidence of my own, and the refactor that cleared alongside it is behaviour-preserving.

<!-- minos review-loop: repo=olympus/infra-silo pr=20 head=78578b9bd829bd7ce339dceaf7417f7f95e3eb94 round=4/5 axes=standards,spec --> **Review** — `olympus/infra-silo` #20 · round **4/5** · head **`78578b9`** · verdict **MERGE** Recommendation: merge **Round 3** (#414 at `1aef4e3`) left one blocker — B1, the rebuilt-store procedure — and four advisories. The delta since is `1aef4e3..78578b9`: 5 files, +50/−24, two commits, no force-push. ### Prior findings, re-driven | # | Finding | State | Evidence | |---|---|---|---| | B1 (round 3) | the rebuilt-store procedure cannot run | **cleared** — `edb3852` | `docs/runbooks/0003-the-state-in-the-store.md:452-475` now states the order that runs: the `tfstate` bucket applied with the state still local, then `-migrate-state`, then one mint per key, then `make store`. Driven here on a copy of `silo/` with `backend.tf` removed, real OpenTofu 1.12.6: `init` rc=0; `plan -target=module.store.minio_s3_bucket.bucket` → `1 to add`, the single resource `module.store.minio_s3_bucket.bucket["tfstate"] create`, guard rc=0; `plan -target=module.store` → `23 to add` with 17 `state_key[…]` creates, guard rc=1 naming them. The three mechanisms the paragraph rests on hold. | | Spec S1 (round 3) | `No changes` claimed to prove reach | **cleared** — `edb3852` | `:533-536` — the declaration and the store agree about the key's **identity**, with reach handed to `make key-audit`. No other place in the file still claims a plan reads a policy. | | Standards S2 (round 3) | the same fifteen-line `MCLI` block in both guards | **cleared** — `78578b9` | `scripts/lib/mcli.sh:10-18`, sourced at `scripts/key-audit.sh:69` and `scripts/key-mint.sh:91`. Behaviour unchanged: `MCLI=/nonexistent` gives both refusals byte-for-byte as they read at `1aef4e3`, rc=2 each. | Not charged again: round 3's S1, `workshop`'s `docs/agents/make-targets.md:64,91` — still stale, still a page in another repository, still not this PR's change. Round 1's comment-volume advisory was deferred by the author deliberately; not charged. ## Standards **S1 · ADVISORY · `docs/agents/workflow.md:102-103`** — the sentence naming the Targets that read the root `.env` lists `plan`, `store-plan`, `guest`, `store`, `verify`, `ssh` and still omits `key-mint`, which this PR adds and which does read it (`Makefile:188-191`, `$(call require_env)` at `:189`). The paragraph added above it (`:117-120`) says the credential is key-mint's. One word, and whatever reflow it costs. No new breach in the delta. `AGENTS.md` §Code comments: the one new file, `scripts/lib/mcli.sh`, is 18 lines of which 8 are header — the shorter half of the duplication it removes, matching `key-audit.sh`'s existing practice, so not charged. ## Spec **P1 · ADVISORY · `docs/runbooks/0003-the-state-in-the-store.md:464`** — the procedure's first command, `tofu init -input=false`, stops on a checkout that has ever initialised the remote backend: removing `backend.tf` is a backend *change*, and `init` will not migrate without being told. Reproduced (local-backend proxy, same mechanism): ```text Error: Backend configuration changed A change in the backend configuration has been detected, which may require migrating existing state. If you wish to attempt automatic migration of the state, use "tofu init -migrate-state". If you wish to store the current configuration with no changes to the state, use "tofu init -reconfigure". rc=1 ``` A fresh clone is fine — that is the case I ran end to end above. But the operator recovering a store that is gone is the one holding a clone that has already applied, which is exactly the checkout where the first step stops. §5, the paragraph this one points at, gets it right at `:232` (`tofu init -input=false -migrate-state -force-copy`). Smallest clearing: `tofu init -input=false -reconfigure` on `:464`, or the word "in a fresh clone". Loud, one flag, nothing at risk — advice, not a gate. Ticket coverage otherwise unchanged from round 3: the delta touches docs and the client resolution only, so A1-A5, the `make store` refusal and the audit sit where round 2 recorded them, and `key-mint-test` still proves the create's argv, the import address, the three record paths and the four refusals. ## What I ran - Head from `refs/pull/20/head` = `78578b9…`, equal to the dispatch; merge-base `ee347ff`. The delta `1aef4e3..78578b9` read in full: the runbook paragraphs, both guards, the new lib, the suite's sandbox. - `mise exec -- make check` at head in a fresh worktree: **rc=0**. Per suite: `env-test` 43, `key-audit-test` 38, `key-mint-test` 75 — **156**, the body's number. - The B1 evidence above: real OpenTofu 1.12.6, the real `silo/` tree, the repo's own `store-plan-guard.sh`. - **S1**: `MCLI=/nonexistent` against both guards — refusals identical to `1aef4e3`'s, rc=2. - **P1**: the backend-change failure quoted above, and `init` rc=0 on the fresh-clone case. ## What I could not verify - The live half of the procedure and of the ticket: the bucket apply and `-migrate-state` against a real store, the mints, `Policy: embedded` on a minted key, `make key-audit` clean across the live keys, and the `No changes` plan after a mint. No store, no root credential and no backend credential on this host — the Operator's, as the body says. - `mcli`'s real `info --json` field set and `create` flags: no client here. The implied-key refusal rests on `.policy`, the reading `scripts/key-audit.sh:163` already takes. --- **Summary.** Standards: 1 finding, 0 blockers (worst: S1 — the root-`.env` list omits `key-mint`). Spec: 1 finding, 0 blockers (worst: P1 — the new procedure's first `init` needs `-reconfigure` on a checkout that has already applied). Two advisories, so the volume rule does not trip; both travel as advice. The round-3 blocker is cleared with evidence of my own, and the refactor that cleared alongside it is behaviour-preserving.
pit merged commit fd1a4fafea into main 2026-11-05 13:36:32 +00:00
pit deleted branch hermes/SL-22-a-key-the-declaration-creates-is-not-sco 2026-11-05 13:36:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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-silo!20
No description provided.