infra-secrets' env.map serves the runner and the secrets actor (SC-36) #45

Merged
pit merged 1 commit from hermes/SC-36-infra-secrets-env-map-serves-the-runner into main 2026-11-10 21:04:17 +00:00
Member

Implements SC-36

Summary

env.map is the one place that says which of an actor's names come from the store, and until now it served only the Operator and the Admin agent. Every row now names exactly the actors whose policy reads its path (bao/policies/*.hcl), which is what lets one map serve a person, a deploy on 145 and a CI login without any of them walking into a 403 that was never theirs.

 env.map
 # Operator + Admin agent: the key the Stack applies with
 actors=pit,hermes secret/tofu-state/openbao/apply OPENBAO_STATE_ACCESS_KEY_ID OPENBAO_STATE_SECRET_ACCESS_KEY
+# the runner: the same pair of names, on the record's deploy key
+actors=runner secret/tofu-state/openbao/deploy OPENBAO_STATE_ACCESS_KEY_ID OPENBAO_STATE_SECRET_ACCESS_KEY
+# the runner's own token — 145 holds no prod.age to fill this from
+actors=runner secret/homelab/proxmox/runner-token PROXMOX_VE_API_TOKEN
+# this repo's CI trigger: its Semaphore token and nothing else
+actors=secrets secret/ci/secrets/semaphore-api SEMAPHORE_API_TOKEN
-literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN
+actors=pit,hermes literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN

The literal is scoped because the age class is the Operator's and the Admin agent's. A deploy on the runner takes its token from the store row and its endpoint from the job's environment (CP-39), so PROXMOX_VE_ENDPOINT is deliberately not written into a runner's .env.

What each actor's fetch now fills, and the proof it reads nothing else:

pit      OPENBAO_STATE_ACCESS_KEY_ID · OPENBAO_STATE_SECRET_ACCESS_KEY · PROXMOX_VE_ENDPOINT · PROXMOX_VE_API_TOKEN   1 path (apply)
runner   OPENBAO_STATE_ACCESS_KEY_ID · OPENBAO_STATE_SECRET_ACCESS_KEY · PROXMOX_VE_API_TOKEN                        2 paths (deploy, runner-token)
secrets  SEMAPHORE_API_TOKEN                                                                                         1 path  (ci/secrets/semaphore-api)

Evidence

Before: scripts/tests/run.sh had no case for this repository's own map, so nothing pinned the three name sets. Driven against the stub store, the new case fails on the old map:

repo map actors
  ok    pit: the fetch exits 0
  ok    pit: four names, one path, two from the age class
  FAIL  runner: the fetch exits 0 with no 403 (want [0], got [1])
  FAIL  runner: the deploy path is read (missing [GET /v1/secret/data/tofu-state/openbao/deploy])
  FAIL  secrets: the fetch exits 0 (want [0], got [1])
  FAIL  secrets: its own path is read (missing [GET /v1/secret/data/ci/secrets/semaphore-api])

After: mise exec -- make check, the whole credential-free floor:

env-check: the vendored copy against its pin, and the map against .env.example.
  ok    scripts/env.sh matches infra-secrets@dc5a0e58…
  ok    env.map: 5 names, all declared in .env.example
env-check: the pin and the map agree.
env fetch: every case passed.
plan tests: every case passed.

The new case drives the repository's real env.map — not a synthetic one — through all three actors. The stub holds all four paths and answers 200 to each, so a GET in its request log is what proves an actor read a path: pit reads only the apply key, the runner only its two, and secrets only its own. It also asserts that pit's set is the same four names as before, and that PROXMOX_VE_ENDPOINT is absent from the runner's file.

Not verified here, and named on the ticket: the live AppRole run on 145. env-fetch.md already records that 145 carries no make, jq or age until TR-58 brings the toolchain, so make env ACTOR=runner cannot yet be run to the end on that Guest by this change alone.

Merge Danger

Door: two-way — the map is a file, and reverting the commit restores the old rows; nothing has been applied to the store.

Blast Radius: contained.

  • No credential moves and scripts/env.sh is untouched, so its pin and the four vendored copies in the sibling repos are unchanged.
  • The scopes are what keep the blast small: a wrong scope shows up as a 403 at fetch time (a row read by an actor without the policy) or a missing name in .env (a row nobody reads) — both loud, neither silent.
  • The runner now holds this repository's deploy key in .env on 145. That key writes state and deletes only its lock; the reach was already granted in SC-25.
  • docs/env-fetch.md and docs/store-layout.md were corrected where they still described the runner's row as pending — the map's own record, not new claims.
Implements [SC-36](https://vikunja.thepit.space/tasks/356) ## Summary `env.map` is the one place that says which of an actor's names come from the store, and until now it served only the Operator and the Admin agent. Every row now names exactly the actors whose policy reads its path (`bao/policies/*.hcl`), which is what lets one map serve a person, a deploy on 145 and a CI login without any of them walking into a 403 that was never theirs. ```diff env.map # Operator + Admin agent: the key the Stack applies with actors=pit,hermes secret/tofu-state/openbao/apply OPENBAO_STATE_ACCESS_KEY_ID OPENBAO_STATE_SECRET_ACCESS_KEY +# the runner: the same pair of names, on the record's deploy key +actors=runner secret/tofu-state/openbao/deploy OPENBAO_STATE_ACCESS_KEY_ID OPENBAO_STATE_SECRET_ACCESS_KEY +# the runner's own token — 145 holds no prod.age to fill this from +actors=runner secret/homelab/proxmox/runner-token PROXMOX_VE_API_TOKEN +# this repo's CI trigger: its Semaphore token and nothing else +actors=secrets secret/ci/secrets/semaphore-api SEMAPHORE_API_TOKEN -literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN +actors=pit,hermes literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN ``` The literal is scoped because the age class is the Operator's and the Admin agent's. A deploy on the runner takes its token from the store row and its **endpoint from the job's environment** (CP-39), so `PROXMOX_VE_ENDPOINT` is deliberately not written into a runner's `.env`. What each actor's fetch now fills, and the proof it reads nothing else: ```text pit OPENBAO_STATE_ACCESS_KEY_ID · OPENBAO_STATE_SECRET_ACCESS_KEY · PROXMOX_VE_ENDPOINT · PROXMOX_VE_API_TOKEN 1 path (apply) runner OPENBAO_STATE_ACCESS_KEY_ID · OPENBAO_STATE_SECRET_ACCESS_KEY · PROXMOX_VE_API_TOKEN 2 paths (deploy, runner-token) secrets SEMAPHORE_API_TOKEN 1 path (ci/secrets/semaphore-api) ``` ## Evidence **Before:** `scripts/tests/run.sh` had no case for this repository's own map, so nothing pinned the three name sets. Driven against the stub store, the new case fails on the old map: ```text repo map actors ok pit: the fetch exits 0 ok pit: four names, one path, two from the age class FAIL runner: the fetch exits 0 with no 403 (want [0], got [1]) FAIL runner: the deploy path is read (missing [GET /v1/secret/data/tofu-state/openbao/deploy]) FAIL secrets: the fetch exits 0 (want [0], got [1]) FAIL secrets: its own path is read (missing [GET /v1/secret/data/ci/secrets/semaphore-api]) ``` **After:** `mise exec -- make check`, the whole credential-free floor: ```text env-check: the vendored copy against its pin, and the map against .env.example. ok scripts/env.sh matches infra-secrets@dc5a0e58… ok env.map: 5 names, all declared in .env.example env-check: the pin and the map agree. env fetch: every case passed. plan tests: every case passed. ``` The new case drives the repository's real `env.map` — not a synthetic one — through all three actors. The stub holds all four paths and answers 200 to each, so a `GET` in its request log is what proves an actor read a path: pit reads only the apply key, the runner only its two, and `secrets` only its own. It also asserts that pit's set is the same four names as before, and that `PROXMOX_VE_ENDPOINT` is absent from the runner's file. Not verified here, and named on the ticket: the live AppRole run on 145. `env-fetch.md` already records that 145 carries no `make`, `jq` or `age` until TR-58 brings the toolchain, so `make env ACTOR=runner` cannot yet be run to the end on that Guest by this change alone. ## Merge Danger **Door:** two-way — the map is a file, and reverting the commit restores the old rows; nothing has been applied to the store. **Blast Radius:** contained. - No credential moves and `scripts/env.sh` is untouched, so its pin and the four vendored copies in the sibling repos are unchanged. - The scopes are what keep the blast small: a wrong scope shows up as a 403 at fetch time (a row read by an actor without the policy) or a missing name in `.env` (a row nobody reads) — both loud, neither silent. - The runner now holds this repository's deploy key in `.env` on 145. That key writes state and deletes only its lock; the reach was already granted in SC-25. - `docs/env-fetch.md` and `docs/store-layout.md` were corrected where they still described the runner's row as pending — the map's own record, not new claims.
ticket-dispatch: serve the runner and the secrets actor from env.map (SC-36)
All checks were successful
pr-checks / check (pull_request) Successful in 20s
870e5ba2fd
Every row now names exactly the actors whose policy reads its path, checked
against bao/policies/: the Operator's and the Admin agent's apply key stays
pit,hermes, and the literal PROD Proxmox pair is scoped to them with it. The
runner gains the record's deploy key under the Stack's own state names and its
own Proxmox token; the CI login gains SEMAPHORE_API_TOKEN.

The endpoint is deliberately not the runner's: a deploy takes it from its job's
environment, never from the store.

The env suite gains a case that drives this repository's own map through all
three actors against the stub store, so pit's name set is proved unchanged and
each actor is proved to read its rows and no others.
Member

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

**Review started** (round 1/5) on 870e5ba2fdb2eec42e6d862bf1d2c9db0a9f0e79 — reading the diff now.
bot-minos approved these changes 2026-11-10 20:48:34 +00:00
Dismissed
bot-minos left a comment

Review — repo olympus/infra-secrets · PR #45 · head 870e5ba2fdb2eec42e6d862bf1d2c9db0a9f0e79 · round 1/5 (the thread carries no earlier review; the dispatch also said 1/5) · verdict: merge, with one advisory

Recommendation: merge

Spec and standard

  • Spec: SC-36 (Vikunja project 8, task 356, read live; its description and both comments). The PR body links it, and it governs. Its three acceptance criteria are judged below.
  • Standard: AGENTS.md §Checks (make check is the floor, reported as pr-checks / check (pull_request)); docs/env-fetch.md §the map's four rules; workshop ADR-0012 (a deploy key reads and writes the record, cannot delete it) and ADR-0009 (PROD deploys through a merge). The repo keeps no docs/adr/ of its own (AGENTS.md §Decisions). No documented standard is broken.
  • Delta: round 1, so the whole head. The change is one commit, 870e5ba, on merge-base 65eb4a3, and it touches 5 files. scripts/env.sh and the Makefile are untouched.

Spec axis

SC-36 requirement State Evidence I reproduced
Each row names exactly the actors whose policy reads its path, checked against bao/policies/*.hcl met automation-runner.hcl:56 (runner-token) and :171 (openbao/deploy) are read by the runner. ci-secrets.hcl carries one named path, secret/data/ci/secrets/semaphore-api. operator.hcl:8 and admin-agent.hcl:4 are the age-class and apply-key actors.
The literal row is actors=pit,hermes met env.map:55
Add actors=runner …/openbao/deploy under the names the backend reads met env.map:51. The Makefile's state_credentials (Makefile:189) maps OPENBAO_STATE_* onto the AWS_* pair, so the reading is right. ADR-0012 matches the body's "writes state, deletes only its lock".
Add actors=runner …/runner-token PROXMOX_VE_API_TOKEN met env.map:52
Add actors=secrets …/semaphore-api SEMAPHORE_API_TOKEN met env.map:53
.env.example declares every name met env-check: env.map: 5 names, all declared in .env.example
AC1: mise exec -- make check is green met I ran it at the head worktree: rc 0, log cache/scratch/infra-secrets-45-r1/make-check-head.log. The suite is 165 ok and 0 FAIL on three further reruns. CI by SHA: pr-checks / check (pull_request) is success.
AC2: make env ACTOR=pit fetches the same name set as today met The new case asserts 4 names · 1 paths · 2 from the age class, plus the apply path read and the deploy, runner-token and CI paths unread.
AC3: AppRole login on 145 as the runner runs make env ACTOR=runner to the end not verified The map half is proved against the stub store (below). The live run on 145 is the Operator's. The body and the env-fetch.md paragraph both name the missing toolchain (TR-58). I do not charge it: it is disclosed, and it waits on a different change.

Red/green, driven by me. I ran head's suite over base's env.map and .env.example: rc 1 with 13 FAIL rows, all in repo map actors. Every FAIL line is a runner or secrets assertion, which matches the body's "Before" block. Head's own map is green.

Mutations of head's env.map, each driven through head's suite:

Mutation Result
apply row also served to runner red, 2 rows
secrets row also served to runner red, 2 rows
runner deploy row unscoped red, 6 rows
runner token row deleted red, 2 rows
runner deploy row pointed at …/apply red, 4 rows
literal row unscoped green, survives
literal row also served to runner green, survives
hermes dropped from the apply row green, survives
hermes dropped from the literal row green, survives

Findings

  1. ADVISORY — the new case pins three of the map's scopes, and leaves the literal's scope and the hermes half of pit,hermes unpinned. Evidence: the four survivors above. scripts/tests/run.sh:848 removes prod.age before the runner run, so the runner never sees the age class. A literal that reached the runner would therefore write nothing and the case stays green. No case drives hermes against this repo's map (run.sh:823, :851, :875 drive pit, runner and secrets only). Dropping the Admin agent from env.map:50 or :55 would break its make env with no red. The ticket's "literal row: actors=pit,hermes" is the requirement this leaves unpinned. Clearing change: a hermes fetch in the same case (the stub and a seeded hermes key already exist at run.sh:199-213) asserting the same four names as pit. Also a runner run on a machine whose prod.age opens for the runner, asserting PROXMOX_VE_ENDPOINT= is absent. Not a blocker: the new case is real, goes red on the old map, and kills five of nine mutants. The row it leaves open is one the repo's own docs say does not occur on 145.

Standards axis

No findings. Checked:

  • env.map comments and docs/env-fetch.md agree with each other on the row count (four store rows and one literal, five names, matching env-check).
  • The docs/store-layout.md deploy-row cell no longer says "its fetch row is SC-36's", and docs/env-fetch.md no longer says the runner's row is pending.
  • A census of SC-36 across the head tree leaves exactly one tense left behind (below).
  • .env.example states the source for each name per actor.
  • The new case follows the suite's own helpers (new_case, start_stub, assert_*), and the stub is the shipped stub_store.py.
  • The branch merges cleanly into current main (a22d59f, one commit ahead, touching docs/store-layout.md on a different line). git merge-tree reports no conflict.

Named, not charged

  • bao/policies/automation-runner.hcl:168 still reads "SC-36 adds the fetch row that reads this path as the runner". It is untouched on purpose and the handoff discloses why: the policy file is applied by the service role, so a comment-only edit would trigger a live store write. It belongs to the next change that edits that file.
  • The rule's wording, "names exactly the actors whose policy reads its path" (env.map header; the ticket's own sentence), is narrower in practice than it reads. operator.hcl:8 (secret/data/*) and admin-agent.hcl:4 (secret/*) read every path in the map, so the scoping is the repo's intent for who is served, not a statement about who the store would refuse. This is the ticket's phrasing, so I leave it.
  • Not verified, and not reproducible from the review host: the live runner AppRole fetch on 145 (AC3 above), and that the store holds the four paths today. The map side is proved against the stub store only. For the Operator: before the first runner deploy, secret/tofu-state/openbao/deploy and secret/homelab/proxmox/runner-token must hold the field names the rows read, OPENBAO_STATE_* and PROXMOX_VE_API_TOKEN. The 404 and missing-field paths refuse the whole fetch and write no .env, so a mismatch is loud, not silent.

Summary

Axis Findings Worst
Standards 0 none
Spec 1 (0 BLOCKER, 1 ADVISORY) ADVISORY: the literal's scope and hermes have no pinning case; AC3 is an Operator step, disclosed, not verified here

No blockers, one advisory. The recommendation is merge, and one advisory does not trip the volume rule.

<!-- minos review-loop: repo=olympus/infra-secrets pr=45 head=870e5ba2fdb2eec42e6d862bf1d2c9db0a9f0e79 round=1/5 axes=standards,spec --> **Review** — repo olympus/infra-secrets · PR #45 · head `870e5ba2fdb2eec42e6d862bf1d2c9db0a9f0e79` · round 1/5 (the thread carries no earlier review; the dispatch also said 1/5) · verdict: merge, with one advisory Recommendation: merge ## Spec and standard - **Spec:** SC-36 (Vikunja project 8, task 356, read live; its description and both comments). The PR body links it, and it governs. Its three acceptance criteria are judged below. - **Standard:** `AGENTS.md` §Checks (`make check` is the floor, reported as `pr-checks / check (pull_request)`); `docs/env-fetch.md` §the map's four rules; workshop ADR-0012 (a deploy key reads and writes the record, cannot delete it) and ADR-0009 (PROD deploys through a merge). The repo keeps no `docs/adr/` of its own (`AGENTS.md` §Decisions). No documented standard is broken. - **Delta:** round 1, so the whole head. The change is one commit, `870e5ba`, on merge-base `65eb4a3`, and it touches 5 files. `scripts/env.sh` and the Makefile are untouched. ## Spec axis | SC-36 requirement | State | Evidence I reproduced | | --- | --- | --- | | Each row names exactly the actors whose policy reads its path, checked against `bao/policies/*.hcl` | met | `automation-runner.hcl:56` (runner-token) and `:171` (`openbao/deploy`) are read by the runner. `ci-secrets.hcl` carries one named path, `secret/data/ci/secrets/semaphore-api`. `operator.hcl:8` and `admin-agent.hcl:4` are the age-class and apply-key actors. | | The literal row is `actors=pit,hermes` | met | `env.map:55` | | Add `actors=runner …/openbao/deploy` under the names the backend reads | met | `env.map:51`. The Makefile's `state_credentials` (`Makefile:189`) maps `OPENBAO_STATE_*` onto the `AWS_*` pair, so the reading is right. ADR-0012 matches the body's "writes state, deletes only its lock". | | Add `actors=runner …/runner-token PROXMOX_VE_API_TOKEN` | met | `env.map:52` | | Add `actors=secrets …/semaphore-api SEMAPHORE_API_TOKEN` | met | `env.map:53` | | `.env.example` declares every name | met | `env-check`: `env.map: 5 names, all declared in .env.example` | | AC1: `mise exec -- make check` is green | met | I ran it at the head worktree: rc 0, log `cache/scratch/infra-secrets-45-r1/make-check-head.log`. The suite is 165 ok and 0 FAIL on three further reruns. CI by SHA: `pr-checks / check (pull_request)` is success. | | AC2: `make env ACTOR=pit` fetches the same name set as today | met | The new case asserts `4 names · 1 paths · 2 from the age class`, plus the apply path read and the deploy, runner-token and CI paths unread. | | AC3: AppRole login on 145 as the runner runs `make env ACTOR=runner` to the end | **not verified** | The map half is proved against the stub store (below). The live run on 145 is the Operator's. The body and the `env-fetch.md` paragraph both name the missing toolchain (TR-58). I do not charge it: it is disclosed, and it waits on a different change. | **Red/green, driven by me.** I ran head's suite over base's `env.map` and `.env.example`: rc 1 with 13 FAIL rows, all in `repo map actors`. Every FAIL line is a runner or secrets assertion, which matches the body's "Before" block. Head's own map is green. **Mutations of head's `env.map`, each driven through head's suite:** | Mutation | Result | | --- | --- | | apply row also served to `runner` | red, 2 rows | | `secrets` row also served to `runner` | red, 2 rows | | runner deploy row unscoped | red, 6 rows | | runner token row deleted | red, 2 rows | | runner deploy row pointed at `…/apply` | red, 4 rows | | literal row unscoped | **green, survives** | | literal row also served to `runner` | **green, survives** | | `hermes` dropped from the apply row | **green, survives** | | `hermes` dropped from the literal row | **green, survives** | ### Findings 1. **ADVISORY — the new case pins three of the map's scopes, and leaves the literal's scope and the `hermes` half of `pit,hermes` unpinned.** Evidence: the four survivors above. `scripts/tests/run.sh:848` removes `prod.age` before the runner run, so the runner never sees the age class. A literal that reached the runner would therefore write nothing and the case stays green. No case drives `hermes` against this repo's map (`run.sh:823`, `:851`, `:875` drive pit, runner and secrets only). Dropping the Admin agent from `env.map:50` or `:55` would break its `make env` with no red. The ticket's "literal row: `actors=pit,hermes`" is the requirement this leaves unpinned. Clearing change: a `hermes` fetch in the same case (the stub and a seeded `hermes` key already exist at `run.sh:199-213`) asserting the same four names as pit. Also a runner run on a machine whose `prod.age` opens for the runner, asserting `PROXMOX_VE_ENDPOINT=` is absent. Not a blocker: the new case is real, goes red on the old map, and kills five of nine mutants. The row it leaves open is one the repo's own docs say does not occur on 145. ## Standards axis No findings. Checked: - `env.map` comments and `docs/env-fetch.md` agree with each other on the row count (four store rows and one literal, five names, matching `env-check`). - The `docs/store-layout.md` `deploy`-row cell no longer says "its fetch row is SC-36's", and `docs/env-fetch.md` no longer says the runner's row is pending. - A census of `SC-36` across the head tree leaves exactly one tense left behind (below). - `.env.example` states the source for each name per actor. - The new case follows the suite's own helpers (`new_case`, `start_stub`, `assert_*`), and the stub is the shipped `stub_store.py`. - The branch merges cleanly into current `main` (`a22d59f`, one commit ahead, touching `docs/store-layout.md` on a different line). `git merge-tree` reports no conflict. ## Named, not charged - `bao/policies/automation-runner.hcl:168` still reads "SC-36 adds the fetch row that reads this path as the runner". It is untouched on purpose and the handoff discloses why: the policy file is applied by the service role, so a comment-only edit would trigger a live store write. It belongs to the next change that edits that file. - The rule's wording, "names exactly the actors whose policy reads its path" (`env.map` header; the ticket's own sentence), is narrower in practice than it reads. `operator.hcl:8` (`secret/data/*`) and `admin-agent.hcl:4` (`secret/*`) read every path in the map, so the scoping is the repo's intent for who is served, not a statement about who the store would refuse. This is the ticket's phrasing, so I leave it. - Not verified, and not reproducible from the review host: the live `runner` AppRole fetch on 145 (AC3 above), and that the store holds the four paths today. The map side is proved against the stub store only. For the Operator: before the first runner deploy, `secret/tofu-state/openbao/deploy` and `secret/homelab/proxmox/runner-token` must hold the field names the rows read, `OPENBAO_STATE_*` and `PROXMOX_VE_API_TOKEN`. The 404 and missing-field paths refuse the whole fetch and write no `.env`, so a mismatch is loud, not silent. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Standards | 0 | none | | Spec | 1 (0 BLOCKER, 1 ADVISORY) | ADVISORY: the literal's scope and `hermes` have no pinning case; AC3 is an Operator step, disclosed, not verified here | No blockers, one advisory. The recommendation is merge, and one advisory does not trip the volume rule.
pit force-pushed hermes/SC-36-infra-secrets-env-map-serves-the-runner from 870e5ba2fd
All checks were successful
pr-checks / check (pull_request) Successful in 20s
to f6ea009168
All checks were successful
pr-checks / check (pull_request) Successful in 19s
2026-11-10 20:53:15 +00:00
Compare
pit dismissed bot-minos's review 2026-11-10 20:53:15 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Member

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

**Review started** (round 1/5) on f6ea009168b749e7bd39bbd415a323858b22c55e — reading the diff now.
bot-minos approved these changes 2026-11-10 20:57:53 +00:00
bot-minos left a comment

Review — repo olympus/infra-secrets · PR #45 · head f6ea009168b749e7bd39bbd415a323858b22c55e · round 2/5 by the thread (the dispatch said 1/5; the thread already carries one review, round 1 at 870e5ba, which the forge dismissed as stale when the branch was rebased) · verdict: merge, with one advisory

Recommendation: merge

Round scope

  • Fixed point and delta. The prior review's head 870e5ba is not an ancestor of f6ea009: the branch was rebased onto current main (eb1a78c, which is also the PR's base.sha; git ls-remote origin refs/heads/main agrees). The round's own change is therefore compared by content, not by tree diff. git patch-id --stable over git diff 65eb4a3 870e5ba and over git diff eb1a78c f6ea009 gives the same id, e48738e3c850f4c3051baf2c7532eaf6c56899ad: the five files, .env.example, docs/env-fetch.md, docs/store-layout.md, env.map and scripts/tests/run.sh, carry byte-for-byte the change round 1 read. What moved is the base (SC-34 and SC-33 landed under it), which the change's files do not touch.
  • Prior findings. Round 1 had no BLOCKER. Its one ADVISORY (the literal's scope and hermes unpinned) is not addressed by this head, as the identical patch-id shows; it is carried below with its evidence re-reproduced at this head.
  • Reviewed whole. Because the previous review's head is gone from the PR, I re-drove every claim at f6ea009 rather than inheriting round 1's tallies.

Spec and standard

  • Spec: SC-36 (Vikunja project 8, task 356, read live this round; the description and both comments). The PR body links it and it governs. Its criteria: mise exec -- make check green; make env ACTOR=pit fetches the same name set as today; an AppRole login on 145 as the runner runs make env ACTOR=runner to the end with no 403.
  • Standard: AGENTS.md §Checks (make check is the floor, reported as pr-checks / check (pull_request)); docs/env-fetch.md §the map's four rules (:179); workshop ADRs as cited in round 1. The repo keeps no docs/adr/ of its own (AGENTS.md §Decisions). No documented standard is broken.

Spec axis

SC-36 requirement State Evidence I reproduced at head
Each row names exactly the actors whose policy reads its path met bao/policies/automation-runner.hcl:56 (runner-token) and :171 (openbao/deploy) are the runner's; bao/policies/ci-secrets.hcl:19 is the one secrets path, secret/data/ci/secrets/semaphore-api. The age-class actors read through operator.hcl and admin-agent.hcl.
The literal row is actors=pit,hermes met env.map:55
actors=runner …/openbao/deploy under the names the backend reads met env.map:51, the OPENBAO_STATE_* pair the Makefile's state_credentials maps onto the S3 backend's pair (Makefile:190).
actors=runner …/runner-token PROXMOX_VE_API_TOKEN met env.map:52
actors=secrets …/semaphore-api SEMAPHORE_API_TOKEN met env.map:53
.env.example declares every name met env-check: env.map: 5 names, all declared in .env.example
AC1: mise exec -- make check is green met rc 0 at the head worktree (log cache/scratch/infra-secrets-45-r2/make-check-head.log). The fetch suite alone: 165 ok, 0 FAIL on each of three reruns. CI by SHA: pr-checks / check (pull_request) is success for f6ea009 (run 69).
AC2: make env ACTOR=pit fetches the same name set as today met The new case asserts 4 names · 1 paths · 2 from the age class for pit and that the deploy, runner-token and CI paths are not read (scripts/tests/run.sh:823).
AC3: an AppRole login on 145 as the runner runs make env ACTOR=runner to the end not verified The map half is proved against the stub store below. The live run on 145 is the Operator's step; the body and docs/env-fetch.md both name the missing toolchain (TR-58). Disclosed, not charged.

Red/green, driven by me. Head's suite over base's env.map and .env.example: rc 1, 13 FAIL rows, every one a runner or secrets assertion in repo map actors, matching the body's "Before" block. Head's own map: green, three times.

Mutations of head's env.map, each driven through head's own suite (copy of the head tree, one sed edit, VOID checked per row):

Mutation Result
apply row also served to runner red, 2 rows
secrets row also served to runner red, 2 rows
runner deploy row unscoped red, 6 rows
runner token row deleted red, 2 rows
runner deploy row pointed at …/apply red, 4 rows
literal row unscoped green, survives
literal row also served to runner green, survives
hermes dropped from the apply row green, survives
hermes dropped from the literal row green, survives

Findings

  1. ADVISORY — carried from round 1, unchanged by this head: the new case pins three of the map's scopes and leaves the literal's scope and the hermes half of pit,hermes unpinned. Evidence: the four survivors above. scripts/tests/run.sh:848 removes prod.age before the runner run, so a literal that reached the runner would write nothing and the case stays green; the case drives pit (:823), runner (:851) and secrets (:875) and never hermes, so dropping the Admin agent from env.map:50/:55 would break its make env with no red. SC-36's "the literal row: actors=pit,hermes" is the requirement this leaves unpinned. Clearing change: a hermes fetch in the same case (the stub and a seeded hermes approle already exist in the suite, as at scripts/tests/run.sh:213) asserting the same four names as pit; and, for the literal's scope, a runner run on a machine whose prod.age opens for the runner, asserting PROXMOX_VE_ENDPOINT= is absent. Not a blocker: the case is real, reds on the old map, and kills five of nine mutants; the row it leaves open is one the repo's own docs say does not occur on 145.

Standards axis

No findings. Checked at head:

  • env.map:50-53,55 and docs/env-fetch.md agree on the row count (four store rows and one literal, five names, matching env-check).
  • The docs/store-layout.md:101 deploy-row cell no longer defers the fetch row to SC-36, and docs/env-fetch.md:86 no longer says the runner's row is pending.
  • A census of SC-36 across the head tree: env.map:38, docs/env-fetch.md:86 and :216, docs/store-layout.md:101, scripts/tests/run.sh:777 are this change's; bao/policies/automation-runner.hcl:168 is the one left in the future tense, see below.
  • Enumerations of the old set: the Operator and the Admin agent hit (docs/env-fetch.md:209) is the apply row's own scope, correct; the Makefile's env help line (Makefile:248) already names the actor by ACTOR= and does not enumerate the old pair.
  • The new case uses the suite's own helpers (new_case, start_stub, assert_*) and registers in the case list (scripts/tests/run.sh:979).
  • git merge-tree --write-tree origin/main f6ea009 exits 0 (tree 6be245a); the API's mergeable: true and my own measurement agree.

Named, not charged

  • bao/policies/automation-runner.hcl:168 still reads "SC-36 adds the fetch row that reads this path as the runner". The file is untouched on purpose: it is applied by the service role, so a comment-only edit would trigger a live store write. It belongs to the next change that edits that file. Pre-existing, not on a line this diff touches.
  • The rule's wording, "names exactly the actors whose policy reads its path", is narrower in practice than it reads: operator.hcl (secret/data/*) and admin-agent.hcl (secret/*) read every path in the map, so the scoping states who is served, not who the store would refuse. It is the ticket's own phrasing; I leave it.
  • Not verified, not reproducible from the review host: the live runner AppRole fetch on 145 (AC3), and that the store holds the four paths with the field names the rows read today. The 404 and missing-field paths refuse the whole fetch and write no .env, so a mismatch is loud. For the Operator before the first runner deploy: secret/tofu-state/openbao/deploy must carry OPENBAO_STATE_* and secret/homelab/proxmox/runner-token must carry PROXMOX_VE_API_TOKEN.
  • One reviewer held both axes this round (no sub-agent runner); the headings are kept apart.

Summary

Axis Findings Worst
Standards 0 none
Spec 1 (0 BLOCKER, 1 ADVISORY) ADVISORY: the literal's scope and hermes have no pinning case (carried from round 1, unchanged); AC3 is an Operator step, disclosed, not verified here

No blockers, one counted advisory. One advisory does not trip the volume rule, so the recommendation is merge, the review state is APPROVED, and the label moves to review/merge-ready.

<!-- minos review-loop: repo=olympus/infra-secrets pr=45 head=f6ea009168b749e7bd39bbd415a323858b22c55e round=2/5 axes=standards,spec --> **Review** — repo olympus/infra-secrets · PR #45 · head `f6ea009168b749e7bd39bbd415a323858b22c55e` · round 2/5 by the thread (the dispatch said 1/5; the thread already carries one review, round 1 at `870e5ba`, which the forge dismissed as stale when the branch was rebased) · verdict: merge, with one advisory Recommendation: merge ## Round scope - **Fixed point and delta.** The prior review's head `870e5ba` is not an ancestor of `f6ea009`: the branch was rebased onto current `main` (`eb1a78c`, which is also the PR's `base.sha`; `git ls-remote origin refs/heads/main` agrees). The round's own change is therefore compared by content, not by tree diff. `git patch-id --stable` over `git diff 65eb4a3 870e5ba` and over `git diff eb1a78c f6ea009` gives the same id, `e48738e3c850f4c3051baf2c7532eaf6c56899ad`: the five files, `.env.example`, `docs/env-fetch.md`, `docs/store-layout.md`, `env.map` and `scripts/tests/run.sh`, carry byte-for-byte the change round 1 read. What moved is the base (SC-34 and SC-33 landed under it), which the change's files do not touch. - **Prior findings.** Round 1 had no BLOCKER. Its one ADVISORY (the literal's scope and `hermes` unpinned) is not addressed by this head, as the identical patch-id shows; it is carried below with its evidence re-reproduced at this head. - **Reviewed whole.** Because the previous review's head is gone from the PR, I re-drove every claim at `f6ea009` rather than inheriting round 1's tallies. ## Spec and standard - **Spec:** SC-36 (Vikunja project 8, task 356, read live this round; the description and both comments). The PR body links it and it governs. Its criteria: `mise exec -- make check` green; `make env ACTOR=pit` fetches the same name set as today; an AppRole login on 145 as the runner runs `make env ACTOR=runner` to the end with no 403. - **Standard:** `AGENTS.md` §Checks (`make check` is the floor, reported as `pr-checks / check (pull_request)`); `docs/env-fetch.md` §the map's four rules (`:179`); workshop ADRs as cited in round 1. The repo keeps no `docs/adr/` of its own (`AGENTS.md` §Decisions). No documented standard is broken. ## Spec axis | SC-36 requirement | State | Evidence I reproduced at head | | --- | --- | --- | | Each row names exactly the actors whose policy reads its path | met | `bao/policies/automation-runner.hcl:56` (`runner-token`) and `:171` (`openbao/deploy`) are the runner's; `bao/policies/ci-secrets.hcl:19` is the one `secrets` path, `secret/data/ci/secrets/semaphore-api`. The age-class actors read through `operator.hcl` and `admin-agent.hcl`. | | The literal row is `actors=pit,hermes` | met | `env.map:55` | | `actors=runner …/openbao/deploy` under the names the backend reads | met | `env.map:51`, the `OPENBAO_STATE_*` pair the Makefile's `state_credentials` maps onto the S3 backend's pair (`Makefile:190`). | | `actors=runner …/runner-token PROXMOX_VE_API_TOKEN` | met | `env.map:52` | | `actors=secrets …/semaphore-api SEMAPHORE_API_TOKEN` | met | `env.map:53` | | `.env.example` declares every name | met | `env-check`: `env.map: 5 names, all declared in .env.example` | | AC1: `mise exec -- make check` is green | met | rc 0 at the head worktree (log `cache/scratch/infra-secrets-45-r2/make-check-head.log`). The fetch suite alone: 165 ok, 0 FAIL on each of three reruns. CI by SHA: `pr-checks / check (pull_request)` is `success` for `f6ea009` (run 69). | | AC2: `make env ACTOR=pit` fetches the same name set as today | met | The new case asserts `4 names · 1 paths · 2 from the age class` for pit and that the deploy, runner-token and CI paths are not read (`scripts/tests/run.sh:823`). | | AC3: an AppRole login on 145 as the runner runs `make env ACTOR=runner` to the end | **not verified** | The map half is proved against the stub store below. The live run on 145 is the Operator's step; the body and `docs/env-fetch.md` both name the missing toolchain (TR-58). Disclosed, not charged. | **Red/green, driven by me.** Head's suite over base's `env.map` and `.env.example`: rc 1, 13 FAIL rows, every one a runner or secrets assertion in `repo map actors`, matching the body's "Before" block. Head's own map: green, three times. **Mutations of head's `env.map`, each driven through head's own suite** (copy of the head tree, one `sed` edit, `VOID` checked per row): | Mutation | Result | | --- | --- | | apply row also served to `runner` | red, 2 rows | | `secrets` row also served to `runner` | red, 2 rows | | runner deploy row unscoped | red, 6 rows | | runner token row deleted | red, 2 rows | | runner deploy row pointed at `…/apply` | red, 4 rows | | literal row unscoped | **green, survives** | | literal row also served to `runner` | **green, survives** | | `hermes` dropped from the apply row | **green, survives** | | `hermes` dropped from the literal row | **green, survives** | ### Findings 1. **ADVISORY — carried from round 1, unchanged by this head: the new case pins three of the map's scopes and leaves the literal's scope and the `hermes` half of `pit,hermes` unpinned.** Evidence: the four survivors above. `scripts/tests/run.sh:848` removes `prod.age` before the runner run, so a literal that reached the runner would write nothing and the case stays green; the case drives `pit` (`:823`), `runner` (`:851`) and `secrets` (`:875`) and never `hermes`, so dropping the Admin agent from `env.map:50`/`:55` would break its `make env` with no red. SC-36's "the literal row: `actors=pit,hermes`" is the requirement this leaves unpinned. Clearing change: a `hermes` fetch in the same case (the stub and a seeded `hermes` approle already exist in the suite, as at `scripts/tests/run.sh:213`) asserting the same four names as pit; and, for the literal's scope, a runner run on a machine whose `prod.age` opens for the runner, asserting `PROXMOX_VE_ENDPOINT=` is absent. Not a blocker: the case is real, reds on the old map, and kills five of nine mutants; the row it leaves open is one the repo's own docs say does not occur on 145. ## Standards axis No findings. Checked at head: - `env.map:50-53,55` and `docs/env-fetch.md` agree on the row count (four store rows and one literal, five names, matching `env-check`). - The `docs/store-layout.md:101` `deploy`-row cell no longer defers the fetch row to SC-36, and `docs/env-fetch.md:86` no longer says the runner's row is pending. - A census of `SC-36` across the head tree: `env.map:38`, `docs/env-fetch.md:86` and `:216`, `docs/store-layout.md:101`, `scripts/tests/run.sh:777` are this change's; `bao/policies/automation-runner.hcl:168` is the one left in the future tense, see below. - Enumerations of the old set: the `Operator and the Admin agent` hit (`docs/env-fetch.md:209`) is the apply row's own scope, correct; the Makefile's `env` help line (`Makefile:248`) already names the actor by `ACTOR=` and does not enumerate the old pair. - The new case uses the suite's own helpers (`new_case`, `start_stub`, `assert_*`) and registers in the case list (`scripts/tests/run.sh:979`). - `git merge-tree --write-tree origin/main f6ea009` exits 0 (tree `6be245a`); the API's `mergeable: true` and my own measurement agree. ## Named, not charged - `bao/policies/automation-runner.hcl:168` still reads "SC-36 adds the fetch row that reads this path as the runner". The file is untouched on purpose: it is applied by the service role, so a comment-only edit would trigger a live store write. It belongs to the next change that edits that file. Pre-existing, not on a line this diff touches. - The rule's wording, "names exactly the actors whose policy reads its path", is narrower in practice than it reads: `operator.hcl` (`secret/data/*`) and `admin-agent.hcl` (`secret/*`) read every path in the map, so the scoping states who is served, not who the store would refuse. It is the ticket's own phrasing; I leave it. - Not verified, not reproducible from the review host: the live `runner` AppRole fetch on 145 (AC3), and that the store holds the four paths with the field names the rows read today. The 404 and missing-field paths refuse the whole fetch and write no `.env`, so a mismatch is loud. For the Operator before the first runner deploy: `secret/tofu-state/openbao/deploy` must carry `OPENBAO_STATE_*` and `secret/homelab/proxmox/runner-token` must carry `PROXMOX_VE_API_TOKEN`. - One reviewer held both axes this round (no sub-agent runner); the headings are kept apart. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Standards | 0 | none | | Spec | 1 (0 BLOCKER, 1 ADVISORY) | ADVISORY: the literal's scope and `hermes` have no pinning case (carried from round 1, unchanged); AC3 is an Operator step, disclosed, not verified here | No blockers, one counted advisory. One advisory does not trip the volume rule, so the recommendation is merge, the review state is APPROVED, and the label moves to `review/merge-ready`.
pit merged commit 2bb1688ec6 into main 2026-11-10 21:04:17 +00:00
pit deleted branch hermes/SC-36-infra-secrets-env-map-serves-the-runner 2026-11-10 21:04:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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-secrets!45
No description provided.