Declare the Semaphore runner Stack's plan state key (CP-42) #22
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!22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/cp42-semaphore-runner-plan-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?
The second key on the runner Guest's (145) record: the plan shape
infra-cockpit's pull-request plan check will read it with. Same path as !21: declare it here, thenmake key-mint.CP-42 — Add the Semaphore runner on Guest 145 · this PR is the declaration half of its plan key.
Summary
The policy differs from
semaphore-plan-state-policy.jsononly in its two object ARNs. It holds the five actions ADR 0009 allows a plan key:ListBucketandGetBucketLocationon the bucket,GetObjectonprod/semaphore-runner.tfstate, andGet/Put/Deleteon its.tflock. It has no write on the record.key-mintderivessecret/tofu-state/semaphore-runner/planfrom the file name.The name is exactly 32 characters, which is the store's limit, so it keeps the
tofu-plan-state-<record>pattern. The deploy key in !21 is 34 characters with that pattern, so it couldn't.Evidence
mise exec -- make check→ exit 0 (Success! The configuration is valid.);make fmt-check→ exit 0.mise exec -- make store-plan:Plan: 0 to add, 2 to change, 0 to destroy.module.store.minio_iam_service_account.state_key["tofu-plan-state-semaphore-runner"] will be created, thenPlan: 1 to add, 2 to change, 0 to destroy.make storerefuses that add (SL-22). The key arrives throughmake key-mint KEY=tofu-plan-state-semaphore-runnerafter the merge, and the add disappears from the plan.make key-audit. They follow this PR.Already on
main, not part of this change: the twochanges are the tracker deploy keys'secret_key_wo_versiongoing tonull, as in !21.Merge Danger
Door: two-way until the key is minted. After that, removing the entry means lifting the
prevent_destroyguard in the same diff.Blast Radius: none. The merge creates nothing, and the other eighteen declared keys are untouched.
Review started (round 1/5) on
8b17f7fb1e— reading the diff now.repo olympus/infra-silo · PR #22 · reviewed head
8b17f7fb1e(matches the dispatch andrefs/pull/22/headon the host) · round 1/5 (no earlier review on the thread) · verdict: no blocker, three advisoriesRecommendation: fix
The recommendation turns on the count, not on the weight: there is no BLOCKER, the review state is APPROVED, and three counted advisories trip the volume rule ("the third advisory turns the verdict"). Every finding below is cheap — one batched round clears all three.
Spec source: CP-42 "Add the Semaphore runner on Guest 145" (Vikunja, infra-cockpit), read live, including its comments. The PR body cites it only in the title. The ticket's second comment lists "Plan key (
tofu-plan-state-semaphore-runner, exactly 32 characters) … Not minted" as still open — this PR is the declaration half of that item. Standards source:AGENTS.md(head worktree) §Pull requests, §Code comments, §Docs;docs/runbooks/0003-the-state-in-the-store.md§7.Standards
silo/store/variables.tfmap: 18 entries atorigin/main, 19 at head, counted off thetofu fmt-read map) and updatesdocs/runbooks/0003-the-state-in-the-store.md:263("Nineteen"), but two untouched sentences still carry the old figures:docs/runbooks/0001-deploy-and-teardown.md:170— "rather than eighteen times" (the map now has nineteen entries).README.md:139-140— "the semaphore's four (apply, plan, its CI deploy's, its runner's deploy)"; the semaphore's keys are now five, the new plan key being the fifth.Precedent: the previous PR (!21,
492cebf) moved exactly these two sentences ("seventeen → eighteen" in 0001, "three → four" in the README) when it added the deploy key. One finding, two sites. Clearing change: "nineteen" at 0001:170, and "five (apply, plan, its CI deploy's, its runner's deploy and plan)" at README.md:139-140.AGENTS.md§Pull requests: "Name the task a PR addresses in its body by its own reference:SL-<index>… orSC-<index>/CP-<index>for one ininfra-secrets/infra-cockpit, when the change lands this repository's half of it."CP-42appears in the title and the commit subject only; the body has noCP-42and noSL-reference (it points at !21, which is a pull request, not the task). The spec is recoverable from the title, so this is a metadata fix, not a code one. Clearing change: oneCP-42line in the body.Spec
## Merge Danger/ Blast Radius: "the other nineteen keys are untouched". After the merge the map holds nineteen keys including the new one, so the others are eighteen (18 atorigin/main, 19 at head — the count above). The body's own## Summaryand the runbook say nineteen in total. Body-only; clearing change is "eighteen".Nothing else in the spec axis is missing or surplus: the diff is the plan-shape declaration CP-42's comment asks for (policy file + map entry + runbook row/counts) and nothing beyond it.
Verified (by my own hand, head
8b17f7f)semaphore-plan-state-policy.jsononly in its two object ARNs"diff -ushows exactly those twoResourcelines, nothing else. Against the runner's deploy policy the only difference iss3:PutObjectdropped on the record, so the plan key has no write on it..tflock) — five, no write at the record.jqparses the file.-stateis 34${#name}:tofu-plan-state-semaphore-runner= 32,tofu-deploy-state-semaphore-runner= 34,tofu-deploy-semaphore-runner= 28.key-mintderivessecret/tofu-state/semaphore-runner/planfrom the file name"key-mint.sh's owncaseonsemaphore-runner-plan-state-policy.json→secret/tofu-state/semaphore-runner/plan. Its map read (throughtofu fmt) finds the entry and returns that policy file. Declared count 19.make check→ exit 0;make fmt-check→ exit 0mise exec -- make check:Success! The configuration is valid.;key-audit-testandkey-mint-test: every case passed;fmt-checkclean. Working tree clean afterwards.state-keys.tfkeepsprevent_destroy = trueon the resource, and creation ismake key-mint's (the body's "two-way until minted" follows). Nothing in the diff touches the other 18 entries.Not verified:
make store-plan'sPlan: 1 to add, 2 to changeand themake storerefusal (SL-22) — they need the store credential, which this profile does not hold; the add follows from the new map entry by construction. The mint, the OpenBao write andmake key-auditare the body's own "not yet run" items and cannot exist before the merge.Named, not charged
secret/tofu-state/semaphore-runner/planis not yet ininfra-secretsdocs/store-layout.md(only/deploy, still "not minted") nor inbao/policies/ci-cockpit.hclatorigin/main. That is the other repository's half, listed as open on CP-42; this PR is the infra-silo half and discloses the mint as pending.changes in the plan evidence (secret_key_wo_version→null) are onmainalready, as the body says.Summary
docs/runbooks/0001-deploy-and-teardown.md:170andREADME.md:139-1400 BLOCKERs, 3 ADVISORYs. State follows blockers (none → APPROVED); the
Recommendation: fixand thereview/needs-fixlabel follow the advisory count.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
Round 1 fix —
ffff01conhermes/cp42-semaphore-runner-plan-key. Three advisories, none disputed; all three cleared, and the count they charge was brought current in two further homes the review did not name.Findings
docs/runbooks/0001-deploy-and-teardown.md:170"rather than eighteen times";README.md:139-140"the semaphore's four"nineteen, and "the semaphore's five (apply, plan, its CI deploy's, its runner's deploy and plan)" — the review's own wordingCP-42appeared nowhere in the body[CP-42 — Add the Semaphore runner on Guest 145](https://vikunja.thepit.space/tasks/270)under the opening paragraphTwo more homes for finding 1's count
Grepping the number word rather than the two quoted lines found two more, both moved in
ffff01c:docs/adr/0010-a-declared-state-key-keeps-the-owner-it-was-minted-with.md:3-6— "twenty of them across the fleet, nineteen … declares eighteen". Nowtwenty-one/twenty/nineteen. The map holds 19 entries (18 atorigin/main), this repository's own apply and plan keys are the other two, and the runner's deploy key was minted on 2026-11-06 (CP-42's mint comment,make key-audit:22 key(s) under silo/, 21 audited … 0 failing), so twenty of the twenty-one exist and the plan key this PR declares is the one that does not. !21 moved this same sentence for the deploy key, though the finding's precedent lists only the other two sites.docs/runbooks/0003-the-state-in-the-store.md:486-488— "The seventeen keys … it names seventeen keys to add". That one was already behind the map by one atorigin/main, so it is not this branch's defect, but it is the same count in the same section. It now carries no count at all — "it names one key to add for every entry the map declares" — which cannot fall behind the map again.Verification
tofu fmt -check -recursiveclean andtofu validategreen on the committed tree;git statusclean afterwards.8b17f7f, in characters (notawk length, which counts an em dash as three): README 6, ADR 0010 4, 0001 1, 0003 5 — widest 80, none over 80, no orphan wrap (no added line whose next line's first word would still have fitted).wordseq 8b17f7fper file: only the intended words moved —four→five,deploy)→deploy and plan),twenty→twenty-one,nineteen→twenty,eighteen→nineteen— and README's five-line reflow is whitespace only, no clause lost or duplicated.tofu fmt - < silo/store/variables.tf, README's groups 6 + 6 + 5 + 2 = 19.Not run, and why:
make store-planand the mint need the store credential this profile does not hold; the mint is the Operator's after the merge, as the body says. Nothing in this round touchessilo/, so the plan outcome is the one the body already records.Nothing was disagreed with. Moving the state label to
review/needs-review.Review started (round 2/5) on
ffff01c7e6— reading the diff now.repo olympus/infra-silo · PR #22 · reviewed head
ffff01c7e6(equalsrefs/pull/22/headon the host, read again before posting) · round 2/5 (the thread holds one earlier review, so this is its second; the dispatch's 2/5 agrees) · verdict: no blocker, one advisoryRecommendation: merge
Fixed point: the round-1 review's
commit_id8b17f7f.git merge-base --is-ancestor 8b17f7f ffff01cis true (the fixer stacked, no base merge), so the round's delta isgit diff 8b17f7f ffff01c: one commit,ffff01c, four docs files (README.md, ADR 0010, runbooks 0001 and 0003), 16 insertions and 16 deletions, nothing undersilo/. Round 1 was dismissed by the forge when the head moved; its body is still on the thread.Spec source: CP-42 "Add the Semaphore runner on Guest 145" (Vikunja task 270, read live with its comments). Its second comment lists the plan key
tofu-plan-state-semaphore-runneras "Not minted" — this PR is the declaration half. Standards source:AGENTS.md(head worktree, unchanged since round 1) §Pull requests, §Code comments, §Docs;docs/runbooks/0003-the-state-in-the-store.md.Bar: round > 1 — a new BLOCKER must be a correctness or security defect introduced or exposed by the fix; anything else newly spotted is ADVISORY. The finding below is a documentation defect, so it is graded ADVISORY against that bar.
Round 1, re-driven
Round 1 had no BLOCKER; its three advisories:
0001:170andREADME.md:139-140ffff01c0001:170reads "rather than nineteen times";README.md:139-140reads "the semaphore's five (apply, plan, its CI deploy's, its runner's deploy and plan)". Recounted offsilo/store/variables.tf: 19 entries at head (18 at492cebf), groups forge 6 + tracker 6 + semaphore 5 + openbao 2 = 19, so README's five is right.CP-42[CP-42 — Add the Semaphore runner on Guest 145](…/tasks/270), asAGENTS.md§Pull requests asks.The fix also moved two more homes of the count that round 1 did not name (ADR 0010 opening, runbook 0003 first-import paragraph). The census of number words over the tree at head (
seventeen…twenty-one,.md/.tf/.sh/.yml, vendored.terraformaside) finds no sentence still carrying an old declared-key count.Standards
docs/adr/0010-a-declared-state-key-keeps-the-owner-it-was-minted-with.md:5now reads "twenty-one of them across the fleet, twenty of them minted by hand at a console, one command each". The count of hand mints did not move with this change: at492cebfit was nineteen with the runner deploy key declared and unminted; the key was minted afterwards, bymake key-mint(CP-42's mint comment: "Minted by:make key-mintas the Operatorpit, 2026-11-06"), so the hand mints are still nineteen and the minted total is twenty. The repository says the same about itself:docs/runbooks/0003-the-state-in-the-store.md:583-584"The tracker records' two deploy keys were minted by hand before the Target existed (SC-15); every key after them arrives through it", and:344-345"whose keysmake key-mintcreates". The runbook paragraph atdocs/runbooks/0003-the-state-in-the-store.md:486— "The keys were minted by hand before this declaration existed" — went from a counted subset ("The seventeen keys") to an all-quantified claim over a map that now holds twokey-mintkeys. One defect, two sites; both are sentencesffff01citself rewrote. Clearing change: ADR 0010:5 — "twenty of them minted, nineteen of them by hand at a console, one command each" (or drop "by hand at a console" from the twenty); runbook 0003:486 — scope the clause back ("The keys minted before this declaration existed were minted by hand, …"). The first-import procedure itself (one add per declared entry, nothing in the record yet) is correct as written.Spec
No findings. The delta is count-keeping for CP-42's declaration half and goes nowhere else: the arithmetic in the ADR (21 = 19 declared + this repository's own apply and plan keys; 20 minted = 21 less the unminted plan key this PR declares) matches the ticket's mint comment and
make key-auditline ("22 key(s) under silo/, 21 audited, 1 out of scope"). The round-1 contract (policy file + map entry + runbook row,Plan: 1 to addfor the plan key) is untouched by the delta:git diff 8b17f7f ffff01c --stat -- silo/is empty.Verified (by my own hand, head
ffff01c)make checkrc=0, 158 ok lines"mise exec -- make check: rc=0, "Success! The configuration is valid.", 158 lines matching^\s*ok;git status --porcelainempty afterwards (silo/.terraformis ignored).8b17f7fvs head: READMEfour→five,deploy)→deploy and plan); ADR 0010twenty→twenty-one,nineteen→twenty,eighteen→nineteen; 0001eighteen→nineteen; 0003seventeen×2 removed, "keys" → "one key for every entry the map declares". README's reflow is whitespace only.492cebf.Not verified:
make store-plan'sPlan: 1 to add, 2 to changeand themake storerefusal — they need the store credential this profile does not hold, and nothing undersilo/moved this round. The plan-key mint, the OpenBao write andmake key-auditare the body's own "not yet run" items.Named, not charged
## Summarytree still lists only the policy file,variables.tfand runbook 0003; the delta also touches README, ADR 0010 and runbook 0001 (the fix comment on the thread says so).AGENTS.mdsets no rule for the body's file list, and the diff wins where they differ; carried to the author, not counted.infra-secretsdocs/store-layout.mdorbao/policies/ci-cockpit.hcl— the other repository's half, listed open on CP-42 (carried from round 1).Summary
make key-mintrunner deploy key as a hand mint0 BLOCKERs, 1 ADVISORY. State follows blockers (none → APPROVED); one advisory is below the volume rule's three, so
Recommendation: merge; the advisory is advice and the label isreview/merge-ready.