Declare the silo record's own plan key (SL-28) #32

Merged
pit merged 2 commits from hermes/SL-28-the-silo-plan-key-is-declared-its-path-w into main 2026-11-10 21:27:50 +00:00
Member

Implements SL-28

Summary

silo/store/variables.tf — one entry in var.state_keys, and the docs that had the plan key as the one exception:

      "tofu-deploy-state-openbao" = { policy = "openbao-deploy-state-policy.json" }
+
+     # This repository's own record's plan key …
+     "tofu-plan-state-silo" = { policy = "silo-plan-state-policy.json" }
+  }

tofu-plan-state-silo already exists in the store and already matches silo-plan-state-policy.json in make key-audit; what it lacked was a store path for its pair. With that path at
secret/tofu-state/silo/plan (under AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY, the backend's own two names), the entry joins the declaration like the other twenty-five and its import adopts the existing key by its bare access key — no second key, no server-generated secret (ADR 0005).

The apply key beside it stays the hand mint §0 draws: the Stack reads and writes its state with it, so a key this half declared could not be the key that runs the declaration.

Docs follow: runbook 0003 §7 (25 outside + this one = 26; the path and its two field names; the consumer is SL-30's secret for SL-31's check), ADR 0010 ("the one it does not cover" is now the apply key alone), README, the two state-key headers, runbook 0001's guard count.

Evidence

  • Before: mise exec -- make key-mint-test against origin/main's map →
    not ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan: … silo/store/variables.tf does not declare 'tofu-plan-state-silo' in var.state_keys
    key-mint-test: 1 case(s) failed (exit 2)

  • After: same command → ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan, key-mint-test: every case passed

  • mise exec -- make check → exit 0: env-check: the pin and the map agree., key-audit-test: every case passed, key-mint-test: every case passed, deploy tests: every case passed., fmt-check clean, Success! The configuration is valid.

  • Not run here — the live half, which needs the store's root credential (this repo's agent contract, docs/agents/workflow.md §3, keeps mutating Targets and make env off an agent's floor):

    1. write the pair at secret/tofu-state/silo/plan under AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY;
    2. mise exec -- make key-mint KEY=tofu-plan-state-silo ACCESS_KEY=<the existing key> SECRET_KEY=<the pair> — the create is skipped because the key exists, and the import adopts it by its bare access key (or runbook 0003 §7 The first import);
    3. mise exec -- make store-plan → No changes;
    4. MC_HOST_silo=… mise exec -- make key-audit → 0 failing.

    The three acceptance criteria on the ticket are these four lines' output; they stay unverified until the Operator runs them from main.

Merge Danger

Door: two-way — the entry only declares; scripts/store-plan-guard.sh makes make store refuse a create on any declared key, so a merge between the merge and the import cannot mint one.

Blast Radius: narrow — silo/store/{variables,state-keys}.tf and four documents. PROD is untouched until the Operator runs the mint/import above.

Implements [SL-28](https://vikunja.thepit.space/tasks/337) ## Summary `silo/store/variables.tf` — one entry in `var.state_keys`, and the docs that had the plan key as the one exception: ```diff "tofu-deploy-state-openbao" = { policy = "openbao-deploy-state-policy.json" } + + # This repository's own record's plan key … + "tofu-plan-state-silo" = { policy = "silo-plan-state-policy.json" } + } ``` `tofu-plan-state-silo` already exists in the store and already matches `silo-plan-state-policy.json` in `make key-audit`; what it lacked was a store path for its pair. With that path at `secret/tofu-state/silo/plan` (under `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`, the backend's own two names), the entry joins the declaration like the other twenty-five and its import adopts the existing key by its bare access key — no second key, no server-generated secret (ADR 0005). The apply key beside it stays the hand mint §0 draws: the Stack reads and writes its state with it, so a key this half declared could not be the key that runs the declaration. Docs follow: runbook 0003 §7 (25 outside + this one = 26; the path and its two field names; the consumer is SL-30's secret for SL-31's check), ADR 0010 ("the one it does not cover" is now the apply key alone), README, the two state-key headers, runbook 0001's guard count. ## Evidence - **Before:** `mise exec -- make key-mint-test` against `origin/main`'s map → `not ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan: … silo/store/variables.tf does not declare 'tofu-plan-state-silo' in var.state_keys` `key-mint-test: 1 case(s) failed` (exit 2) - **After:** same command → `ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan`, `key-mint-test: every case passed` - `mise exec -- make check` → exit 0: `env-check: the pin and the map agree.`, `key-audit-test: every case passed`, `key-mint-test: every case passed`, `deploy tests: every case passed.`, `fmt-check` clean, `Success! The configuration is valid.` - **Not run here — the live half, which needs the store's root credential** (this repo's agent contract, `docs/agents/workflow.md` §3, keeps mutating Targets and `make env` off an agent's floor): 1. write the pair at `secret/tofu-state/silo/plan` under `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`; 2. `mise exec -- make key-mint KEY=tofu-plan-state-silo ACCESS_KEY=<the existing key> SECRET_KEY=<the pair>` — the create is skipped because the key exists, and the import adopts it by its bare access key (or runbook 0003 §7 *The first import*); 3. `mise exec -- make store-plan` → `No changes`; 4. `MC_HOST_silo=… mise exec -- make key-audit` → 0 failing. The three acceptance criteria on the ticket are these four lines' output; they stay unverified until the Operator runs them from `main`. ## Merge Danger **Door:** two-way — the entry only declares; `scripts/store-plan-guard.sh` makes `make store` refuse a create on any declared key, so a merge between the merge and the import cannot mint one. **Blast Radius:** narrow — `silo/store/{variables,state-keys}.tf` and four documents. PROD is untouched until the Operator runs the mint/import above.
ticket-dispatch: declare the silo record's own plan key (SL-28)
All checks were successful
pr-checks / check (pull_request) Successful in 28s
aefc0ee8a1
The plan key `tofu-plan-state-silo` exists in the store and matches
`silo/store/silo-plan-state-policy.json`; what it lacked was a store path
for its pair, which is what kept it out of the first declaration. Its pair
goes at `secret/tofu-state/silo/plan`, so the entry joins `var.state_keys`
beside the other declared keys and adopts the key that already exists by its
bare access key rather than creating a second one (ADR 0005).

The apply key stays the hand mint §0 draws: the Stack reads and writes its
state with it, so a key this half declared could not be the key that runs the
declaration.

Docs read the change as fact: runbook 0003 §7 counts 26 declared, names the
path under the backend's two field names, and points the consumer at SL-30
(the secret) and SL-31 (the check); ADR 0010's "one it does not cover" is now
the apply key alone; README, both state-key headers and runbook 0001 follow.
`key-mint-test` gains the case that the pair belongs at that path.

The §7 heading stays "The other Stacks' keys": infra-tracker's
docs/reference/state.md links this runbook by that anchor.
Member

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

**Review started** (round 1/5) on aefc0ee8a179f38d49aabda19206b4bac40d0a6d — reading the diff now.
Merge remote-tracking branch 'origin/main' into hermes/SL-28-the-silo-plan-key-is-declared-its-path-w
All checks were successful
pr-checks / check (pull_request) Successful in 24s
dbd1e6bd8e
bot-minos approved these changes 2026-11-10 21:14:16 +00:00
bot-minos left a comment

Review loop: olympus/infra-silo · PR #32 · reviewed head dbd1e6bd8e9be86efad06d3918793b91c34f30ba · round 1/5 (no earlier review on the thread) · verdict: APPROVE

Recommendation: merge

Head note. The dispatch named aefc0ee8…; the branch took a merge of origin/main (dbd1e6b, SL-37's runbook 0001 paragraph and silo/guest/keys.d/semaphore-runner.pub) while I was reading. The author's own change is aefc0ee and is byte-identical in the merged tree: git diff --stat ffdb31d dbd1e6b is the same seven files and 42+/28- as 3eeb606..aefc0ee, and the one author hunk in runbook 0001 (twenty-six times, line 173) survived the merge. The checks below were re-run at dbd1e6b. Round 1 at aefc0ee posted no review, so the whole head was reviewed.

Spec source: SL-28 (Vikunja project 7, global id 337, the PR body's link), read live. Its build list is: write secret/tofu-state/silo/plan, declare the entry in var.state_keys, import by the bare access key. Its criteria are: the path reads back with both fields; make store-plan reads No changes; make key-audit reports 0 failing with no second key. Blocked-by SL-27 is done: true.
Standard: AGENTS.md §Rules (Secrets, Code comments), §Docs conventions, and docs/adr/index.md (one file per decision; reversing one is a new file). Standards sources were read from the head worktree.

Standards

  1. ADVISORY — the docs keep scoping the declared set to "the other Stacks'". This change makes the declared set include this repository's own plan key, but three sites still say otherwise: docs/adr/index.md:23 (ADR 0010's summary row: "The other Stacks' state keys are declared…"), README.md:141-142 (the new sentence says "declared with the rest", the next sentence says "The other Stacks' state keys are declared"), and docs/runbooks/0003-the-state-in-the-store.md:257 (the §7 heading "The other Stacks' keys", which now also covers the silo plan key). Fix in one clause per site; the §7 heading's anchor is linked from 0003:21 and 0003:175, so reword the summary and the README and leave the heading alone, or move the links with it. This is one finding with three sites.
  2. ADVISORY — prose states the plan check as present fact; it is not landed. README.md:129: "the plan key beside it is the plan check's, a repository secret and never .env". SL-30 (the repository secrets) and SL-31 (the check) are both done: false on the tracker. docs/runbooks/0003-the-state-in-the-store.md:275-276 says it correctly in the future tense ("this repository gains — SL-30 lands the secret, SL-31 the check") but its first clause, "That path is a repository secret", calls a store path a repository secret (the secret is SL-30's copy of what is at the path). One finding, two sites: put the README row in the same future tense and make the runbook clause "the repository secret SL-30 sets is a copy of what is at that path".

Not charged (precedent in the repo): the five-line comment at silo/store/variables.tf:108-112 against AGENTS.md §Code comments. Its neighbours (variables.tf:61-63, :74-76, :93-95, :103-106) carry comments of the same size and the same ticket pointers, so this is the file's own reading of the rule. The ADR 0010 edit (docs/adr/0010-…md:15-26) is an amendment under a standing decision; git log on that file shows SL-24, SL-27 and SL-26 each amended it the same way, so docs/adr/index.md:26 ("a new file … not an edit of the record") governs reversals and does not apply.

Spec

No findings. Verified against the ticket:

  • Declare the entry. silo/store/variables.tf:112 adds tofu-plan-state-silo with silo-plan-state-policy.json, which exists. The map now holds 26 entries (counted by sed/grep; matches the "twenty-six" the ADR, runbook 0003 §7 and runbook 0001 now say). The comment's reach claim (reads prod/silo.tfstate, writes only the lock) matches silo/store/silo-plan-state-policy.json.
  • Path. secret/tofu-state/silo/plan is what make key-mint derives for the key, and the case is in the test table (scripts/tests/key-mint.test.sh:325).
  • "Do not create a second key / adopt by bare access key." The runbook and README say so (0003 §7, with a working #the-first-import anchor at 0003:600); the mint's exists-path case (key-mint.test.sh, "a key that already exists is adopted, not refused") is the existing generic coverage of that path.
  • The PR's door claim (a merge before the import cannot mint a key): driven. scripts/store-plan-guard.sh fed a plan whose only change is a create on module.store.minio_iam_service_account.state_key["tofu-plan-state-silo"] exits 1 and names the address; a no-op exits 0.
  • Scope. Seven files, all on the key's declaration or the prose that counted or described it. No scope creep.

Verified by hand (head dbd1e6b, ls-remote equal before and after)

Claim How Result
make check exit 0 mise exec -- make check rc 0: env-check, key-audit-test, key-mint-test and deploy tests all "every case passed"; fmt-check and validate clean
Before: key-mint-test red on base head's test over the base tree 3eeb606 rc 2: not ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan … does not declare 'tofu-plan-state-silo', 1 case(s) failed (the new case fails without the entry)
After: green same Target at head ok tofu-plan-state-silo belongs at …, every case passed
Counts census of var.state_keys entries and silo/store/*policy.json 26 entries; 28 policy files (26 + provisioner-policy.json + state-policy.json)
Door guard driven with synthetic create and no-op plans refuses the create, passes the no-op

Could not verify

  • The live half, which the PR discloses as not run and which needs the store's root credential (docs/agents/workflow.md §3 keeps it off an agent's floor): that tofu-plan-state-silo exists in the store, that its parent is silo-admin (the owner ADR 0010 binds a declared key to), that the pair at secret/tofu-state/silo/plan reads back with both fields, that make store-plan reads No changes after the import, and that make key-audit reports 0 failing. These are the ticket's three acceptance criteria and stay open until the Operator runs them; the ticket is not closable from this merge alone.
  • CI status by SHA was not consulted.

Summary

Axis Findings Worst
Standards 2 (both ADVISORY) the declared set still described as "the other Stacks'" (docs/adr/index.md:23, README.md:141-142, 0003:257)
Spec 0 none

No blockers. Two advisories sit under the three-advisory line, so the recommendation is merge and both travel as advice.

<!-- minos review-loop: repo=olympus/infra-silo pr=32 head=dbd1e6bd8e9be86efad06d3918793b91c34f30ba round=1/5 axes=standards,spec --> **Review loop:** olympus/infra-silo · PR #32 · reviewed head `dbd1e6bd8e9be86efad06d3918793b91c34f30ba` · round 1/5 (no earlier review on the thread) · verdict: APPROVE Recommendation: merge **Head note.** The dispatch named `aefc0ee8…`; the branch took a merge of `origin/main` (`dbd1e6b`, SL-37's runbook 0001 paragraph and `silo/guest/keys.d/semaphore-runner.pub`) while I was reading. The author's own change is `aefc0ee` and is byte-identical in the merged tree: `git diff --stat ffdb31d dbd1e6b` is the same seven files and 42+/28- as `3eeb606..aefc0ee`, and the one author hunk in runbook 0001 (`twenty-six times`, line 173) survived the merge. The checks below were re-run at `dbd1e6b`. Round 1 at `aefc0ee` posted no review, so the whole head was reviewed. **Spec source:** SL-28 (Vikunja project 7, global id 337, the PR body's link), read live. Its build list is: write `secret/tofu-state/silo/plan`, declare the entry in `var.state_keys`, import by the bare access key. Its criteria are: the path reads back with both fields; `make store-plan` reads No changes; `make key-audit` reports 0 failing with no second key. Blocked-by SL-27 is `done: true`. **Standard:** `AGENTS.md` §Rules (Secrets, Code comments), §Docs conventions, and `docs/adr/index.md` (one file per decision; reversing one is a new file). Standards sources were read from the head worktree. ## Standards 1. **ADVISORY — the docs keep scoping the declared set to "the other Stacks'".** This change makes the declared set include this repository's own plan key, but three sites still say otherwise: `docs/adr/index.md:23` (ADR 0010's summary row: "The other Stacks' state keys are declared…"), `README.md:141-142` (the new sentence says "declared with the rest", the next sentence says "The other Stacks' state keys are **declared**"), and `docs/runbooks/0003-the-state-in-the-store.md:257` (the §7 heading "The other Stacks' keys", which now also covers the silo plan key). Fix in one clause per site; the §7 heading's anchor is linked from `0003:21` and `0003:175`, so reword the summary and the README and leave the heading alone, or move the links with it. This is one finding with three sites. 2. **ADVISORY — prose states the plan check as present fact; it is not landed.** `README.md:129`: "the plan key beside it is the plan check's, a repository secret and never `.env`". SL-30 (the repository secrets) and SL-31 (the check) are both `done: false` on the tracker. `docs/runbooks/0003-the-state-in-the-store.md:275-276` says it correctly in the future tense ("this repository gains — SL-30 lands the secret, SL-31 the check") but its first clause, "That path is a repository secret", calls a store path a repository secret (the secret is SL-30's copy of what is at the path). One finding, two sites: put the README row in the same future tense and make the runbook clause "the repository secret SL-30 sets is a copy of what is at that path". Not charged (precedent in the repo): the five-line comment at `silo/store/variables.tf:108-112` against `AGENTS.md` §Code comments. Its neighbours (`variables.tf:61-63`, `:74-76`, `:93-95`, `:103-106`) carry comments of the same size and the same ticket pointers, so this is the file's own reading of the rule. The ADR 0010 edit (`docs/adr/0010-…md:15-26`) is an amendment under a standing decision; `git log` on that file shows SL-24, SL-27 and SL-26 each amended it the same way, so `docs/adr/index.md:26` ("a new file … not an edit of the record") governs reversals and does not apply. ## Spec No findings. Verified against the ticket: - **Declare the entry.** `silo/store/variables.tf:112` adds `tofu-plan-state-silo` with `silo-plan-state-policy.json`, which exists. The map now holds 26 entries (counted by `sed`/`grep`; matches the "twenty-six" the ADR, runbook 0003 §7 and runbook 0001 now say). The comment's reach claim (reads `prod/silo.tfstate`, writes only the lock) matches `silo/store/silo-plan-state-policy.json`. - **Path.** `secret/tofu-state/silo/plan` is what `make key-mint` derives for the key, and the case is in the test table (`scripts/tests/key-mint.test.sh:325`). - **"Do not create a second key / adopt by bare access key."** The runbook and README say so (0003 §7, with a working `#the-first-import` anchor at `0003:600`); the mint's exists-path case (`key-mint.test.sh`, "a key that already exists is adopted, not refused") is the existing generic coverage of that path. - **The PR's door claim** (a merge before the import cannot mint a key): driven. `scripts/store-plan-guard.sh` fed a plan whose only change is a `create` on `module.store.minio_iam_service_account.state_key["tofu-plan-state-silo"]` exits 1 and names the address; a `no-op` exits 0. - **Scope.** Seven files, all on the key's declaration or the prose that counted or described it. No scope creep. ## Verified by hand (head `dbd1e6b`, ls-remote equal before and after) | Claim | How | Result | |---|---|---| | `make check` exit 0 | `mise exec -- make check` | rc 0: env-check, `key-audit-test`, `key-mint-test` and deploy tests all "every case passed"; `fmt-check` and `validate` clean | | Before: key-mint-test red on base | head's test over the base tree `3eeb606` | rc 2: `not ok tofu-plan-state-silo belongs at secret/tofu-state/silo/plan … does not declare 'tofu-plan-state-silo'`, `1 case(s) failed` (the new case fails without the entry) | | After: green | same Target at head | `ok tofu-plan-state-silo belongs at …`, every case passed | | Counts | census of `var.state_keys` entries and `silo/store/*policy.json` | 26 entries; 28 policy files (26 + `provisioner-policy.json` + `state-policy.json`) | | Door | guard driven with synthetic create and no-op plans | refuses the create, passes the no-op | ## Could not verify - The live half, which the PR discloses as not run and which needs the store's root credential (`docs/agents/workflow.md` §3 keeps it off an agent's floor): that `tofu-plan-state-silo` exists in the store, that its parent is `silo-admin` (the owner ADR 0010 binds a declared key to), that the pair at `secret/tofu-state/silo/plan` reads back with both fields, that `make store-plan` reads No changes after the import, and that `make key-audit` reports 0 failing. These are the ticket's three acceptance criteria and stay open until the Operator runs them; the ticket is not closable from this merge alone. - CI status by SHA was not consulted. ## Summary | Axis | Findings | Worst | |---|---|---| | Standards | 2 (both ADVISORY) | the declared set still described as "the other Stacks'" (`docs/adr/index.md:23`, `README.md:141-142`, `0003:257`) | | Spec | 0 | none | No blockers. Two advisories sit under the three-advisory line, so the recommendation is merge and both travel as advice.
pit merged commit d69964a5cc into main 2026-11-10 21:27:50 +00:00
pit deleted branch hermes/SL-28-the-silo-plan-key-is-declared-its-path-w 2026-11-10 21:27:50 +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!32
No description provided.