The silo's env.sh gains the actor axis, and every map row names its actors (SL-36) #29
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/SL-36-the-silo-s-env-sh-gains-the-actor-axis-a"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements SL-36
Summary
The map, row by row — each prefix is the actors that row is for, bounded by the policies in
infra-secrets/bao/policies/:secret/silo/provisionerpit,hermes,runnersecret/silo/rootpit,hermes,runnersecret/silo/service-accountpit,hermes,runnersecret/tofu-state/silo/applypit,hermes,runnersecret/homelab/proxmox/runner-tokenrunnerinfra-runner@pve!deploy, underPROXMOX_VE_API_TOKENsecret/ci/silo/semaphore-apisiloliteral PROXMOX_VE_ENDPOINT PROXMOX_VE_API_TOKENpit,hermesBefore, an unprefixed row served every actor and the first 403 aborted the run, so neither the runner nor the
silologin could fetch at all.Evidence
The Operator's name set is unchanged. Both trees fetched
ACTOR=pitagainst the stub store, in throwaway copies:(
PROXMOX_VE_ENDPOINT/PROXMOX_VE_API_TOKENare absent from both, as the testHOMEholds noprod.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-testreds if a row is left unscoped (checked by mutating the runner row back to an unprefixed one).mise exec -- make check→ exit 0:env-checkrecomputes the pin over the blanked body:dc5a0e58…matches, and the copy is byte-identical toinfra-secretsorigin/main:scripts/env.sh.Not verified here: the ticket's third criterion — an AppRole login on 145 as the runner,
make env ACTOR=runnerto the end with no 403. It needs the runner'ssecret_idon 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_idis public material.Blast Radius:
infra-siloA 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.Review started (round 1/5) on
39314637a4— reading the diff now.Review — repo
olympus/infra-silo· PR #29 · head39314637a4b82ab4b721b70d6ddaeb547a11e92a· round 1/5 (no earlier review on the thread) · verdict: no blockers, 2 advisoriesRecommendation: 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, andinfra-secrets@origin/maindocs/env-fetch.md+bao/policies/*.hcl(the policies the ticket says to read, not guess). Fixed point: PR base502539c9; whole head reviewed (no earlier round). CI:pr-checks / check (pull_request)success on this SHA.Spec
Acceptance criteria, each against what I ran:
mise exec -- make checkgreen: pin matches,env-check+env-testpassmake checkrc=0 in a head worktree;env-test68oklines, "every case holds".scripts/env.shiscmp-identical toinfra-secretsorigin/main:scripts/env.sh(pindc5a0e58…, carriesclassify→silo).make env ACTOR=pitfetches the same name set as todayenv.sh fetch ACTOR=pitagainst a stub built from each side's own map: both rc=0, 4 paths read, identical 6-name set (diffempty),.envmode 600.make env ACTOR=runnerto the end, no 403secret_idon Guest 145 and the live store. Offline proxy, which I reproduced:ACTOR=runnerreads exactly the five pathsautomation-runner.hclgrants (silo/{provisioner,root,service-account},tofu-state/silo/apply,homelab/proxmox/runner-token), rc=0, 7 names, never touchesci/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-secretsorigin/main):actors=pit,hermes,runner(env.map:52,58,64,72): match the ticket;operator.hcl(secret/data/*),admin-agent.hcl(secret/*) andautomation-runner.hcleach read all four.actors=pit,hermesliteral (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.hclreadssecret/data/ci/silo/semaphore-apiand nothing else. The runner-token row isrunneralone, nothermes,runneras the infra-secrets docs example has it; the ticket namesactors=runner, and adding pit/hermes would makeenv-checkred (two sources forPROXMOX_VE_API_TOKEN), so the choice is the ticket's..env.exampledeclares the union incl.SEMAPHORE_API_TOKEN;env-checkpasses in both directions.silo(jwt) reads one path, 1 name;hermesreads the same four aspit. 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 fromsilo/root→ 2 FAIL,pitadded to the runner row → 7 FAIL, literal row widened to runner → 5 FAIL, state row unscoped → 3 FAIL,runnrtypo → 7 FAIL,silo,runneron the CI row → 1 FAIL (the exact-row pin; the only survivor-adjacent case and it is caught). Head suite against the baseenv.sh: 33 FAIL, including all four new axis-check cases — the new cases can fail.Findings:
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 assilo/ starts the deploy task with this token. This repo has no such workflow (.forgejo/workflows/holds onlypr-checks.yml), and the PR body itself says thesilorow "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.mdanddocs/agents/workflow.mdapply; no ADR indocs/adr/orolympus/workshopis contradicted (ADR-0007 path naming:secret/ci/silo/semaphore-apiis the layout's path; ADR-0012 is the policy's, not this diff's). No secret in the diff:bao/recipients/runner.role_idiscmp-identical toinfra-secretsorigin/main:bao/recipients/runner.role_idand is public by that directory's own rule; the.gitignorenegation admits onlyREADME.md. No DDNS/external IP (AGENTS.md §Privacy).Makefile:109(printed bymake help): theenvTarget still reads "(Operator and Admin agent only; …)", while this PR rewritesdocs/agents/workflow.md:143to say the Semaphore runner and a CI login fetch too (andAGENTS.md:27carries 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:
env.mapheader,env.test.sh,stub-store.pydocstring) 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.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 isinfra-cockpit's and not provable from this diff. Unverified.automation-runner.hcllets the runner read the silo record'sapplykey (ADR-0012 shape isdeploy): an accepted, documented risk in the policy file (SL-18), unchanged by this PR.scripts/env.shis vendored verbatim; its internals areinfra-secrets' to answer for. I verified identity with upstream, not the script's design.Verified by me
make checkrc=0 at head (log kept undercache/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-mutantenv.mapwave plus base-script/head-suite red run; byte-comparison ofenv.shandrunner.role_idwithinfra-secretsorigin/main; commit status by SHA.Not verified: criterion 3 (live AppRole login on 145); the Semaphore job environment's
PROXMOX_VE_ENDPOINT.Summary
silotrigger as live before it existsMakefile:109help line still says Operator and Admin agent onlyTwo advisories, no blocker: the verdict is merge. The volume rule (three or more advisories turns the recommendation) is not reached.