Declare the OpenBao record's deploy state key (SL-27) #26

Merged
pit merged 2 commits from hermes/sl27-openbao-deploy-key into main 2026-11-09 16:55:31 +00:00
Owner

SL-27

Summary

The OpenBao Guest Stack's record (prod/openbao.tfstate) gets its third key shape: the deploy key the Semaphore runner will apply infra-secrets with (workshop ADR 0012).

 silo/store/
   openbao-state-policy.json          # apply: record + lock, delete on both
   openbao-plan-state-policy.json     # plan: read record, lock
+  openbao-deploy-state-policy.json   # deploy: read/write record, read/write/delete lock, no delete on record

 var.state_keys
   "tofu-state-openbao"
   "tofu-plan-state-openbao"
+  "tofu-deploy-state-openbao"        # 25 chars; pair at secret/tofu-state/openbao/deploy

The policy is forge-edge-deploy-state-policy.json with only the two object ARNs changed. Docs: runbook 0003 §7 row and deploy-shape paragraph, ADR 0010 / runbook 0001 / README counts (25 declared, 27 across the fleet; counted with the key-mint parse).

Evidence

  • mise exec -- make check: exit 0, key-audit-test: every case passed, key-mint-test: every case passed, Success! The configuration is valid.
  • New key-audit-test case: ok AKDEPLOYBAO00000001 tofu-deploy-state-openbao <- silo/store/openbao-deploy-state-policy.json. Before (red): with the deploy file given the apply file's content, the case fails and the deploy key matches the deploy file only by accident of content. After: passes; 11 audited, 0 failing.
  • New key-mint-test row: ok tofu-deploy-state-openbao belongs at secret/tofu-state/openbao/deploy.
  • make fmt leaves git status --porcelain empty.
  • Not run here: make store-plan, make key-audit, the mint. Those are the live half (below).

Merge Danger

Door: two-way

The live half: write the pair at secret/tofu-state/openbao/deploy, then make key-mint KEY=tofu-deploy-state-openbao from this branch. Merging before the mint is harmless: make store from main would plan a create, and scripts/store-plan-guard.sh refuses it. Merge soon after the mint: until then make store from main plans a destroy of the minted key, and prevent_destroy refuses it.

Blast Radius: store-half

Nothing reads the new path yet. infra-secrets' runner grant (SC-25) and env.map row (SC-36) consume it, and are blocked on this ticket.

SL-27 ## Summary The OpenBao Guest Stack's record (`prod/openbao.tfstate`) gets its third key shape: the deploy key the Semaphore runner will apply infra-secrets with (workshop ADR 0012). ```diff silo/store/ openbao-state-policy.json # apply: record + lock, delete on both openbao-plan-state-policy.json # plan: read record, lock + openbao-deploy-state-policy.json # deploy: read/write record, read/write/delete lock, no delete on record var.state_keys "tofu-state-openbao" "tofu-plan-state-openbao" + "tofu-deploy-state-openbao" # 25 chars; pair at secret/tofu-state/openbao/deploy ``` The policy is `forge-edge-deploy-state-policy.json` with only the two object ARNs changed. Docs: runbook 0003 §7 row and deploy-shape paragraph, ADR 0010 / runbook 0001 / README counts (25 declared, 27 across the fleet; counted with the key-mint parse). ## Evidence - `mise exec -- make check`: exit 0, `key-audit-test: every case passed`, `key-mint-test: every case passed`, `Success! The configuration is valid.` - New key-audit-test case: `ok AKDEPLOYBAO00000001 tofu-deploy-state-openbao <- silo/store/openbao-deploy-state-policy.json`. **Before (red):** with the deploy file given the apply file's content, the case fails and the deploy key matches the deploy file only by accident of content. **After:** passes; 11 audited, 0 failing. - New key-mint-test row: `ok tofu-deploy-state-openbao belongs at secret/tofu-state/openbao/deploy`. - `make fmt` leaves `git status --porcelain` empty. - Not run here: `make store-plan`, `make key-audit`, the mint. Those are the live half (below). ## Merge Danger **Door:** two-way The live half: write the pair at `secret/tofu-state/openbao/deploy`, then `make key-mint KEY=tofu-deploy-state-openbao` from this branch. Merging before the mint is harmless: `make store` from main would plan a create, and `scripts/store-plan-guard.sh` refuses it. Merge soon *after* the mint: until then `make store` from main plans a destroy of the minted key, and `prevent_destroy` refuses it. **Blast Radius:** store-half Nothing reads the new path yet. infra-secrets' runner grant (SC-25) and env.map row (SC-36) consume it, and are blocked on this ticket.
Member

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

**Review started** (round 1/5) on 259d61e0aa140263b8ba599a1ed3926dbe2a1509 — reading the diff now.
bot-minos approved these changes 2026-11-09 16:50:35 +00:00
bot-minos left a comment

repo: olympus/infra-silo · PR: #26 · reviewed head: 259d61e0aa · round 1/5 (the thread carries no earlier review, so the round is one; it matches the dispatch) · verdict: APPROVE, 0 blockers, 1 advisory

Recommendation: merge

Spec source: SL-27, "The OpenBao deploy key is declared in the store half and minted" (Vikunja project 7, task id 336), read live; the PR body links it as SL-27. The ticket's own comment (bot-telesphoros) says the live half waits on the Operator. Standards source: AGENTS.md (§Code comments, §Toolchain, §Docs), docs/adr/0010, runbook 0003 §7, and the workshop ADRs at origin/main (0006, 0007, 0012). Fixed point: origin/main 673c97a is an ancestor of the head, so the whole PR delta is git diff origin/main HEAD: 8 files, +43/−10, two commits.

Standards

No findings. The diff follows the rules the repo keeps and the neighbours that already do this.

  • AGENTS.md §Docs: no new link, no new page, no glossary change. Every changed sentence sits in a page that already carries the claim.
  • AGENTS.md §Code comments: the 3-line comment at silo/store/variables.tf:103-105 repeats the shape of the sibling blocks at :61-63 and :74-, so it follows the map's own practice.
  • workshop ADR 0012 (Decision): the policy is the apply shape minus s3:DeleteObject on the .tfstate. silo/store/openbao-deploy-state-policy.json differs from forge-edge-deploy-state-policy.json in the two object ARNs and nothing else (diff rc 1, exactly the two lines).
  • ADR 0006 / 0012: the key is scoped to one record, its lock and the bucket listing; nothing else is reachable.

Spec

ADVISORY — scripts/tests/key-audit.test.sh:167: the new assertion's message claims more than the case proves. It is named "the openbao deploy key matches its own file, not the apply file that deletes the record". I gave the deploy policy file the apply file's content in a scratch copy of the head tree, which is the PR body's own "Before (red)" mutation. The suite does go red, but the failing assertion is the neighbouring, pre-existing :163 ("the openbao apply key matches its own file"). The new :167 assertion stays ok under that mutation: the two files are identical, so the deploy key matches its file trivially. The new assertion does fail when the file is deleted (audit-notok=3) and when it is scoped to the wrong record (prod/forge-edge.tfstate → not ok on :167). So the case is real, and the body's "the case fails" lands on the apply-key assertion, not this one. Clearing change, optional: drop "not the apply file that deletes the record" from the message, or say in the body which assertion goes red.

Claims reproduced

Claim How I checked Result
Policy is the forge-edge deploy policy with two ARNs changed diff against forge-edge-deploy-state-policy.json Confirmed
No delete on the record; delete on the lock; list the bucket jq over every *-deploy-state-policy.json at head Same action set as each of the eight sibling deploy policies
tofu-deploy-state-openbao is 25 characters ${#name} 25; the sibling longest, tofu-deploy-state-forge-runner, is 30
Pair lives at secret/tofu-state/openbao/deploy key-mint.sh's own case on the file name, copied and run shape=deploy record=openbao → secret/tofu-state/openbao/deploy
Map entry resolves to the file key-mint.sh's map read (sed -nE) on the head variables.tf openbao-deploy-state-policy.json
Map ↔ files comm -3 of map policies against silo/store/*-policy.json Only provisioner-policy.json, silo-plan-state-policy.json, state-policy.json unmapped, identical to base
"25 declared" Map entries counted at base and head 24 → 25
"27 across the fleet" 25 declared + this repo's own two hand mints (26 at base) 27
README enumeration 9 + 6 + 7 + 3 25, equals the map
Runbook 0003 §7 row count Table rows at base and head 25 → 26; offset to the map is one both before and after
"nine rows of the table take it" / "The ninth is…" Counted deploy rows: forge 3, tracker 2, semaphore 1, runner 1, projects 1, openbao 1; ordinals walked through the paragraph Nine; "The next three are the forge's" is the right ordinal
Number-word census git grep over README, docs, scripts, silo for the count words No sentence left at the old total
make check mise exec -- make check at the head worktree rc 0, Success! The configuration is valid.; CI pr-checks / check (pull_request) is success on this SHA
New tests can fail Mutation wave on scratch copies of the head tree (table below) Reds as named
fmt leaves the tree clean fmt-check inside make check (green), then git status --porcelain in the head worktree Empty; I did not run make fmt itself

Mutation wave (each in a fresh git archive copy of the head, the repo's two suites run directly under the mise toolchain PATH):

Mutation key-audit-test key-mint-test
none (control) green green
deploy policy := apply policy content red (:163 apply-key assertion) green
deploy policy file deleted red (3) red (1)
map entry removed, file kept green red (does not declare 'tofu-deploy-state-openbao')
deploy policy scoped to forge-edge record red (:167) green
deploy policy grants DeleteObject on the record green green
base tests over head tree with the policy scoped wrong green green

The mutation rows show what the added test lines buy: they pin the key's name, its file, its map entry and its store path. They do not pin the action set (see below). The base tests do not notice the wrong-record fault (last row), so the added lines are the guard for it.

Named, not charged

  • The suites never check that the deploy policy lacks DeleteObject on the record (mutation row 5, both suites green). That holds for the eight sibling deploy policies, and workshop ADR 0012's last Consequence says what it buys is "a shape, not a check". Pre-existing; the PR claims only the diff against the sibling, which holds.
  • Live half not run, by the PR's own disclosure. The ticket's three acceptance criteria (make store-plan reads No changes after the import, make key-audit 0 failing against the live store, the pair refused prod/silo.tfstate and the delete of its own record) need the store's root credential and the mint, which is the Operator's act. The review profile's .env carries no store, AWS or MinIO names, so I could not attempt them. The offline half of the second criterion is covered by key-audit-test.
  • Merge Danger sentences are read, not driven. silo/store/state-keys.tf:29 carries prevent_destroy, and make store pipes its plan through scripts/store-plan-guard.sh (Makefile store: recipe). Both agree with the body's ordering advice. I did not run a plan.
  • Cross-repo sibling pages still list {apply,plan} for the OpenBao record (infra-secrets docs/store-layout.md:142, docs/guest-state.md:29 at origin/main). The body assigns that repo's side to SC-25 / SC-36; the ticket does not list it for this one.
  • Map placement. The ticket says the entry goes "beside the other deploy-shaped keys"; the map groups by record, and every earlier deploy key sits with its own record under a shape comment. The entry follows that grouping.

Summary

Axis Findings Worst
Standards 0 none
Spec 1 (0 blockers, 1 advisory) ADVISORY at scripts/tests/key-audit.test.sh:167, the assertion message overclaims against the body's red/green evidence

Blockers: 0, so the state is APPROVE. Advisories: 1, below the volume threshold of three, so the recommendation is merge. Merge after the Operator's mint is the body's own ordering, and it holds.

<!-- minos review-loop: repo=olympus/infra-silo pr=26 head=259d61e0aa140263b8ba599a1ed3926dbe2a1509 round=1/5 axes=standards,spec --> repo: olympus/infra-silo · PR: #26 · reviewed head: 259d61e0aa140263b8ba599a1ed3926dbe2a1509 · round 1/5 (the thread carries no earlier review, so the round is one; it matches the dispatch) · verdict: APPROVE, 0 blockers, 1 advisory Recommendation: merge **Spec source:** SL-27, "The OpenBao deploy key is declared in the store half and minted" (Vikunja project 7, task id 336), read live; the PR body links it as `SL-27`. The ticket's own comment (bot-telesphoros) says the live half waits on the Operator. **Standards source:** `AGENTS.md` (§Code comments, §Toolchain, §Docs), `docs/adr/0010`, runbook 0003 §7, and the workshop ADRs at `origin/main` (0006, 0007, 0012). Fixed point: `origin/main` 673c97a is an ancestor of the head, so the whole PR delta is `git diff origin/main HEAD`: 8 files, +43/−10, two commits. ## Standards No findings. The diff follows the rules the repo keeps and the neighbours that already do this. - `AGENTS.md` §Docs: no new link, no new page, no glossary change. Every changed sentence sits in a page that already carries the claim. - `AGENTS.md` §Code comments: the 3-line comment at `silo/store/variables.tf:103-105` repeats the shape of the sibling blocks at `:61-63` and `:74-`, so it follows the map's own practice. - workshop ADR 0012 (Decision): the policy is the apply shape minus `s3:DeleteObject` on the `.tfstate`. `silo/store/openbao-deploy-state-policy.json` differs from `forge-edge-deploy-state-policy.json` in the two object ARNs and nothing else (`diff` rc 1, exactly the two lines). - ADR 0006 / 0012: the key is scoped to one record, its lock and the bucket listing; nothing else is reachable. ## Spec **ADVISORY — `scripts/tests/key-audit.test.sh:167`: the new assertion's message claims more than the case proves.** It is named "the openbao deploy key matches its own file, not the apply file that deletes the record". I gave the deploy policy file the apply file's content in a scratch copy of the head tree, which is the PR body's own "Before (red)" mutation. The suite does go red, but the failing assertion is the neighbouring, pre-existing `:163` ("the openbao apply key matches its own file"). The new `:167` assertion stays `ok` under that mutation: the two files are identical, so the deploy key matches its file trivially. The new assertion does fail when the file is deleted (`audit-notok=3`) and when it is scoped to the wrong record (`prod/forge-edge.tfstate` → `not ok` on `:167`). So the case is real, and the body's "the case fails" lands on the apply-key assertion, not this one. Clearing change, optional: drop "not the apply file that deletes the record" from the message, or say in the body which assertion goes red. ## Claims reproduced | Claim | How I checked | Result | |---|---|---| | Policy is the forge-edge deploy policy with two ARNs changed | `diff` against `forge-edge-deploy-state-policy.json` | Confirmed | | No delete on the record; delete on the lock; list the bucket | `jq` over every `*-deploy-state-policy.json` at head | Same action set as each of the eight sibling deploy policies | | `tofu-deploy-state-openbao` is 25 characters | `${#name}` | 25; the sibling longest, `tofu-deploy-state-forge-runner`, is 30 | | Pair lives at `secret/tofu-state/openbao/deploy` | `key-mint.sh`'s own `case` on the file name, copied and run | `shape=deploy record=openbao` → `secret/tofu-state/openbao/deploy` | | Map entry resolves to the file | `key-mint.sh`'s map read (`sed -nE`) on the head `variables.tf` | `openbao-deploy-state-policy.json` | | Map ↔ files | `comm -3` of map policies against `silo/store/*-policy.json` | Only `provisioner-policy.json`, `silo-plan-state-policy.json`, `state-policy.json` unmapped, identical to base | | "25 declared" | Map entries counted at base and head | 24 → 25 | | "27 across the fleet" | 25 declared + this repo's own two hand mints (26 at base) | 27 | | README enumeration | 9 + 6 + 7 + 3 | 25, equals the map | | Runbook 0003 §7 row count | Table rows at base and head | 25 → 26; offset to the map is one both before and after | | "nine rows of the table take it" / "The ninth is…" | Counted `deploy` rows: forge 3, tracker 2, semaphore 1, runner 1, projects 1, openbao 1; ordinals walked through the paragraph | Nine; "The next three are the forge's" is the right ordinal | | Number-word census | `git grep` over README, docs, scripts, silo for the count words | No sentence left at the old total | | `make check` | `mise exec -- make check` at the head worktree | rc 0, `Success! The configuration is valid.`; CI `pr-checks / check (pull_request)` is `success` on this SHA | | New tests can fail | Mutation wave on scratch copies of the head tree (table below) | Reds as named | | `fmt` leaves the tree clean | `fmt-check` inside `make check` (green), then `git status --porcelain` in the head worktree | Empty; I did not run `make fmt` itself | Mutation wave (each in a fresh `git archive` copy of the head, the repo's two suites run directly under the mise toolchain PATH): | Mutation | key-audit-test | key-mint-test | |---|---|---| | none (control) | green | green | | deploy policy := apply policy content | red (`:163` apply-key assertion) | green | | deploy policy file deleted | red (3) | red (1) | | map entry removed, file kept | green | red (`does not declare 'tofu-deploy-state-openbao'`) | | deploy policy scoped to `forge-edge` record | red (`:167`) | green | | deploy policy grants `DeleteObject` on the record | green | green | | base tests over head tree with the policy scoped wrong | green | green | The mutation rows show what the added test lines buy: they pin the key's name, its file, its map entry and its store path. They do not pin the action set (see below). The base tests do not notice the wrong-record fault (last row), so the added lines are the guard for it. ## Named, not charged - **The suites never check that the deploy policy lacks `DeleteObject` on the record** (mutation row 5, both suites green). That holds for the eight sibling deploy policies, and workshop ADR 0012's last Consequence says what it buys is "a shape, not a check". Pre-existing; the PR claims only the diff against the sibling, which holds. - **Live half not run, by the PR's own disclosure.** The ticket's three acceptance criteria (`make store-plan` reads No changes after the import, `make key-audit` 0 failing against the live store, the pair refused `prod/silo.tfstate` and the delete of its own record) need the store's root credential and the mint, which is the Operator's act. The review profile's `.env` carries no store, AWS or MinIO names, so I could not attempt them. The offline half of the second criterion is covered by `key-audit-test`. - **Merge Danger sentences are read, not driven.** `silo/store/state-keys.tf:29` carries `prevent_destroy`, and `make store` pipes its plan through `scripts/store-plan-guard.sh` (`Makefile` `store:` recipe). Both agree with the body's ordering advice. I did not run a plan. - **Cross-repo sibling pages still list `{apply,plan}` for the OpenBao record** (`infra-secrets` `docs/store-layout.md:142`, `docs/guest-state.md:29` at `origin/main`). The body assigns that repo's side to SC-25 / SC-36; the ticket does not list it for this one. - **Map placement.** The ticket says the entry goes "beside the other deploy-shaped keys"; the map groups by record, and every earlier deploy key sits with its own record under a shape comment. The entry follows that grouping. ## Summary | Axis | Findings | Worst | |---|---|---| | Standards | 0 | none | | Spec | 1 (0 blockers, 1 advisory) | ADVISORY at `scripts/tests/key-audit.test.sh:167`, the assertion message overclaims against the body's red/green evidence | Blockers: 0, so the state is APPROVE. Advisories: 1, below the volume threshold of three, so the recommendation is `merge`. Merge after the Operator's mint is the body's own ordering, and it holds.
pit merged commit a241f952d2 into main 2026-11-09 16:55:31 +00:00
pit deleted branch hermes/sl27-openbao-deploy-key 2026-11-09 16:55:31 +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!26
No description provided.