Declare the Semaphore runner Stack's deploy state key (CP-42) #21
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/cp42-semaphore-runner-state-key"
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?
Lands
infra-silo's half of CP-42: the record the runner Guest (145) keeps its state in, declared beforemake key-mintcreates its key.Summary
The policy differs from
semaphore-deploy-state-policy.jsonin the two object ARNs and nothing else: list the bucket;Get/Putonprod/semaphore-runner.tfstate;Get/Put/Deleteon its.tflock. The record namesemaphore-runneris the oneinfra-secrets'docs/store-layout.mdalready givessecret/tofu-state/semaphore-runner/deploy, whichkey-mintderives from the file name.The name drops
-state. The store caps a key name at 32 characters;tofu-deploy-state-semaphore-runneris 34 and the plan refused it (expected length of name to be in the range (1 - 32)). Thetofuprefix keeps it inkey-audit's scope, which matches by policy content, not by name.Evidence
mise exec -- make check→ exit 0 (Success! The configuration is valid.).mise exec -- make store-plan, before (main):Plan: 0 to add, 2 to change, 0 to destroy.After (this branch):
module.store.minio_iam_service_account.state_key["tofu-deploy-semaphore-runner"] will be created—Plan: 1 to add, 2 to change, 0 to destroy.That add is whatmake storerefuses (SL-22); the key arrives throughmake key-mint KEY=tofu-deploy-semaphore-runner, after which the add is gone.make key-audit. They follow this PR.Not this change — already on
main: the twochanges aretofu-deploy-state-tracker-{edge,guest}, whosesecret_key_wo_versionis set in the record and absent from any plan run withoutTF_VAR_state_key_secrets(- secret_key_wo_version = (sensitive value) -> null). Left as it is.Merge Danger
Door: two-way — until the key is minted. After the mint, removing the entry is the
prevent_destroyguard lifted in the same diff, and renaming the key is a rotation.Blast Radius: none — the merge creates nothing.
make storewould refuse the plan rather than create the key, and the other seventeen keys are untouched.Review started (round 1/5) on
d71d0c34f5— reading the diff now.repo olympus/infra-silo · PR #21 · head
d71d0c34f5(the dispatch's SHA, re-resolved equal on the host before posting) · round 1/5 · verdict: no blocker; fix recommended on the advisory countRecommendation: fix
The recommendation turns on the count (three advisories), not on their weight: no finding below is a defect in the change's behaviour, and the review state is APPROVED because no BLOCKER stands. One batched polish round clears all three.
Spec source: CP-42 "Add the Semaphore runner on Guest 145" (infra-cockpit tracker, read live), whose bot-telesphoros comment hands this repository its half: a new policy file beside
semaphore-deploy-state-policy.json, same shape, scoped to the runner Stack's own.tfstateand.tflock, minted per runbook 0003 §7, record namesemaphore-runner. The PR body (Lands infra-silo's half of CP-42) agrees. Round: no earlier review on the thread, so the whole head is reviewed against basefd1a4fa(merge-base = base, three files).Standards source:
AGENTS.md(head) §Docs, §Code comments, §Pull requests;docs/runbooks/0003-the-state-in-the-store.md§7;scripts/key-mint.sh,scripts/key-audit.shas the consumers of what this change declares.Spec
No findings. Each claim reproduced:
semaphore-deploy-state-policy.jsonin the two object ARNs onlydiffof the two files: exactly lines 12 and 17,prod/semaphore.tfstate→prod/semaphore-runner.tfstate(and its.tflock)tofu-deploy-state-semaphore-runneris 34 characters, the chosen name fitstofu-deploy-semaphore-runner(the store's cap is 32, runbook 0002 §0 as the body cites)secret/tofu-state/semaphore-runner/deploykey-mint.shshapecasedriven on the new file name →secret/tofu-state/semaphore-runner/deploy; matches CP-42's path andinfra-secretsdocs/store-layout.md:93/bao/policies/ci-cockpit.hcl:48atorigin/mainkey-mintfinds the new entry in the mapkey-mint.sh's owntofu fmt+ sed read ofvariables.tfreturnssemaphore-runner-deploy-state-policy.jsonfor the new name; the map counts 18 entrieskey-auditkeeps it in scopekey-audit.sh:137scopes on thetofu*name prefix; the new name carries it, and the policy file matches*-policy.jsonmake check→ exit 0mise exec -- make checkat head, rc=0,Success! The configuration is valid.(includeskey-audit-test,key-mint-test,fmt-check,validate); CIpr-checks / check (pull_request)on this SHA issuccessStandards
ADVISORY 1 — a runbook sentence states a mint that has not happened.
docs/runbooks/0003-the-state-in-the-store.md:343-344: "the runner Guest's record (CP-42), whose only shape so far is this one and whichmake key-mintcreated." The PR body says the opposite two ways: "Not yet run: the mint, the OpenBao write,make key-audit", and "the key arrives throughmake key-mint KEY=tofu-deploy-semaphore-runner, after which the add is gone". At head the key does not exist, and the plan the body quotes adds it. The page is the record an operator provisions from (§7: "a key's reach is read off this table"). It is not a blocker because the procedure self-corrects:make storerefuses the plan and namesmake key-mint(scripts/store-plan-guard.sh). Clearing change: reword to the declaration ("whichmake key-mintcreates", or "declared here and minted after this merge"). Neighbouring sentence abouttofu-deploy-state-semaphore("minted from that file in the working tree…") is the sibling's history and is untouched.ADVISORY 2 —
README.md:136-140still counts the declared keys at seventeen. The README enumerates them per Stack: "the forge's six … the tracker's six … the semaphore's three (apply, plan, and its CI deploy's) and the OpenBao Guest's two" = 17. This change makes the semaphore's Stacks carry four, and the runbook §7 was brought to eighteen in the same diff, so the two pages now disagree. The README is not in the diff. Clearing change: "the semaphore's four (apply, plan and its CI deploy's, and its runner's deploy key)" or an equivalent. Count-shaped, so ADVISORY.ADVISORY 3 — a stump line in the reflowed paragraph.
docs/runbooks/0003-the-state-in-the-store.md:263:own. Eighteen ofstands alone on a line beforethose keys are **declared** …on 264; the surrounding paragraph fills to ~80 columns. Wording blemish, no behaviour; clearing change: re-fill lines 259-264. (Need not be cleared for merge on its own; it counts here only because it is the third finding.)Smell baseline (Fowler): nothing to report; the change adds data and a doc row, no logic.
Named, not charged (outside the counts)
silo/store/variables.tf:80-82carries a two-line comment.AGENTS.md§Code comments says to keep comments to a minimum, but every group in that map already carries a comment of this kind, so this one follows the file's own pattern.prod/semaphore-runner.tfstateis declared before its owner exists.infra-cockpitatorigin/mainhas norunner/guestbackend yet (onlysemaphore/guest/backend.tf:13,prod/semaphore.tfstate), and CP-42 calls the record name "a stand-in chosen in SC-14". The policy is scoped to that exact key, so cockpit's runner backend must use it, or the policy file changes (the key then needs a rotation, not an edit, per runbook 0003 §4). The body discloses the dependency ("infra-silo's half"); it is a merge-order fact for the cockpit PR, not a defect here.make storerefuses until the Operator mints the key. Disclosed in the body (SL-22 guard) and exercised by the guard's tests; the body's Merge Danger section is accurate (nothing is created by the merge; I did not runmake store-plan, which needs the store credential).runbook 0003:484-486"The seventeen keys were minted by hand…" is the history of the first import and stays true as written.changes in the plan (tofu-deploy-state-tracker-{edge,guest},secret_key_wo_version) are onmainand not touched by this diff.Verified / not verified
Verified by my own hand at head
d71d0c3: the full diff (3 files, all accounted for: policy file, one map entry, runbook §7),make checkrc=0 withfmt-checkandvalidate,diffagainst the sibling policy, name lengths, thekey-mintpath derivation and map read driven on the real file, scope inkey-audit.sh, the counts (8 / 18 / 4), CP-42's body and comment, the cross-repo path atinfra-secretsorigin/main, CI status by SHA.Not verified:
make store-planbefore/after (the store credential is not available to this role), the mint, the OpenBao write,make key-audit(the body says none has run).Summary
0003-the-state-in-the-store.md:343-344claims a mint that has not runThree advisories reach the fix recommendation by count alone; a clean round after one polish pass is a merge.
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
New commits pushed, approval review dismissed automatically according to repository settings
Fixed — round 1, head
2ccb73f. All three advisories cleared; nothing disputed, nothing left unfixed.0003-the-state-in-the-store.md:343-344states a mint that has not runmake key-mintcreated" → "creates". The page records the declaration; the mint follows it, which is what the PR body's own "Not yet run" list says6233ac8README.md:136-140counts the declared keys at seventeen6233ac80003-the-state-in-the-store.md:263—own. Eighteen ofalone on a line:273; the 9 added lines run 74–84 columns and none of them is short6233ac8Homes the finding did not name, moved in the same pass. Grepping the number rather than the quoted sentence found two more claims of the same fact, and changing them required not asserting the mint that finding 1 is about:
docs/adr/0010-…:66233ac8docs/adr/0010-…:4-52ccb73frefines the sentence6233ac8first wrote, and history here is append-only so the refinement is a second commit rather than a rewritedocs/runbooks/0001-deploy-and-teardown.md:1706233ac8Left alone, and why:
0003:484-486("The seventeen keys were minted by hand…") is the first import's history. The review read it as still true and I agree.Verification, at
2ccb73f, in a worktree cut from the branch:158
oklines across the three suites (env-test 45, key-audit 38, key-mint 75), and all three closing lines printed:env-test: every case holds.,key-audit-test: every case passed,key-mint-test: every case passed.No file changed by it —
git statusis identical before and after.wordseqagainst the reviewed headd71d0c3reports5358 -> 5358 wordswith one opcode,created.→creates.. The rewrap moved no other word, so finding 3 is a reflow and finding 1 is the only wording change in that page.+lines ofgit diff -U0 d71d0c3: README 2 lines (max 80), ADR 8 (max 79), runbook 0001 1 (max 79), runbook 0003 9 (max 84). Orphan test over the same added lines: 0. The 81–84 lines sit inside that paragraph's own register —main's copy of it runs 78–85, and 72 lines in this file exceed 81 — so I kept the paragraph's fill rather than re-breaking lines the review already accepted. Its one unavoidable short line is the 74-column one before the[ADR 0005]link, whichmaincarries at 67 in the same place.GET /api/v1/repos/olympus/infra-silo/raw/<path>?ref=2ccb73ffor all four files, 13 assertions, all PASS — the stump is gone,creates.is present, README counts the semaphore's four, noseventeenremains in either moved home, and both markdown links are intact on one line.Not verified, and unchanged by this round:
make store-plan,make store, the mint andmake key-auditneed the store credential this role does not hold — the PR body already lists them as not yet run. No declaration moved, so the plan result the body quotes stands. The PR body needed no edit: this round changed prose only, and neither its## Evidencetranscript nor its## Merge Dangercount is affected.No finding was disagreed with, so
review/needs-humanis not needed.Review started (round 2/5) on
2ccb73f5b5— reading the diff now.repo olympus/infra-silo · PR #21 · head
2ccb73f5b5(the dispatch's SHA; the host'srefs/pull/21/headre-resolved equal before posting) · round 2/5 (the thread carries one earlier review, so this is its second; the dispatch's2 of 5agrees) · verdict: no blocker, no advisoryRecommendation: merge
Round 1 had no BLOCKER (APPROVED, three ADVISORY,
Recommendation: fixon the count alone). This round owes those three advisories' clearing changes and nothing more.Spec source: CP-42 (infra-cockpit tracker), as round 1 read it live; the PR body ("Lands
infra-silo's half of CP-42") agrees. The delta touches prose only, so the spec axis is unchanged since round 1.Standards source:
AGENTS.md§Docs, §Pull requests (head:CP-<index>is a named reference form, so the body'sCP-42meets it);docs/adr/index.md:25(a reversal is a new file, not an edit of a record).Fixed point:
git merge-base --is-ancestor d71d0c3 2ccb73f→ true (the fixer stacked), so the delta isgit diff d71d0c3 2ccb73f: 2 commits (6233ac8,2ccb73f), 4 files, +20/-21 lines, all prose. No base merge in it.mainis stillfd1a4fa= the merge-base.Round-1 advisories: each cleared
2ccb73f0003:343-344said the key "make key-mintcreated"6233ac8,docs/runbooks/0003-the-state-in-the-store.md:343make key-mintcreates";grep 'key-mint. created'overdocs/andREADME.md→ no match. Word-sequence diff of the whole page,d71d0c3vs head: 5358 → 5358 words, exactly one differing word (created.→creates.)README.md:136-140counted the declared keys at seventeen6233ac8,README.md:139-140own. Eighteen ofat0003:2636233ac8,0003:263-273Spec
No findings. Nothing in the delta moves a declaration: the policy file, the
variables.tfentry and the plan the body quotes are byte-identical to round 1.Standards
No findings. The two homes the fix moved beyond the three named, checked against the artefacts:
docs/adr/0010-…:4-6"twenty of them across the fleet, nineteen of them minted by hand … declares eighteen"silo/store/variables.tfvar.state_keys= 18; plus this repository's own apply and plan keys = 20; hand-minted = 17 declared-since + 2 = 19; the runner key is the unminted twentiethdocs/runbooks/0001-deploy-and-teardown.md:170"rather than eighteen times"README.md:139-140realpath -magainst each page's directorySmell baseline (Fowler): nothing to report; prose only.
Named, not charged (outside the counts)
docs/adr/0010-…is edited in place for its tallies.docs/adr/index.md:25says reversing a decision is a new file, not an edit; this edit reverses nothing (the Decision sentence is unchanged), and the same file was count-edited byee347ff(!19) onmain. Not a breach.0003:483-485"The seventeen keys were minted by hand … names seventeen keys to add" is the first import's history and stays true as written (round 1 read it the same way; the author left it for the same reason). It is the onlyseventeenleft in the tree.prod/semaphore-runner.tfstateis declared beforeinfra-cockpithas arunner/guestbackend, andmake storerefuses until the Operator mints the key: both disclosed in the body, both round 1's, unchanged.changes in the plan (tofu-deploy-state-tracker-{edge,guest}) are onmainand not touched.Verified / not verified
Verified by my own hand at
2ccb73f, in a clean worktree cut from the pull ref (git status --porcelainempty):mise exec -- make check→ rc 0, 158oklines across the three suites, all three closing lines printed (env-test: every case holds.,key-audit-test: every case passed,key-mint-test: every case passed),Success! The configuration is valid.;make fmt-checkrc 0.seventeenclassified above), the map count (18), everypolicy =file present, the widths and the link sweep.pr-checks / check (pull_request)→successon2ccb73f.Not verified:
make store-planbefore/after, the mint, the OpenBao write andmake key-auditneed the store credential this role does not hold; the body lists them as not yet run, and no declaration moved this round.Summary
0 BLOCKER, 0 ADVISORY: merge. Probe outputs:
cache/scratch/infra-silo-21-r2/.