Declare the Semaphore projects Stack's state keys (SL-24) #23
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!23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/sl24-semaphore-projects-state-keys"
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?
Summary
Declares the
semaphore/projectsrecord's two state keys, in the shape the runner's keys got (CP-42).infra-cockpit's CP-43 Stack keeps its state atprod/semaphore-projects.tfstate; before this, that record had no keys.Docs that count or list the keys move with them: runbook 0003 §7 (two table rows, nine Stacks, twenty-one declared), README, ADR 0010, runbook 0001.
Evidence
make checkexits 0 on this branch (env-check,env-test,key-audit-test,key-mint-test,fmt-check,validate);fmtleaves the tree clean.make key-mintwith the policy embedded at creation and imported into the declaration:spd6c519d4d/sppca093ef5.make store-plan:Plan: 0 to add, 2 to change, 0 to destroy— no create left for either key.make key-audit:25 key(s) under silo/, 24 audited, 1 out of scope, 0 failing, with both new keysok.tfstate/prod/, reads its own (absent) record (Object does not exist, not a denial), and is refused onprod/semaphore.tfstateandprod/openbao.tfstate—Insufficient permissions. The plan key's write to its own record is refused too.secret/tofu-state/semaphore-projects/deployreads backPROJECTS_STATE_AWS_ACCESS_KEY_ID,PROJECTS_STATE_AWS_SECRET_ACCESS_KEY;.../planreads backAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY.olympus/infra-cockpitsecrets:COCKPIT_PROJECTS_PLAN_STATE_ACCESS_KEY_IDandCOCKPIT_PROJECTS_PLAN_STATE_SECRET_ACCESS_KEYwritten (201) and listed back.SL-24
Merge Danger
Door: two-way — the merge writes nothing to PROD; it lands a declaration and two policy files.
Blast Radius: store
Two things a reader should know:
make storefrommainplans two destroys. The keys are minted and in the store's state already, somain's map knows nothing of them; the plan reads2 to destroyand theprevent_destroyguard refuses it. Merging closes that window, so it should not sit long.tofu-deploy-state-tracker-guestandtofu-deploy-state-tracker-edgeeach plansecret_key_wo_version -> null. Both were minted beforemake key-mintexisted (SC-15); applying that update would send no secret, so it is a decision of its own and is left alone here.Review started (round 1/5) on
af7b73bf11— reading the diff now.repo: olympus/infra-silo · pr: #23 · head:
af7b73bf11· round: 1/5 · verdict: mergeRecommendation: merge
Spec (SL-24) is met in full; one advisory on the docs axis, nothing blocking.
Standards
Source of the standard:
AGENTS.md(Secrets, Privacy, Code comments, Docs),docs/agents/workflow.md,docs/index.md.docs/runbooks/0003-the-state-in-the-store.md:287prod/silo.tfstate. Already stale onmain(eight), so not introduced here, but §7 is the section this PR rewrites and every other count in it moves:Eight→NineStacks (259), nineteen→twenty-one declared (263), twenty rows→twenty-two (312–313), four→five deploy rows (342), and runbook 0001:170. One word:seven→nine.No documented-standard breach: no secret or address in the diff (
AGENTS.md§Secrets, §Privacy); the three-line comment atsilo/store/variables.tf:86-88follows the per-group comments the same map already carries for forge, tracker, cockpit and the runner, so it is not the comment rule's target; every relative link in the four changed markdown files resolves;tofu fmt -checkclean.Spec
Spec: Vikunja SL-24 ("Declare and mint the Semaphore projects Stack's state keys"), read through
docs/agents/issue-tracker.md. PR body names the task (SL-24), so the reference resolves.tofu-deploy-semaphore-projects, new policy, runner-deploy shape, never deletes the recordsilo/store/variables.tf:89,silo/store/semaphore-projects-deploy-state-policy.json— byte-identical tosemaphore-runner-deploy-state-policy.jsononce the record name is normalised;GetObject/PutObjectat the record,DeleteObjectonly on the.tflocktofu-plan-semaphore-projects, runner-plan shapevariables.tf:90,silo/store/semaphore-projects-plan-state-policy.json— identical to the runner's plan policy modulo the name; the two files differ from each other only in the record'sPutObjecttofu-deploy-semaphore-projectsis 30,tofu-plan-semaphore-projects28, and the rejectedtofu-plan-state-semaphore-projectsis 34 as statedvar.state_keysbeside the runner'svariables.tf:86-90, immediately after the runner blocksecret/tofu-state/semaphore-projects/{deploy,plan}withPROJECTS_STATE_*namesscripts/key-mint.sh:99-107derives record and shape from the policy filename → exactly those two paths; the field names are the onesinfra-cockpit's CP-43env.maprow readsCOCKPIT_PROJECTS_PLAN_STATE_{ACCESS_KEY_ID,SECRET_ACCESS_KEY}infra-cockpit@hermes/cp43-semaphore-projects:.forgejo/workflows/plan.yml:101-102names both exactlyNo scope creep: the file set is exactly the one the two CP-42 PRs (!21, !22) touched for the same shape of change.
Count audit, all recounted by hand: map 19→21 entries, table 20→22 rows, policy files 22→24,
6+6+7+2=21in the README, nine Stacks, five deploy rows. ADR 0010'snineteen minted by handis correct and repairs an off-by-onemaincarried (c88d16asaid twenty while both CP-42 keys had been minted throughmake key-mint, not at a console).Verified by hand
mise exec -- make check→ exit 0:env-check(pin + 8-name map),env-test,key-audit-test(all cases),key-mint-test(all cases),tofu fmt -check -recursive,tofu validate("Success! The configuration is valid").diffafter normalising the name, outputIDENTICAL.key-mint's derivation run over the two new filenames yieldssecret/tofu-state/semaphore-projects/deployand.../plan.infra-cockpit's CP-43 branch carries noterraform_remote_stateor second-record read, so one record per key is sufficient (the ticket's "refused onprod/semaphore.tfstate" criterion has nothing to contradict it).Not verified — needs the store's root credential
CI is
make checkand nothing else (docs/agents/workflow.md, What nothing here checks), so these stay the PR's claims and the Operator's to confirm:spd6c519d4d,sppca093ef5) and that each holds its policy embedded rather than implied;make key-audit→25 key(s) under silo/, 24 audited, 1 out of scope, 0 failing(arithmetically consistent with !19's21/20/1/0plus four mints since);make store-plan→0 to add, 2 to change, 0 to destroy, and that the twochanges are the tracker keys'secret_key_wo_version;olympus/infra-cockpit.The Merge Danger note is accurate as far as the tree shows: the keys sit in the shared state, so
mainplans two destroys until this lands, andprevent_destroyonsilo/store/state-keys.tf:28-30refuses them.Summary