The media Guests' state keys: six keys, three shapes each (THE-32, THE-33) #43

Merged
pit merged 1 commit from operator/media-state-keys into main 2026-12-02 18:13:11 +00:00
Owner

Adds the six state keys infra-media's two Guest Stacks need, one record per Stack, three shapes each:

Record apply plan deploy
prod/media-navidrome-guest.tfstate (117) tofu-state-media-navidrome tofu-plan-state-media-navidrome tofu-deploy-media-navidrome
prod/media-subwave-guest.tfstate (152) tofu-state-media-subwave tofu-plan-state-media-subwave tofu-deploy-media-subwave

Each policy names only its record and the .tflock beside it: the deploy shape writes the record and deletes only the lock (workshop ADR-0012); the plan shape reads the record and writes only the lock.

The names drop the record's -guest suffix. The store refuses a key name longer than 32 characters — tofu-deploy-state-media-navidrome-guest is 39 — so one record's three shapes share the shorter stem rather than one of them carrying a name of its own.

Minted and adopted. All six keys exist at the store with their policies embedded, and are imported into module.store.minio_iam_service_account.state_key, with the pairs at:

  • secret/tofu-state/media-{navidrome,subwave}-guest/{apply,deploy,plan}

Evidence on this head: make check rc 0, make validate "Success! The configuration is valid", make key-audit — 41 keys under silo/, 40 audited, 1 out of scope, 0 failing — and tofu plan -target=module.store in silo/: No changes. Your infrastructure matches the configuration.

The merge's store deploy is therefore a no-op for these six; nothing here creates a key on apply (the plan guard refuses a state-key create by name).

Adds the six state keys infra-media's two Guest Stacks need, one record per Stack, three shapes each: | Record | apply | plan | deploy | | --- | --- | --- | --- | | `prod/media-navidrome-guest.tfstate` (117) | `tofu-state-media-navidrome` | `tofu-plan-state-media-navidrome` | `tofu-deploy-media-navidrome` | | `prod/media-subwave-guest.tfstate` (152) | `tofu-state-media-subwave` | `tofu-plan-state-media-subwave` | `tofu-deploy-media-subwave` | Each policy names only its record and the `.tflock` beside it: the deploy shape writes the record and deletes only the lock (workshop ADR-0012); the plan shape reads the record and writes only the lock. The names drop the record's `-guest` suffix. The store refuses a key name longer than 32 characters — `tofu-deploy-state-media-navidrome-guest` is 39 — so one record's three shapes share the shorter stem rather than one of them carrying a name of its own. **Minted and adopted.** All six keys exist at the store with their policies embedded, and are imported into `module.store.minio_iam_service_account.state_key`, with the pairs at: - `secret/tofu-state/media-{navidrome,subwave}-guest/{apply,deploy,plan}` Evidence on this head: `make check` rc 0, `make validate` "Success! The configuration is valid", `make key-audit` — 41 keys under `silo/`, 40 audited, 1 out of scope, 0 failing — and `tofu plan -target=module.store` in `silo/`: **No changes. Your infrastructure matches the configuration.** The merge's store deploy is therefore a no-op for these six; nothing here creates a key on apply (the plan guard refuses a state-key create by name).
The media Guests' state keys: six keys, three shapes each (THE-32, THE-33)
All checks were successful
plan / stack-plan-check (pull_request_target) Successful in 20s
pr-checks / check (pull_request) Successful in 50s
5ffaa4ec25
infra-media's two Guest Stacks, 117 navidrome and 152 subwave, move their
state to the same tfstate bucket as the rest. Each record takes the three
shapes the table in runbook 0003 §7 names: the apply pair the Operator holds,
the plan shape a pull request reads, and the deploy shape the Semaphore runner
applies it with.

The key names drop the record's '-guest' suffix: the store refuses a name
longer than 32 characters and tofu-deploy-state-media-navidrome-guest is 39,
so one record's three keys share the shorter stem rather than one of them
carrying a name of its own.
Author
Owner

Waiting — queued behind olympus/infra-cockpit#40 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 18:05 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.

**Waiting** — queued behind olympus/infra-cockpit#40 (one review run at a time). The review run resumes on its own at Wed 2 Dec, 18:05 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Member

Review started (round 0/5) on 5ffaa4ec25 — reading the diff now.

**Review started** (round 0/5) on 5ffaa4ec254ed9d64e023f008cde6680ce3225bc — reading the diff now.
bot-minos approved these changes 2026-12-02 17:31:15 +00:00
bot-minos left a comment

olympus/infra-silo#43 · head 5ffaa4e · round 1/5 · axes: standards, spec

The dispatch numbered this attempt 0/5; the thread carries no prior review, so this is round 1 of 5.

Recommendation: merge

Spec source: the PR body (it states the six keys, their shapes and their evidence). THE-32 and THE-33 are the originating tickets; they are done and describe the two media Guests, not the state keys, so the body is the contract and the tickets are context. Standards source: AGENTS.md (secrets, privacy, comments, docs), docs/adr/0008 and 0009, workshop docs/adr/0012 at origin/main (16 files, same as the clone).

Standards

ADVISORY — docs/runbooks/0003-the-state-in-the-store.md:395 and :418 — §7's deploy-shape paragraph was not brought in step with the table it describes.
eleven rows of the table take it is now false: the table carries thirteen deploy rows (…:307,308,309,314,315,318,319,321,325,328,331 plus the two this diff adds at :334 and :337), and the paragraph's closing sentence, The last two are the agent Guests' (THE-62) (:418), now names the wrong pair — the table's last two deploy rows are media's. The THE-62 edit kept this paragraph in step, so the fix is the same shape: count thirteen and name tofu-deploy-media-navidrome and tofu-deploy-media-subwave at the end of the sequence. Nothing reds; make check passes and the table is authoritative for the record, but an operator reading §7 is told two things the table contradicts in the same section.

ADVISORY — silo/store/media-navidrome-guest-state-policy.json:10-35 and silo/store/media-subwave-guest-state-policy.json:10-35 — the apply shape is split where the family's is not.
Both files carry three statements: bucket pair, the record, the lock. Every other apply policy in the directory names the record and the lock in one statement's Resource array (silo/store/state-policy.json, and e.g. silo/store/paperclip-guest-state-policy.json:12-15). The reach is identical — the same three actions on the same two ARNs — and make key-audit canonicalises per statement, so nothing fails. Fold the two Resource entries into one statement to match the shape the other ten apply policies use (twelve apply-shaped files in silo/store/, the two media ones included).

Spec

No findings. Every claim the body makes that is checkable without the store holds at this head:

  • six entries in var.state_keys, one record per Stack, three shapes each (silo/store/variables.tf:122-134); table and map are the same 38-key set;
  • every policy names its own record and that record's .tflock only — twelve object statements across the six files, no cross-record reach, no DeleteObject on the record in the deploy shape (ADR-0012 verbatim), GetObject only on the record in the plan shape (ADR-0009);
  • the six names are 26/31/27/24/29/25 characters, inside the 32 the repo states;
  • make key-mint's own lookup resolves all six names to their file, and state_key_store_path derives secret/tofu-state/media-{navidrome,subwave}-guest/{apply,plan,deploy} — exactly what infra-media's env.map at origin/main reads and what its backend.tf record keys (prod/media-{navidrome,subwave}-guest.tfstate) name;
  • no scope creep: the only non-policy change is the §7 inventory this work belongs in.

Named, not charged

  • The "store refuses a key name longer than 32" wording at silo/store/variables.tf:126-128 is carried over from :117-119 and docs/runbooks/0003-the-state-in-the-store.md:402; the six new names do not contradict it. Pre-existing wording.
  • scripts/plan-check.py:52-53 lets a pure create pass the judge, so the green plan / stack-plan-check context at this head does not by itself prove the six keys are imported. That is the check's property, not this diff's — which is why the adoption claim sits under Could not verify rather than being charged.
  • Charter: no destroy or replace in the diff, no ADR, gate or workflow edit, no literal secret; the keys ride a resource that carries prevent_destroy. Nothing to escalate.

Verified

  • Head: refs/pull/43/head = 5ffaa4ec254ed9d64e023f008cde6680ce3225bc, and the worktree was checked out at it.
  • mise exec -- make check → rc 0: env-check and env-test, key-audit-test, key-mint-test, deploy-test, tofu fmt -check, and tofu validate answering Success! The configuration is valid.
  • CI at head: pr-checks / check (pull_request) success, plan / stack-plan-check (pull_request_target) success.
  • Reach read from the files: canon-equal to the sibling plan and deploy policies (record path normalised); apply = full on record and lock; deploy = apply minus DeleteObject on the record; plan = read record, full on lock.
  • Map ↔ table set equality (38/38), every referenced policy file present, no duplicate key name and no duplicate policy file.
  • infra-media at origin/main: both record keys and all four env.map paths match what these policies and names derive.

Could not verify

  • The live store: that all six keys exist with their policies embedded, that they are imported at module.store.minio_iam_service_account.state_key, and the body's tofu plan -target=module.store → No changes. This session has no store credential (MC_HOST_silo unset; the profile holds only the forge, tracker and paperclip keys).
  • make key-audit's 41 keys / 40 audited / 1 out of scope / 0 failing. Its figures do reconcile with the declaration set — 40 tofu* keys is 37 state keys plus tofu-provisioner, tofu-store-read and this Stack's own tofu-state, and the one out-of-scope key is the application credential — but I did not run it.

Summary

Standards: 2 findings, both ADVISORY — worst: the §7 deploy-shape prose left at "eleven rows" with the "last two" naming the wrong pair. Spec: 0 findings. No blockers stand, and two advisories are below the volume trip; the two travel as advice.

<!-- minos review-loop: repo=olympus/infra-silo pr=43 head=5ffaa4ec254ed9d64e023f008cde6680ce3225bc round=1/5 axes=standards,spec --> **olympus/infra-silo#43** · head `5ffaa4e` · round **1/5** · axes: standards, spec The dispatch numbered this attempt `0/5`; the thread carries no prior review, so this is round 1 of 5. Recommendation: merge Spec source: the PR body (it states the six keys, their shapes and their evidence). THE-32 and THE-33 are the originating tickets; they are `done` and describe the two media Guests, not the state keys, so the body is the contract and the tickets are context. Standards source: `AGENTS.md` (secrets, privacy, comments, docs), `docs/adr/0008` and `0009`, workshop `docs/adr/0012` at `origin/main` (16 files, same as the clone). ## Standards **ADVISORY — `docs/runbooks/0003-the-state-in-the-store.md:395` and `:418` — §7's deploy-shape paragraph was not brought in step with the table it describes.** `eleven rows of the table take it` is now false: the table carries thirteen deploy rows (…`:307,308,309,314,315,318,319,321,325,328,331` plus the two this diff adds at `:334` and `:337`), and the paragraph's closing sentence, `The last two are the agent Guests' (THE-62)` (`:418`), now names the wrong pair — the table's last two deploy rows are media's. The THE-62 edit kept this paragraph in step, so the fix is the same shape: count thirteen and name `tofu-deploy-media-navidrome` and `tofu-deploy-media-subwave` at the end of the sequence. Nothing reds; `make check` passes and the table is authoritative for the record, but an operator reading §7 is told two things the table contradicts in the same section. **ADVISORY — `silo/store/media-navidrome-guest-state-policy.json:10-35` and `silo/store/media-subwave-guest-state-policy.json:10-35` — the apply shape is split where the family's is not.** Both files carry three statements: bucket pair, the record, the lock. Every other apply policy in the directory names the record and the lock in one statement's `Resource` array (`silo/store/state-policy.json`, and e.g. `silo/store/paperclip-guest-state-policy.json:12-15`). The reach is identical — the same three actions on the same two ARNs — and `make key-audit` canonicalises per statement, so nothing fails. Fold the two `Resource` entries into one statement to match the shape the other ten apply policies use (twelve apply-shaped files in `silo/store/`, the two media ones included). ## Spec No findings. Every claim the body makes that is checkable without the store holds at this head: - six entries in `var.state_keys`, one record per Stack, three shapes each (`silo/store/variables.tf:122-134`); table and map are the same 38-key set; - every policy names its own record and that record's `.tflock` only — twelve object statements across the six files, no cross-record reach, no `DeleteObject` on the record in the deploy shape (`ADR-0012` verbatim), `GetObject` only on the record in the plan shape (`ADR-0009`); - the six names are 26/31/27/24/29/25 characters, inside the 32 the repo states; - `make key-mint`'s own lookup resolves all six names to their file, and `state_key_store_path` derives `secret/tofu-state/media-{navidrome,subwave}-guest/{apply,plan,deploy}` — exactly what `infra-media`'s `env.map` at `origin/main` reads and what its `backend.tf` record keys (`prod/media-{navidrome,subwave}-guest.tfstate`) name; - no scope creep: the only non-policy change is the §7 inventory this work belongs in. ## Named, not charged - The "store refuses a key name longer than 32" wording at `silo/store/variables.tf:126-128` is carried over from `:117-119` and `docs/runbooks/0003-the-state-in-the-store.md:402`; the six new names do not contradict it. Pre-existing wording. - `scripts/plan-check.py:52-53` lets a pure create pass the judge, so the green `plan / stack-plan-check` context at this head does not by itself prove the six keys are imported. That is the check's property, not this diff's — which is why the adoption claim sits under *Could not verify* rather than being charged. - Charter: no destroy or replace in the diff, no ADR, gate or workflow edit, no literal secret; the keys ride a resource that carries `prevent_destroy`. Nothing to escalate. ## Verified - Head: `refs/pull/43/head` = `5ffaa4ec254ed9d64e023f008cde6680ce3225bc`, and the worktree was checked out at it. - `mise exec -- make check` → rc 0: env-check and env-test, key-audit-test, key-mint-test, deploy-test, `tofu fmt -check`, and `tofu validate` answering `Success! The configuration is valid.` - CI at head: `pr-checks / check (pull_request)` success, `plan / stack-plan-check (pull_request_target)` success. - Reach read from the files: canon-equal to the sibling plan and deploy policies (record path normalised); apply = full on record and lock; deploy = apply minus `DeleteObject` on the record; plan = read record, full on lock. - Map ↔ table set equality (38/38), every referenced policy file present, no duplicate key name and no duplicate policy file. - `infra-media` at `origin/main`: both record keys and all four `env.map` paths match what these policies and names derive. ## Could not verify - The live store: that all six keys exist with their policies embedded, that they are imported at `module.store.minio_iam_service_account.state_key`, and the body's `tofu plan -target=module.store` → *No changes*. This session has no store credential (`MC_HOST_silo` unset; the profile holds only the forge, tracker and paperclip keys). - `make key-audit`'s `41 keys / 40 audited / 1 out of scope / 0 failing`. Its figures do reconcile with the declaration set — 40 `tofu*` keys is 37 state keys plus `tofu-provisioner`, `tofu-store-read` and this Stack's own `tofu-state`, and the one out-of-scope key is the application credential — but I did not run it. ## Summary Standards: 2 findings, both ADVISORY — worst: the §7 deploy-shape prose left at "eleven rows" with the "last two" naming the wrong pair. Spec: 0 findings. No blockers stand, and two advisories are below the volume trip; the two travel as advice.
pit merged commit e6a4834ce7 into main 2026-12-02 18:13:11 +00:00
pit deleted branch operator/media-state-keys 2026-12-02 18:13:11 +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!43
No description provided.