Fetch the runner Stack's state key into .env (FO-52) #85

Merged
pit merged 1 commit from hermes/52-runner-state-key-env into main 2026-11-05 10:40:20 +00:00
Owner

Summary

make runner-guest refused at state_credentials: env.map named the forge Guest's and the Edge's state paths but not the runner's, so make env never filled FORGE_RUNNER_STATE_*. The store half landed with SL-21 (secret/tofu-state/forge-runner/apply, rev 1), so the row can land too.

 env.map
+secret/tofu-state/forge-runner/apply FORGE_RUNNER_STATE_ACCESS_KEY_ID FORGE_RUNNER_STATE_SECRET_ACCESS_KEY

 .env.example
+FORGE_RUNNER_STATE_ACCESS_KEY_ID=
+FORGE_RUNNER_STATE_SECRET_ACCESS_KEY=

The four places that promised the pair "once the store half that mints it has landed" — runbook 0001 §7/§8, README.md, the Makefile and runner/guest/backend.tf — now say where it comes from.

Evidence

  • Before: make runner-guest → error: FORGE_RUNNER_STATE_ACCESS_KEY_ID / FORGE_RUNNER_STATE_SECRET_ACCESS_KEY are empty in .env
  • After: make env ACTOR=pit reads secret/tofu-state/forge-runner/apply → … (rev 1); make runner-guest passes the gate, tofu init reads the backend, the plan renders (Plan: 1 to add, 0 to change, 0 to destroy), and the run stops at the prod word having applied nothing.
  • make check green: env.map: 17 names, all declared in .env.example.

Merge Danger

Door: two-way — reverting the row makes the next make env drop the two names again.

Blast Radius: low. .env in each checkout gains one pair; no Stack config changes and nothing is applied. A checkout that fetches before this merges keeps its current .env until its next make env.

Resolves FO-52.

## Summary `make runner-guest` refused at `state_credentials`: `env.map` named the forge Guest's and the Edge's state paths but not the runner's, so `make env` never filled `FORGE_RUNNER_STATE_*`. The store half landed with SL-21 (`secret/tofu-state/forge-runner/apply`, rev 1), so the row can land too. ```diff env.map +secret/tofu-state/forge-runner/apply FORGE_RUNNER_STATE_ACCESS_KEY_ID FORGE_RUNNER_STATE_SECRET_ACCESS_KEY .env.example +FORGE_RUNNER_STATE_ACCESS_KEY_ID= +FORGE_RUNNER_STATE_SECRET_ACCESS_KEY= ``` The four places that promised the pair "once the store half that mints it has landed" — runbook 0001 §7/§8, `README.md`, the `Makefile` and `runner/guest/backend.tf` — now say where it comes from. ## Evidence - **Before:** `make runner-guest` → `error: FORGE_RUNNER_STATE_ACCESS_KEY_ID / FORGE_RUNNER_STATE_SECRET_ACCESS_KEY are empty in .env` - **After:** `make env ACTOR=pit` reads `secret/tofu-state/forge-runner/apply → … (rev 1)`; `make runner-guest` passes the gate, `tofu init` reads the backend, the plan renders (`Plan: 1 to add, 0 to change, 0 to destroy`), and the run stops at the `prod` word having applied nothing. - `make check` green: `env.map: 17 names, all declared in .env.example`. ## Merge Danger **Door:** two-way — reverting the row makes the next `make env` drop the two names again. **Blast Radius:** low. `.env` in each checkout gains one pair; no Stack config changes and nothing is applied. A checkout that fetches before this merges keeps its current `.env` until its next `make env`. Resolves FO-52.
Fetch the runner Stack's state key into .env (FO-52)
All checks were successful
plan / guest-plan-check (pull_request) Successful in 22s
plan / edge-plan-check (pull_request) Successful in 23s
pr-checks / env-check (pull_request) Successful in 18s
pr-checks / fmt-check (pull_request) Successful in 17s
pr-checks / validate (pull_request) Successful in 22s
pr-checks / syntax-check (pull_request) Successful in 19s
pr-checks / docs-check (pull_request) Successful in 18s
6263791ac0
`make runner-guest` refused for want of FORGE_RUNNER_STATE_*, because
env.map named only the forge Guest's and the Edge's state paths. SL-21 has
written secret/tofu-state/forge-runner/apply, so the row can land: env.map
maps it beside the other two, .env.example declares both names, and the
sentences that promised the pair "once the store half has landed" now say
where it comes from.

Verified: make check green; make env ACTOR=pit reads the new path at rev 1;
make runner-guest gets past state_credentials, init reads the backend and the
plan renders, stopping at the prod word with nothing applied.
Member

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

**Review started** (round 1/5) on 6263791ac088dfd4b20381547c4525b26a734628 — reading the diff now.
bot-minos approved these changes 2026-11-05 10:39:19 +00:00
bot-minos left a comment

Review of olympus/infra-forge#85 · head 6263791ac088dfd4b20381547c4525b26a734628 · round 1/5 (the thread's count: no earlier review on this PR; matches the dispatch) · verdict: merge, no blockers

Recommendation: merge

Spec source: Vikunja FO-52 (task 287, project infra-forge), read live with its comment thread. PR body cites it with Resolves FO-52. FO-52's "What to build" list is the contract: the env.map row, the two .env.example names, and the "arrives with the store half" sentences rewritten as landed in runbook 0001 §7/§8, README.md, Makefile, runner/guest/backend.tf.
Standards source: AGENTS.md §Secrets, §State, §Code comments, §Docs, §Pull requests; docs/runbooks/0001-deploy-and-rollback.md §7/§8; docs/index.md (make docs-check).

Spec

No findings.

FO-52 requirement Result Evidence
env.map row beside the other two state rows met env.map:41, between the guest (:40) and edge (:42) rows
.env.example declares both names met .env.example:33-34
Promise sentences rewritten as landed (runbook §7, §8, README, Makefile, backend.tf) met docs/runbooks/0001-deploy-and-rollback.md:618,630-636,819-822; README.md:36,49-52; Makefile:126-130; runner/guest/backend.tf:8-10. Census of store half, arrives with, once the store, until then across the head tree: no surviving promise sentence
AC1: mise exec -- make check green met, reproduced rc=0; env.map: 17 names, all declared in .env.example; docs-check: all 5 assertions hold
AC2: after make env, make runner-guest passes state_credentials and tofu init reads the backend ("the Operator's run") not reproduced, see below the ticket assigns this to the Operator
"The PR must not merge before the path exists" merge condition, see below

Scope: the diff is the six files FO-52 names and nothing else. The Makefile and backend.tf hunks are comment-only (non-comment diff lines across Makefile, runner/guest/backend.tf and .env.example: only the two new .env.example names).

Standards

No findings. AGENTS.md §Code comments: the change removes comment text rather than adding any. §Secrets: no value in the diff, only names and a store path. §Docs: make docs-check is green (links, fragments, ADR index, section index, wiki coverage).

Verified, and how

Claim How Result
Head is the dispatched SHA git ls-remote origin refs/pull/85/head, at the start and again before posting 6263791a…, both times
make check green mise exec -- make check in a head worktree rc=0
make env fetches the new row and fills both names scripts/env.sh fetch at base c5bbe87 and at head, driven against a stub KV store built from each side's own env.map, ACTOR=pit, fake HOME, env -i base: rc=0, 9 secret reads, 752-byte .env. Head: rc=0, 10 reads (incl. GET /v1/secret/data/tofu-state/forge-runner/apply), mode 600, 902 bytes. Name diff base→head is exactly FORGE_RUNNER_STATE_ACCESS_KEY_ID and FORGE_RUNNER_STATE_SECRET_ACCESS_KEY
The names reach a sourced child set -a; . .env in a subshell both populated
Merge-ordering hazard is real and is what the docs now say same stub, runner path answering 404 rc=1, secret/tofu-state/forge-runner/apply does not exist in the store (404); nothing written, no .env created. The fetch is all-or-nothing, as the new runbook text says
Store half exists in the repos infra-silo@origin/main 431309f (SL-21): silo/store/forge-runner-state-policy.json and the plan policy; runbook 0003 §7 table rows tofu-state-forge-runner present
CI at this SHA commit statuses env-check, fmt-check, validate, syntax-check, guest-plan-check, edge-plan-check success; docs-check still running when read (I ran the same check locally: green)

Not verified, and why

  • That secret/tofu-state/forge-runner/apply holds rev 1 in the live store, and the PR body's make env ACTOR=pit / make runner-guest evidence. Reading the store needs the Operator's identity; a review agent's class is refused by make env. What I have is the ticket thread's statement (bot-telesphoros: both /apply and /plan answer 200 to the Operator at rev 1) plus the SL-21 policy files in infra-silo. I take it as the author's claim, not as something I saw.
  • tofu init reading the backend and the Plan: 1 to add line. Needs the live store and Proxmox credentials. FO-52 AC2 assigns this to the Operator.

Notes (not findings, not counted)

  • Merge condition, per FO-52: "The PR must not merge before the path exists." My stub run above shows why: with the path absent, every checkout's make env refuses wholesale. The human merging should confirm the path with make env ACTOR=pit first. I could not.
  • infra-secrets docs/store-layout.md §"secret/tofu-state/… — sixteen paths" (at origin/main) lists no forge-runner row. Runbook §8 points readers there for "the paths and their owners". That page is another repository's and this PR does not touch it; flagging it for whoever lands the runner's rows there.

Summary

Axis Findings Worst
Spec 0 none
Standards 0 none

0 BLOCKER, 0 ADVISORY. The recommendation turns on neither count: there is nothing to fix.

<!-- minos review-loop: repo=olympus/infra-forge pr=85 head=6263791ac088dfd4b20381547c4525b26a734628 round=1/5 axes=standards,spec --> **Review of olympus/infra-forge#85** · head `6263791ac088dfd4b20381547c4525b26a734628` · round 1/5 (the thread's count: no earlier review on this PR; matches the dispatch) · verdict: merge, no blockers Recommendation: merge **Spec source:** Vikunja FO-52 (task 287, project `infra-forge`), read live with its comment thread. PR body cites it with `Resolves FO-52`. FO-52's "What to build" list is the contract: the `env.map` row, the two `.env.example` names, and the "arrives with the store half" sentences rewritten as landed in runbook 0001 §7/§8, `README.md`, `Makefile`, `runner/guest/backend.tf`. **Standards source:** `AGENTS.md` §Secrets, §State, §Code comments, §Docs, §Pull requests; `docs/runbooks/0001-deploy-and-rollback.md` §7/§8; `docs/index.md` (`make docs-check`). ## Spec No findings. | FO-52 requirement | Result | Evidence | | --- | --- | --- | | `env.map` row beside the other two state rows | met | `env.map:41`, between the guest (`:40`) and edge (`:42`) rows | | `.env.example` declares both names | met | `.env.example:33-34` | | Promise sentences rewritten as landed (runbook §7, §8, README, Makefile, backend.tf) | met | `docs/runbooks/0001-deploy-and-rollback.md:618,630-636,819-822`; `README.md:36,49-52`; `Makefile:126-130`; `runner/guest/backend.tf:8-10`. Census of `store half`, `arrives with`, `once the store`, `until then` across the head tree: no surviving promise sentence | | AC1: `mise exec -- make check` green | met, reproduced | rc=0; `env.map: 17 names, all declared in .env.example`; `docs-check: all 5 assertions hold` | | AC2: after `make env`, `make runner-guest` passes `state_credentials` and `tofu init` reads the backend ("the Operator's run") | not reproduced, see below | the ticket assigns this to the Operator | | "The PR must not merge before the path exists" | merge condition, see below | | Scope: the diff is the six files FO-52 names and nothing else. The `Makefile` and `backend.tf` hunks are comment-only (non-comment diff lines across `Makefile`, `runner/guest/backend.tf` and `.env.example`: only the two new `.env.example` names). ## Standards No findings. `AGENTS.md` §Code comments: the change removes comment text rather than adding any. §Secrets: no value in the diff, only names and a store path. §Docs: `make docs-check` is green (links, fragments, ADR index, section index, wiki coverage). ## Verified, and how | Claim | How | Result | | --- | --- | --- | | Head is the dispatched SHA | `git ls-remote origin refs/pull/85/head`, at the start and again before posting | `6263791a…`, both times | | `make check` green | `mise exec -- make check` in a head worktree | rc=0 | | `make env` fetches the new row and fills both names | `scripts/env.sh fetch` at base `c5bbe87` and at head, driven against a stub KV store built from each side's own `env.map`, `ACTOR=pit`, fake `HOME`, `env -i` | base: rc=0, 9 secret reads, 752-byte `.env`. Head: rc=0, 10 reads (incl. `GET /v1/secret/data/tofu-state/forge-runner/apply`), mode 600, 902 bytes. Name diff base→head is exactly `FORGE_RUNNER_STATE_ACCESS_KEY_ID` and `FORGE_RUNNER_STATE_SECRET_ACCESS_KEY` | | The names reach a sourced child | `set -a; . .env` in a subshell | both populated | | Merge-ordering hazard is real and is what the docs now say | same stub, runner path answering 404 | rc=1, `secret/tofu-state/forge-runner/apply does not exist in the store (404); nothing written`, no `.env` created. The fetch is all-or-nothing, as the new runbook text says | | Store half exists in the repos | `infra-silo@origin/main` `431309f` (SL-21): `silo/store/forge-runner-state-policy.json` and the plan policy; runbook 0003 §7 table rows `tofu-state-forge-runner` | present | | CI at this SHA | commit statuses | `env-check`, `fmt-check`, `validate`, `syntax-check`, `guest-plan-check`, `edge-plan-check` success; `docs-check` still running when read (I ran the same check locally: green) | ## Not verified, and why - **That `secret/tofu-state/forge-runner/apply` holds rev 1 in the live store, and the PR body's `make env ACTOR=pit` / `make runner-guest` evidence.** Reading the store needs the Operator's identity; a review agent's class is refused by `make env`. What I have is the ticket thread's statement (bot-telesphoros: both `/apply` and `/plan` answer 200 to the Operator at rev 1) plus the SL-21 policy files in `infra-silo`. I take it as the author's claim, not as something I saw. - **`tofu init` reading the backend and the `Plan: 1 to add` line.** Needs the live store and Proxmox credentials. FO-52 AC2 assigns this to the Operator. ## Notes (not findings, not counted) - **Merge condition, per FO-52:** "The PR must not merge before the path exists." My stub run above shows why: with the path absent, every checkout's `make env` refuses wholesale. The human merging should confirm the path with `make env ACTOR=pit` first. I could not. - `infra-secrets` `docs/store-layout.md` §"`secret/tofu-state/…` — sixteen paths" (at `origin/main`) lists no `forge-runner` row. Runbook §8 points readers there for "the paths and their owners". That page is another repository's and this PR does not touch it; flagging it for whoever lands the runner's rows there. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 0 | none | | Standards | 0 | none | 0 BLOCKER, 0 ADVISORY. The recommendation turns on neither count: there is nothing to fix.
pit merged commit 9bd8dea35d into main 2026-11-05 10:40:20 +00:00
pit deleted branch hermes/52-runner-state-key-env 2026-11-05 10:40:20 +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-forge!85
No description provided.