make key-mint creates a state key, and store refuses to (SL-22) #20
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/SL-22-a-key-the-declaration-creates-is-not-sco"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-adminis every record intfstate. A plan cannot tell — both readNo changes— so creation leaves the 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:
infoanswerspolicy: nullfor the implied shape, and thatone is refused — naming
make key-audit— rather than imported.mainmoved to SC-15 while this branch was open (the tracker records' twodeploy-shaped keys); the merge is in the branch, and the map's
deployshape iswhat 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>readsPolicy: implied, andtofu planreads
No changeseither way.After: the mint's create carries
--policy silo/store/<file>, which is whatembeds it;
scripts/tests/key-mint.test.shasserts the argv. The livePolicy: embeddedread needs the store and the root credential, so it is theOperator's to run (
MC_HOST_silo=… mise exec -- make key-mint).Before:
scripts/key-mint.test.shagainst the tree without the scripts —28 of its cases red (the first run).
After:
mise exec -- make checkon this branch, exit 0:156 cases across the three offline suites — env-test 43, key-audit-test 38,
key-mint-test 75.
key-mint-testproves 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 storeexiting non-zero before itsprompt on a plan that would create a key.
make key-auditon an implied key already failed it; the case now alsoasserts 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 storenow 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
tfstatebucket first, with the state still local, then mints each key the mapdeclares, one at a time, and applies the rest (runbook 0003 §7).
key-audit-testjoinsmake check, so the PR gate runs one more credential-freesuite.
Runbook 0003 §7 is where the procedure is read; §4's rotation path is unchanged,
and
var.state_key_secretsnow serves rotation only.Review started (round 1/5) on
d379b023ed— reading the diff now.Review started (round 2/5) on
cbce0a1d81— reading the diff now.repo: olympus/infra-silo · pr: 20 · head:
cbce0a1(dispatched atd379b02; see the note below) · round: 1/5 · verdict: BLOCKRecommendation: 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.Standards
scripts/key-mint.sh:124-125,:157-160heldtakes.nameonly, and the print then statespolicy silo/store/<file> (embedded, not implied)about the key it adopted — while the sameinfo --jsonmay have answeredpolicy: null, which isPolicy: 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, thenpolicy 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: theinfoJSON already in hand decides the print — refuse (exit 2, namingmake key-audit) when.policyis null, or report what the store said instead of asserting — plus one case inscripts/tests/key-mint.test.shreusing theexistsfixture withpolicy: 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.README.md:167-168,silo/variables.tf:57-62,silo/store/variables.tf:87make storenow refuses it; it contradicts the paragraph added 13 lines above. Bothstate_key_secretsdescriptions 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.scripts/key-mint.sh(56 of 162 lines),scripts/store-plan-guard.sh(19 of 56)AGENTS.md§Code comments: "Keep comments to a minimum: code should be expressive enough to explain itself … propose a docs page underdocs/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.shalready reads this way, so I am not asking for a rewrite of these two — only that the next one carry less.cbce0a1are env-test 45, key-audit-test 38, key-mint-test 69 — 152 (ond379b02: 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:
var.state_keys, undeclared refusedscripts/key-mint.sh:65-83tofu-state-forge-gues,tofu-state,TOFU_STATEall exit 2 with the store never asked:75-98create --policy … --access-key … --secret-key … --name … --description …:130-135Policy: embeddedread is the Operator's (below)module.store…state_key["<name>"]:146-152secret/tofu-state/<record>/<shape>, never the secret:155-161tofu-deploy-state-tracker-guest→silo/store/tracker-guest-deploy-state-policy.json,secret/tofu-state/tracker-guest/deploy)make storerefuses a create, namesmake key-mint, before the promptMakefile:239-251,scripts/store-plan-guard.shscripts/tests/key-audit.test.sh:188-194docs/runbooks/0003-the-state-in-the-store.md§7 ("Creating one", "The first import", "Adding, rotating, removing one")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 checkoncbce0a1→ exit 0, and ond379b02→ exit 0. Pass linescbce0a1: env-test 45, key-audit-test 38, key-mint-test 69;fmt-checkclean;validate"Success!".make key-mint-testre-run on its own: 69/69. I read the assertions for the pass-for-the-wrong-reason failure and they hold — the stubcreatereally 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.d379b02..cbce0a1): two map entries and their policy files, the runbook's counts, and prose. Nothing underscripts/; the newdeploynames take the record/shape the mint derives for them..forgejo/workflows/pr-checks.yml:25runsmise exec -- make check, sokey-mint-testandkey-audit-testare on the PR gate.Could not verify
Policy: embeddedon a live key, and theNo changesplan after a mint: both need the store and the root credential. Acceptance 1 is the Operator's, as the PR says.make key-auditstill auditing every live key clean — same reason.mcli --policyembeds 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.
Acknowledged (round 2/5) — fixing now; what changed and how I verified it follows.
Review —
olympus/infra-silo#20 · round 2/5 · headcbce0a1· verdict BLOCKRecommendation: fix
Round 1. There is no review body on this PR:
list_pull_reviewsis empty and the only comments are the two round-start lines (#3506atd379b02,#3508atcbce0a1). Round 1 stopped before it reported, so there are no earlier findings to re-verify. The delta since it is the merge ofee347ff(SC-15, the tracker deploy keys) and touches no script — the SL-22 code is identical tod379b02. So the whole diffee347ff...cbce0a1is 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 readsinfra-silo | env-check env-test fmt-check validateand lists onlykey-audit-testin the suite table, whileMakefile:168now 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-101andscripts/key-audit.sh:69-80— the same fifteen-lineMCLIdiscovery-and-refuse block, verbatim, plus the samerefuse()/store_dir/alias_namepreamble. Duplicated Code (judgement call; no documented rule either way). One sourcedscripts/lib/mcli.shwould 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) omitskey-mint, which is now the one Target that takes the root credential and does callrequire_env(Makefile:187-191). The paragraph added at:117-120says so, so the list is merely stale — addkey-mintto it.Baseline smells checked and not present: Speculative Generality (the
MCLI/STUB_PLANseams are used by the tests), Message Chains, Middle Man, Data Clumps, Refused Bequest. The long script headers are why-comments, matchingkey-audit.sh's existing practice, so they do not breachAGENTS.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
.namefrom theinfo --jsonanswer and then prints, unconditionally:Reproduced against a stub whose
infoanswerspolicy: null— the store's answer for a key holding no policy of its own, whichscripts/key-audit.sh:163treats as implied — with the matching--name: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 onlyalready exists, so the suite passes over it.This is the one false green the change exists to remove:
make key-mintis 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 sameinfoanswer already in hand carries.policy(key-audit.sh:163reads it), so the fix is small: refuse when.policy == null, namingmake key-auditand the key, and add that case (infoanswerspolicy: null→ exit 2) tokey-mint.test.sh.B2 · BLOCKER ·
docs/runbooks/0003-the-state-in-the-store.md:446-449— the fresh-store procedure cannot run as written.key-mint.sh:144runstofu -chdir=silo initand:147-151state show/importagainst the S3 backend atsilo/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, andmake storestays 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: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
-targetstep), then one mint per key, thenmake store— or, if the intent was “a store whosetfstatebucket 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 changesfor 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
scripts/key-mint.sh:65-70:75-84--policy … --name …underMC_HOST_silo:130-136:146-151silo/<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.:153-162make storerefuses a createMakefile:244-248, guardkey-audit.sh:163-166(pre-dates this PR,4e2dc02), two assertions addedWhat I ran
mise exec -- make checkatcbce0a1: exit 0 —env-test: every case holds.,key-audit-test38 cases,key-mint-test69 cases,Success! The configuration is valid.(107 across the two new/edited suites, matching the body).scripts/store-plan-guard.shagainst real OpenTofu 1.12.6 plan JSON — a module-scopedminio_iam_service_accountcreate, untargeted and-target=module.store: exit 1, namingmodule.store.minio_iam_service_account.state_key["tofu-state-forge-guest"]andmake key-mint. The stub plan matches the real shape.tofu fmt -over the livesilo/store/variables.tf: 17 keys, andtracker-guest-deploy,openbao,semaphore-planpolicies extracted correctly.infra-secrets/docs/store-layout.md:97-106: all seven records match (silo,semaphore,forge-guest,forge-edge,tracker-guest,tracker-edge,openbao). The trackerdeployrows are ahead of that page (SC-15's other half), andforge-runnerhas no row there — unverified, not counted as a finding.initfailure reproduced as quoted above.bash -non all three scripts; worktree clean afterwards.What I could not verify
Policy: embeddedon the live key, thenmake store-planreadsNo 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 realaccesskey info --jsonfield set and theaccesskey createflags. No client and no store here; the stub is the repo's existing seam and mirrorskey-audit.sh's use of the same command. If the realinfoanswer 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-mintreports 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.Round 2/5 — what changed and how it was verified. Two commits on the branch,
cbce0a1..1aef4e3; no force-push.existspath reads the store's answer and drops the policy halfinfoanswer now decides:policy: nullis refused before the import; the print no longer asserts an embedding that did not happen; the test case you asked ford45aee6state_key_secretsdescriptions and the comment above one of them say rotation only1aef4e3S1 — 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, printedexists … already exists in the store; nothing was mintedand thenpolicy silo/store/forge-guest-state-policy.json (embedded, not implied)— about a key it never touched — and imported it.scripts/key-mint.shnow decides on the answer already in hand. After the name check, the same object is read astype == "object" and ((.policy // null) == null); a key in that shape is refused, exit 2, before the import, namingmake key-auditand the one-command fix (the pair is supplied, somcli admin accesskey rmthen 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 withsilo/store/<file>— nothing there is asserted that the run did not prove.scripts/tests/key-mint.test.shgains the case you named,exists-implied, reusing theexistsfixture withpolicy: null: exit 2, namesmake key-audit, nocreate, noimport. Theexistscase 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 answersnullor 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 bymake key-mintand an import sends nothing.git grep -n 'created or rotated\|without a secret\|generated one'over the tree now returns only the mint's ownSECRET_KEY is emptyrefusal, which is about the supplied half, not creation.S4 — the count
Your 150 was right at
d379b02:env-test43,key-audit-test38,key-mint-test69. The merge tocbce0a1touched no test file, so those were still the numbers;key-mint-testis 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 on1aef4e3with its output captured,rc=0:Per suite,
mise exec -- make -s <target>, countingoklines:env-test43 (ok, indented),key-audit-test38,key-mint-test75, eachrc=0.S1's clearing was also driven by hand, outside the suite: the reviewer's fixture against the branch tree, with a stub
mcli, givesOne 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
Policy: embeddedon a minted key,Policy: impliedgone from the two SC-15 keys,make key-auditclean against the live keys, and theNo changesplan 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.Review started (round 3/5) on
1aef4e37e0— reading the diff now.Review —
olympus/infra-silo#20 · round 3/5 · head1aef4e3· verdict BLOCKRecommendation: 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 isgit 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
d45aee6scripts/key-mint.sh:127-132refuses when theinfoanswer carriespolicy: null, before the import;:166-171claims(embedded at creation)only on the create path and otherwise points at the audit. Red/green driven: the head test file against thecbce0a1tree fails 5 cases —wanted exit 2, got 0,'(embedded, not implied)' was printed,' import ' was called— and all are green at head.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, theMakefilefloor pointer. The delta adds no new breach; the three below are the ones round 2 raised and the fix did not reach.workshopdocs/agents/make-targets.md:64,91Makefile:167names as the list of the floor still readsinfra-silo | env-check env-test fmt-check validate, and its suite table listskey-audit-testwithoutkey-mint-test, while the Target runs four suites. Read live fromolympus/workshopatmainjust now, so it is still true. Cross-repo: one table cell and one row.scripts/key-mint.sh:91-101andscripts/key-audit.sh:69-80MCLIdiscovery-and-refuse block, verbatim. Duplicated Code — a judgement call; no repo rule either way. One sourcedscripts/lib/mcli.shwould carry both.docs/agents/workflow.md:102-104.envstill omitskey-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).On a store rebuilt from nothing the
tfstatebucket does not exist: it is declared atsilo/store/buckets.tf:10from thebucketsdefault atsilo/store/variables.tf:8-12— a resource of the store apply itself. The mint's first step past the store calls istofu -chdir=silo init(scripts/key-mint.sh:150) againstbucket = "tfstate"(silo/backend.tf:12). Reproduced against a store whose ListBuckets answers empty:make storecannot create that bucket first either: I fedscripts/store-plan-guard.sha plan carrying thetfstatebucket create and one declared key create, and it exits 1 naming the key and sending the Operator tomake 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
tfstatebucket first (the local-state apply §2 describes, or a documented-targetstep), then one mint per key, thenmake 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 changesfor that key is what says the declaration and the store agree about the key's identity and its reach.” A plan cannot see reach::384andscripts/key-mint.sh:11-12say so, andmake key-auditis 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 thesilo/<key>-vs-bare-key difference still the ticket's loose line, not the code's.What I ran
refs/pull/20/head—1aef4e3…, equal to the dispatch.git merge-base --is-ancestor cbce0a1 1aef4e3true, so the delta iscbce0a1..1aef4e3.mise exec -- make checkat head: exit 0. Per suite by counting pass lines:env-test43,key-audit-test38,key-mint-test75 — 156, which is what the body now claims.key-mint.shfails 5 of its 6 new assertions; green at head. The refusal path driven by the suite's stub: exit 2, one store call, nocreate, noimport, and the message namingmake key-audit.tofu initatsilo/against a stub answering ListBuckets empty → theNoSuchBucketfailure quoted above.store-plan-guard.shagainst a rebuilt-store plan (bucket create + one key create) → exit 1, naming the key.git grep 'created or rotated\|without a secret\|generated one'now matches only the mint's ownSECRET_KEY is emptyrefusal, 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-40outputs every declared key's access key andmake storeends withtofu output— so it is not charged.Named, not charged
What I could not verify
Policy: embeddedon a live key,make key-auditclean against the live keys, and theNo changesplan 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 readingscripts/key-audit.sh:163already 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.
Acknowledged (round 3/5) — fixing now; what changed and how I verified it follows.
Round 3/5 — what changed and how it was verified. Two commits on the branch,
1aef4e3..78578b9; no force-push.tfstatebucket applied with the state still local, then the migrationinit, one mint per key, thenmake storeedb3852No changeswas said to prove a key's reach as well as its identitymake key-audit(§4), the only check that reads a policy backedb3852MCLIblock in both guardsscripts/lib/mcli.sh, sourced by both; each keeps its own refusal sentence and the test sandbox copies the file it sources78578b9workshop'smake-targets.mdstill shows the old floorworkflow.md's root-.envlist omitskey-mintB1 — the order that runs
Your reproduction and mine agree. Against a stub store whose
ListBucketsanswers empty and whose every bucket is a 404:The first step of the new text, driven in a copy of the tree with
backend.tfout — the move §5 documents, in the other direction:And the same half without the target, which is why
-targetis in the block and whymake storecannot come first:What is not run here: the
-migrate-stateinit, the mints and the finalmake 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 Dangerrepeated the finding ("mints each key the map declares, one at a time, before the first apply"); it now states the bucket-first order.## Summarygained one line forscripts/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.shas well. The two refusals are byte-identical to the ones they replace — driven withMCLI=/nonexistent:Verification
mise exec -- make checkon78578b9, unpiped,rc=0:43 + 38 + 75 = 156 cases per suite, unchanged by this round.
docs/runbooks/0003-the-state-in-the-store.mdmeasured against1aef4e3at 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
workshop/docs/agents/make-targets.md:64,91— I read it live and you are right; the page still showsinfra-silo | env-check env-test fmt-check validateand one suite row. It is a one-cell and one-row edit inolympus/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.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, 80across 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 takeskey-mintwithout either splitting the inlinetofu init -backend=falsespan 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'sbackend.tfmove, reversed) rather than a new command invented for the paragraph.Review started (round 4/5) on
78578b9bd8— reading the diff now.Review —
olympus/infra-silo#20 · round 4/5 · head78578b9· verdict MERGERecommendation: merge
Round 3 (#414 at
1aef4e3) left one blocker — B1, the rebuilt-store procedure — and four advisories. The delta since is1aef4e3..78578b9: 5 files, +50/−24, two commits, no force-push.Prior findings, re-driven
edb3852docs/runbooks/0003-the-state-in-the-store.md:452-475now states the order that runs: thetfstatebucket applied with the state still local, then-migrate-state, then one mint per key, thenmake store. Driven here on a copy ofsilo/withbackend.tfremoved, real OpenTofu 1.12.6:initrc=0;plan -target=module.store.minio_s3_bucket.bucket→1 to add, the single resourcemodule.store.minio_s3_bucket.bucket["tfstate"] create, guard rc=0;plan -target=module.store→23 to addwith 17state_key[…]creates, guard rc=1 naming them. The three mechanisms the paragraph rests on hold.No changesclaimed to prove reachedb3852:533-536— the declaration and the store agree about the key's identity, with reach handed tomake key-audit. No other place in the file still claims a plan reads a policy.MCLIblock in both guards78578b9scripts/lib/mcli.sh:10-18, sourced atscripts/key-audit.sh:69andscripts/key-mint.sh:91. Behaviour unchanged:MCLI=/nonexistentgives both refusals byte-for-byte as they read at1aef4e3, rc=2 each.Not charged again: round 3's S1,
workshop'sdocs/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.envlistsplan,store-plan,guest,store,verify,sshand still omitskey-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, matchingkey-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: removingbackend.tfis a backend change, andinitwill not migrate without being told. Reproduced (local-backend proxy, same mechanism):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 -reconfigureon: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 storerefusal and the audit sit where round 2 recorded them, andkey-mint-teststill proves the create's argv, the import address, the three record paths and the four refusals.What I ran
refs/pull/20/head=78578b9…, equal to the dispatch; merge-baseee347ff. The delta1aef4e3..78578b9read in full: the runbook paragraphs, both guards, the new lib, the suite's sandbox.mise exec -- make checkat head in a fresh worktree: rc=0. Per suite:env-test43,key-audit-test38,key-mint-test75 — 156, the body's number.silo/tree, the repo's ownstore-plan-guard.sh.MCLI=/nonexistentagainst both guards — refusals identical to1aef4e3's, rc=2.initrc=0 on the fresh-clone case.What I could not verify
-migrate-stateagainst a real store, the mints,Policy: embeddedon a minted key,make key-auditclean across the live keys, and theNo changesplan after a mint. No store, no root credential and no backend credential on this host — the Operator's, as the body says.mcli's realinfo --jsonfield set andcreateflags: no client here. The implied-key refusal rests on.policy, the readingscripts/key-audit.sh:163already takes.Summary. Standards: 1 finding, 0 blockers (worst: S1 — the root-
.envlist omitskey-mint). Spec: 1 finding, 0 blockers (worst: P1 — the new procedure's firstinitneeds-reconfigureon 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.