The silo's env.sh gains the actor axis, and every map row names its actors (SL-36) #29

Merged
pit merged 1 commit from hermes/SL-36-the-silo-s-env-sh-gains-the-actor-axis-a into main 2026-11-10 20:49:21 +00:00
Member

Implements SL-36

Summary

scripts/env.sh          vendored verbatim: infra-secrets@dc5a0e58 — the actor axis, and `silo` in classify()
env.map                 every row gains `actors=…`; two rows are new
.env.example            +SEMAPHORE_API_TOKEN; the declaration is the union over the actors' rows
bao/recipients/         + runner.role_id (the runner's AppRole login half) + the directory README
scripts/tests/          stub store serves six paths and three logins; env-test gains the axis
README GLOSSARY docs/   the map's rows, the coined term, and who fetches

The map, row by row — each prefix is the actors that row is for, bounded by the policies in infra-secrets/bao/policies/:

Row Actors Why
secret/silo/provisioner pit,hermes,runner the store half's key; the deploy runs the store layer as the runner (SL-18)
secret/silo/root pit,hermes,runner the object store's root password, read by the same three
secret/silo/service-account pit,hermes,runner the application credential the Stack creates
secret/tofu-state/silo/apply pit,hermes,runner the one record this Stack reads and writes
secret/homelab/proxmox/runner-token runner the runner's own infra-runner@pve!deploy, under PROXMOX_VE_API_TOKEN
secret/ci/silo/semaphore-api silo the CI login's token, which starts the deploy task
literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN pit,hermes the sealed bootstrap pair; the runner's endpoint is the job environment's

Before, an unprefixed row served every actor and the first 403 aborted the run, so neither the runner nor the silo login could fetch at all.

Evidence

The Operator's name set is unchanged. Both trees fetched ACTOR=pit against the stub store, in throwaway copies:

before exit=0 / after exit=0
AWS_ACCESS_KEY_ID  AWS_SECRET_ACCESS_KEY  MINIO_PASSWORD  MINIO_USER
SILO_ROOT_PASSWORD  TF_VAR_service_account_secret
SAME NAME SET

(PROXMOX_VE_ENDPOINT/PROXMOX_VE_API_TOKEN are absent from both, as the test HOME holds no prod.age — the case the fetch reports rather than refuses.)

The axis is the thing that now holds. A stub that answers 403 for the two paths another actor owns — the ordinary shape of a policy denial — lets the Operator's fetch run to the end, and env-test reds if a row is left unscoped (checked by mutating the runner row back to an unprefixed one).

mise exec -- make check → exit 0:

env-check: the pin and the map agree.
env-test: every case holds.
key-audit-test: every case passed
key-mint-test: every case passed
deploy tests: every case passed.
Success! The configuration is valid.

env-check recomputes the pin over the blanked body: dc5a0e58… matches, and the copy is byte-identical to infra-secrets origin/main:scripts/env.sh.

Not verified here: the ticket's third criterion — an AppRole login on 145 as the runner, make env ACTOR=runner to the end with no 403. It needs the runner's secret_id on Guest 145 and the live store; this change's offline proof is a fetch as the runner against the stub. The Operator runs that line.

Merge Danger

Door: two-way

A revert restores the old pin and the unprefixed map; nothing this change touches is applied to a Guest or a store, and runner.role_id is public material.

Blast Radius: infra-silo

A wrong prefix does not corrupt anything: it makes a fetch refuse (naming the path and its 403), which reds that actor's run — a deploy, or the trigger. The silo CI row has no consumer until the deploy trigger lands, which is the ticket that reads SEMAPHORE_API_TOKEN.

Implements [SL-36](https://vikunja.thepit.space/tasks/355) ## Summary ``` scripts/env.sh vendored verbatim: infra-secrets@dc5a0e58 — the actor axis, and `silo` in classify() env.map every row gains `actors=…`; two rows are new .env.example +SEMAPHORE_API_TOKEN; the declaration is the union over the actors' rows bao/recipients/ + runner.role_id (the runner's AppRole login half) + the directory README scripts/tests/ stub store serves six paths and three logins; env-test gains the axis README GLOSSARY docs/ the map's rows, the coined term, and who fetches ``` The map, row by row — each prefix is the actors that row is for, bounded by the policies in `infra-secrets/bao/policies/`: | Row | Actors | Why | | --- | --- | --- | | `secret/silo/provisioner` | `pit,hermes,runner` | the store half's key; the deploy runs the store layer as the runner (SL-18) | | `secret/silo/root` | `pit,hermes,runner` | the object store's root password, read by the same three | | `secret/silo/service-account` | `pit,hermes,runner` | the application credential the Stack creates | | `secret/tofu-state/silo/apply` | `pit,hermes,runner` | the one record this Stack reads and writes | | `secret/homelab/proxmox/runner-token` | `runner` | the runner's own `infra-runner@pve!deploy`, under `PROXMOX_VE_API_TOKEN` | | `secret/ci/silo/semaphore-api` | `silo` | the CI login's token, which starts the deploy task | | `literal PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKEN` | `pit,hermes` | the sealed bootstrap pair; the runner's endpoint is the job environment's | Before, an unprefixed row served every actor and the first 403 aborted the run, so neither the runner nor the `silo` login could fetch at all. ## Evidence **The Operator's name set is unchanged.** Both trees fetched `ACTOR=pit` against the stub store, in throwaway copies: ``` before exit=0 / after exit=0 AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY MINIO_PASSWORD MINIO_USER SILO_ROOT_PASSWORD TF_VAR_service_account_secret SAME NAME SET ``` (`PROXMOX_VE_ENDPOINT`/`PROXMOX_VE_API_TOKEN` are absent from both, as the test `HOME` holds no `prod.age` — the case the fetch reports rather than refuses.) **The axis is the thing that now holds.** A stub that answers 403 for the two paths another actor owns — the ordinary shape of a policy denial — lets the Operator's fetch run to the end, and `env-test` reds if a row is left unscoped (checked by mutating the runner row back to an unprefixed one). **`mise exec -- make check` → exit 0:** ``` env-check: the pin and the map agree. env-test: every case holds. key-audit-test: every case passed key-mint-test: every case passed deploy tests: every case passed. Success! The configuration is valid. ``` `env-check` recomputes the pin over the blanked body: `dc5a0e58…` matches, and the copy is byte-identical to `infra-secrets` `origin/main:scripts/env.sh`. **Not verified here:** the ticket's third criterion — an AppRole login on 145 as the runner, `make env ACTOR=runner` to the end with no 403. It needs the runner's `secret_id` on Guest 145 and the live store; this change's offline proof is a fetch as the runner against the stub. The Operator runs that line. ## Merge Danger **Door:** two-way A revert restores the old pin and the unprefixed map; nothing this change touches is applied to a Guest or a store, and `runner.role_id` is public material. **Blast Radius:** `infra-silo` A wrong prefix does not corrupt anything: it makes a fetch refuse (naming the path and its 403), which reds that actor's run — a deploy, or the trigger. The silo CI row has no consumer until the deploy trigger lands, which is the ticket that reads `SEMAPHORE_API_TOKEN`.
ticket-dispatch: vendor env.sh with the actor axis, and scope every map row (SL-36)
All checks were successful
pr-checks / check (pull_request) Successful in 27s
39314637a4
scripts/env.sh moves to infra-secrets@dc5a0e58, the first pin whose classify()
carries the silo actor and whose map reads a row only for the actors it names.
Every env.map row names its actors now: the four store paths the deploy reads
are pit,hermes,runner, the sealed Proxmox pair is pit,hermes, and two rows are
new — the runner's own token from secret/homelab/proxmox/runner-token, and the
silo CI login's Semaphore API token from secret/ci/silo/semaphore-api.

The runner's fetch needs its AppRole role_id in its own checkout, so
bao/recipients/runner.role_id is vendored from infra-secrets beside the Admin
agent's, with the directory's README and the .gitignore exception it needs.

env-test gains the axis: what env-check refuses (an actor the table does not
hold, two sources for one name for one actor, an empty or starred prefix), a
fetch as the runner and as the silo login, and the case the axis exists for — a
store that 403s the paths another actor owns, which the Operator's fetch now
never asks for.
Member

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

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

Review — repo olympus/infra-silo · PR #29 · head 39314637a4b82ab4b721b70d6ddaeb547a11e92a · round 1/5 (no earlier review on the thread) · verdict: no blockers, 2 advisories

Recommendation: merge

Spec source: SL-36 (Vikunja project 7, task 355, read live) — its three acceptance criteria. Standards source: AGENTS.md (§Secrets, §Code comments, §Docs), docs/agents/workflow.md, and infra-secrets@origin/main docs/env-fetch.md + bao/policies/*.hcl (the policies the ticket says to read, not guess). Fixed point: PR base 502539c9; whole head reviewed (no earlier round). CI: pr-checks / check (pull_request) success on this SHA.

Spec

Acceptance criteria, each against what I ran:

SL-36 criterion Result Evidence
mise exec -- make check green: pin matches, env-check + env-test pass met make check rc=0 in a head worktree; env-test 68 ok lines, "every case holds". scripts/env.sh is cmp-identical to infra-secrets origin/main:scripts/env.sh (pin dc5a0e58…, carries classify → silo).
make env ACTOR=pit fetches the same name set as today met Base and head env.sh fetch ACTOR=pit against a stub built from each side's own map: both rc=0, 4 paths read, identical 6-name set (diff empty), .env mode 600.
AppRole login on 145 as the runner runs make env ACTOR=runner to the end, no 403 not verifiable here — disclosed by the author Needs the runner's secret_id on Guest 145 and the live store. Offline proxy, which I reproduced: ACTOR=runner reads exactly the five paths automation-runner.hcl grants (silo/{provisioner,root,service-account}, tofu-state/silo/apply, homelab/proxmox/runner-token), rc=0, 7 names, never touches ci/silo/semaphore-api. Merge condition for the Operator: run that line on 145.

Row-by-row against the ticket and the policies (read at infra-secrets origin/main):

  • Four store rows actors=pit,hermes,runner (env.map:52,58,64,72): match the ticket; operator.hcl (secret/data/*), admin-agent.hcl (secret/*) and automation-runner.hcl each read all four.
  • actors=pit,hermes literal (env.map:93), actors=runner …runner-token (env.map:79), actors=silo …semaphore-api (env.map:84): match the ticket's rows verbatim; ci-silo.hcl reads secret/data/ci/silo/semaphore-api and nothing else. The runner-token row is runner alone, not hermes,runner as the infra-secrets docs example has it; the ticket names actors=runner, and adding pit/hermes would make env-check red (two sources for PROXMOX_VE_API_TOKEN), so the choice is the ticket's.
  • .env.example declares the union incl. SEMAPHORE_API_TOKEN; env-check passes in both directions.
  • Per-actor fetch drive at head, request-logged: silo (jwt) reads one path, 1 name; hermes reads the same four as pit. No actor reads a path outside its policy.

Tests are real (mutation wave over env.map, each mutant in an isolated copy, control green): runner-token unscoped → 11 FAIL (incl. sources PROXMOX_VE_API_TOKEN twice), silo row unscoped → 3 FAIL, runner dropped from silo/root → 2 FAIL, pit added to the runner row → 7 FAIL, literal row widened to runner → 5 FAIL, state row unscoped → 3 FAIL, runnr typo → 7 FAIL, silo,runner on the CI row → 1 FAIL (the exact-row pin; the only survivor-adjacent case and it is caught). Head suite against the base env.sh: 33 FAIL, including all four new axis-check cases — the new cases can fail.

Findings:

  1. ADVISORY — docs/runbooks/0001-deploy-and-teardown.md:24, README.md:130, .env.example:53, env.map:81: the docs state in the present tense that "the push-to-main trigger" runs as silo / starts the deploy task with this token. This repo has no such workflow (.forgejo/workflows/ holds only pr-checks.yml), and the PR body itself says the silo row "has no consumer until the deploy trigger lands". One defect, four sites. Clearing change: say "will" or "the deploy trigger (SL-20) starts…" in those sentences, or leave as is and merge — it is not wrong about the store side, only about the consumer.

Standards

standards: AGENTS.md and docs/agents/workflow.md apply; no ADR in docs/adr/ or olympus/workshop is contradicted (ADR-0007 path naming: secret/ci/silo/semaphore-api is the layout's path; ADR-0012 is the policy's, not this diff's). No secret in the diff: bao/recipients/runner.role_id is cmp-identical to infra-secrets origin/main:bao/recipients/runner.role_id and is public by that directory's own rule; the .gitignore negation admits only README.md. No DDNS/external IP (AGENTS.md §Privacy).

  1. ADVISORY — Makefile:109 (printed by make help): the env Target still reads "(Operator and Admin agent only; …)", while this PR rewrites docs/agents/workflow.md:143 to say the Semaphore runner and a CI login fetch too (and AGENTS.md:27 carries the same two-actor enumeration, about Agents, which stays true). AGENTS.md §Docs wants the pages to agree; the diff updated one of the places that enumerate who fetches and not the Target's own help line. Clearing change: one clause in the help string.

Not charged / named:

  • Comment density (env.map header, env.test.sh, stub-store.py docstring) against AGENTS.md §Code comments ("minimum"): the base revision of the same files is written in the same register, so the repo's own practice reads the rule as it does here; not charged.
  • The runner's PROXMOX_VE_ENDPOINT "comes from the job environment" (.env.example, README row): consistent with how the sibling repos take it (a Variable in CI), but the Semaphore side is infra-cockpit's and not provable from this diff. Unverified.
  • automation-runner.hcl lets the runner read the silo record's apply key (ADR-0012 shape is deploy): an accepted, documented risk in the policy file (SL-18), unchanged by this PR.
  • scripts/env.sh is vendored verbatim; its internals are infra-secrets' to answer for. I verified identity with upstream, not the script's design.

Verified by me

make check rc=0 at head (log kept under cache/scratch/infra-silo-29-r1/); refs/pull/29/head = dispatch SHA, re-read before posting; per-actor fetch drive (pit/hermes/runner/silo) with request logs; base-vs-head Operator name set; eight-mutant env.map wave plus base-script/head-suite red run; byte-comparison of env.sh and runner.role_id with infra-secrets origin/main; commit status by SHA.
Not verified: criterion 3 (live AppRole login on 145); the Semaphore job environment's PROXMOX_VE_ENDPOINT.

Summary

Axis Findings Worst
Spec 1 (0 blockers, 1 advisory) #1 — docs describe the silo trigger as live before it exists
Standards 1 (0 blockers, 1 advisory) #2 — Makefile:109 help line still says Operator and Admin agent only

Two advisories, no blocker: the verdict is merge. The volume rule (three or more advisories turns the recommendation) is not reached.

<!-- minos review-loop: repo=olympus/infra-silo pr=29 head=39314637a4b82ab4b721b70d6ddaeb547a11e92a round=1/5 axes=standards,spec --> **Review** — repo `olympus/infra-silo` · PR #29 · head `39314637a4b82ab4b721b70d6ddaeb547a11e92a` · round 1/5 (no earlier review on the thread) · verdict: no blockers, 2 advisories Recommendation: merge Spec source: SL-36 (Vikunja project 7, task 355, read live) — its three acceptance criteria. Standards source: `AGENTS.md` (§Secrets, §Code comments, §Docs), `docs/agents/workflow.md`, and `infra-secrets@origin/main` `docs/env-fetch.md` + `bao/policies/*.hcl` (the policies the ticket says to read, not guess). Fixed point: PR base `502539c9`; whole head reviewed (no earlier round). CI: `pr-checks / check (pull_request)` success on this SHA. ## Spec Acceptance criteria, each against what I ran: | SL-36 criterion | Result | Evidence | | --- | --- | --- | | `mise exec -- make check` green: pin matches, `env-check` + `env-test` pass | **met** | `make check` rc=0 in a head worktree; `env-test` 68 `ok` lines, "every case holds". `scripts/env.sh` is `cmp`-identical to `infra-secrets` `origin/main:scripts/env.sh` (pin `dc5a0e58…`, carries `classify` → `silo`). | | `make env ACTOR=pit` fetches the same name set as today | **met** | Base and head `env.sh fetch ACTOR=pit` against a stub built from each side's own map: both rc=0, 4 paths read, identical 6-name set (`diff` empty), `.env` mode 600. | | AppRole login on 145 as the runner runs `make env ACTOR=runner` to the end, no 403 | **not verifiable here** — disclosed by the author | Needs the runner's `secret_id` on Guest 145 and the live store. Offline proxy, which I reproduced: `ACTOR=runner` reads exactly the five paths `automation-runner.hcl` grants (`silo/{provisioner,root,service-account}`, `tofu-state/silo/apply`, `homelab/proxmox/runner-token`), rc=0, 7 names, never touches `ci/silo/semaphore-api`. Merge condition for the Operator: run that line on 145. | Row-by-row against the ticket and the policies (read at `infra-secrets` `origin/main`): - Four store rows `actors=pit,hermes,runner` (`env.map:52,58,64,72`): match the ticket; `operator.hcl` (`secret/data/*`), `admin-agent.hcl` (`secret/*`) and `automation-runner.hcl` each read all four. - `actors=pit,hermes` literal (`env.map:93`), `actors=runner …runner-token` (`env.map:79`), `actors=silo …semaphore-api` (`env.map:84`): match the ticket's rows verbatim; `ci-silo.hcl` reads `secret/data/ci/silo/semaphore-api` and nothing else. The runner-token row is `runner` alone, not `hermes,runner` as the infra-secrets docs example has it; the ticket names `actors=runner`, and adding pit/hermes would make `env-check` red (two sources for `PROXMOX_VE_API_TOKEN`), so the choice is the ticket's. - `.env.example` declares the union incl. `SEMAPHORE_API_TOKEN`; `env-check` passes in both directions. - Per-actor fetch drive at head, request-logged: `silo` (jwt) reads one path, 1 name; `hermes` reads the same four as `pit`. No actor reads a path outside its policy. Tests are real (mutation wave over `env.map`, each mutant in an isolated copy, control green): runner-token unscoped → 11 FAIL (incl. `sources PROXMOX_VE_API_TOKEN twice`), silo row unscoped → 3 FAIL, runner dropped from `silo/root` → 2 FAIL, `pit` added to the runner row → 7 FAIL, literal row widened to runner → 5 FAIL, state row unscoped → 3 FAIL, `runnr` typo → 7 FAIL, `silo,runner` on the CI row → 1 FAIL (the exact-row pin; the only survivor-adjacent case and it is caught). Head suite against the **base** `env.sh`: 33 FAIL, including all four new axis-check cases — the new cases can fail. Findings: 1. **ADVISORY** — `docs/runbooks/0001-deploy-and-teardown.md:24`, `README.md:130`, `.env.example:53`, `env.map:81`: the docs state in the present tense that "the push-to-main trigger" runs as `silo` / starts the deploy task with this token. This repo has no such workflow (`.forgejo/workflows/` holds only `pr-checks.yml`), and the PR body itself says the `silo` row "has no consumer until the deploy trigger lands". One defect, four sites. Clearing change: say "will" or "the deploy trigger (SL-20) starts…" in those sentences, or leave as is and merge — it is not wrong about the store side, only about the consumer. ## Standards standards: `AGENTS.md` and `docs/agents/workflow.md` apply; no ADR in `docs/adr/` or `olympus/workshop` is contradicted (ADR-0007 path naming: `secret/ci/silo/semaphore-api` is the layout's path; ADR-0012 is the policy's, not this diff's). No secret in the diff: `bao/recipients/runner.role_id` is `cmp`-identical to `infra-secrets` `origin/main:bao/recipients/runner.role_id` and is public by that directory's own rule; the `.gitignore` negation admits only `README.md`. No DDNS/external IP (AGENTS.md §Privacy). 2. **ADVISORY** — `Makefile:109` (printed by `make help`): the `env` Target still reads "(Operator and Admin agent only; …)", while this PR rewrites `docs/agents/workflow.md:143` to say the Semaphore runner and a CI login fetch too (and `AGENTS.md:27` carries the same two-actor enumeration, about Agents, which stays true). AGENTS.md §Docs wants the pages to agree; the diff updated one of the places that enumerate who fetches and not the Target's own help line. Clearing change: one clause in the help string. Not charged / named: - Comment density (`env.map` header, `env.test.sh`, `stub-store.py` docstring) against AGENTS.md §Code comments ("minimum"): the base revision of the same files is written in the same register, so the repo's own practice reads the rule as it does here; not charged. - The runner's `PROXMOX_VE_ENDPOINT` "comes from the job environment" (`.env.example`, README row): consistent with how the sibling repos take it (a Variable in CI), but the Semaphore side is `infra-cockpit`'s and not provable from this diff. Unverified. - `automation-runner.hcl` lets the runner read the silo record's `apply` key (ADR-0012 shape is `deploy`): an accepted, documented risk in the policy file (SL-18), unchanged by this PR. - `scripts/env.sh` is vendored verbatim; its internals are `infra-secrets`' to answer for. I verified identity with upstream, not the script's design. ## Verified by me `make check` rc=0 at head (log kept under `cache/scratch/infra-silo-29-r1/`); `refs/pull/29/head` = dispatch SHA, re-read before posting; per-actor fetch drive (pit/hermes/runner/silo) with request logs; base-vs-head Operator name set; eight-mutant `env.map` wave plus base-script/head-suite red run; byte-comparison of `env.sh` and `runner.role_id` with `infra-secrets` `origin/main`; commit status by SHA. Not verified: criterion 3 (live AppRole login on 145); the Semaphore job environment's `PROXMOX_VE_ENDPOINT`. ## Summary | Axis | Findings | Worst | | --- | --- | --- | | Spec | 1 (0 blockers, 1 advisory) | #1 — docs describe the `silo` trigger as live before it exists | | Standards | 1 (0 blockers, 1 advisory) | #2 — `Makefile:109` help line still says Operator and Admin agent only | Two advisories, no blocker: the verdict is merge. The volume rule (three or more advisories turns the recommendation) is not reached.
pit merged commit 3eeb606b84 into main 2026-11-10 20:49:21 +00:00
pit deleted branch hermes/SL-36-the-silo-s-env-sh-gains-the-actor-axis-a 2026-11-10 20:49:21 +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!29
No description provided.