infra-secrets' env.map serves the runner and the secrets actor (SC-36) #45
No reviewers
Labels
No labels
ready-for-agent
review
merge-ready
review
needs-fix
review
needs-human
review
needs-review
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-secrets!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/SC-36-infra-secrets-env-map-serves-the-runner"
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 SC-36
Summary
env.mapis 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.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_ENDPOINTis deliberately not written into a runner's.env.What each actor's fetch now fills, and the proof it reads nothing else:
Evidence
Before:
scripts/tests/run.shhad 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:After:
mise exec -- make check, the whole credential-free floor: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 aGETin its request log is what proves an actor read a path: pit reads only the apply key, the runner only its two, andsecretsonly its own. It also asserts that pit's set is the same four names as before, and thatPROXMOX_VE_ENDPOINTis absent from the runner's file.Not verified here, and named on the ticket: the live AppRole run on 145.
env-fetch.mdalready records that 145 carries nomake,jqorageuntil TR-58 brings the toolchain, somake env ACTOR=runnercannot 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.
scripts/env.shis untouched, so its pin and the four vendored copies in the sibling repos are unchanged..env(a row nobody reads) — both loud, neither silent..envon 145. That key writes state and deletes only its lock; the reach was already granted in SC-25.docs/env-fetch.mdanddocs/store-layout.mdwere corrected where they still described the runner's row as pending — the map's own record, not new claims.Review started (round 1/5) on
870e5ba2fd— reading the diff now.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 advisoryRecommendation: merge
Spec and standard
AGENTS.md§Checks (make checkis the floor, reported aspr-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 nodocs/adr/of its own (AGENTS.md§Decisions). No documented standard is broken.870e5ba, on merge-base65eb4a3, and it touches 5 files.scripts/env.shand the Makefile are untouched.Spec axis
bao/policies/*.hclautomation-runner.hcl:56(runner-token) and:171(openbao/deploy) are read by the runner.ci-secrets.hclcarries one named path,secret/data/ci/secrets/semaphore-api.operator.hcl:8andadmin-agent.hcl:4are the age-class and apply-key actors.actors=pit,hermesenv.map:55actors=runner …/openbao/deployunder the names the backend readsenv.map:51. The Makefile'sstate_credentials(Makefile:189) mapsOPENBAO_STATE_*onto theAWS_*pair, so the reading is right. ADR-0012 matches the body's "writes state, deletes only its lock".actors=runner …/runner-token PROXMOX_VE_API_TOKENenv.map:52actors=secrets …/semaphore-api SEMAPHORE_API_TOKENenv.map:53.env.exampledeclares every nameenv-check:env.map: 5 names, all declared in .env.examplemise exec -- make checkis greencache/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.make env ACTOR=pitfetches the same name set as today4 names · 1 paths · 2 from the age class, plus the apply path read and the deploy, runner-token and CI paths unread.make env ACTOR=runnerto the endenv-fetch.mdparagraph 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.mapand.env.example: rc 1 with 13 FAIL rows, all inrepo 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:runnersecretsrow also served torunner…/applyrunnerhermesdropped from the apply rowhermesdropped from the literal rowFindings
hermeshalf ofpit,hermesunpinned. Evidence: the four survivors above.scripts/tests/run.sh:848removesprod.agebefore 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 driveshermesagainst this repo's map (run.sh:823,:851,:875drive pit, runner and secrets only). Dropping the Admin agent fromenv.map:50or:55would break itsmake envwith no red. The ticket's "literal row:actors=pit,hermes" is the requirement this leaves unpinned. Clearing change: ahermesfetch in the same case (the stub and a seededhermeskey already exist atrun.sh:199-213) asserting the same four names as pit. Also a runner run on a machine whoseprod.ageopens for the runner, assertingPROXMOX_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.mapcomments anddocs/env-fetch.mdagree with each other on the row count (four store rows and one literal, five names, matchingenv-check).docs/store-layout.mddeploy-row cell no longer says "its fetch row is SC-36's", anddocs/env-fetch.mdno longer says the runner's row is pending.SC-36across the head tree leaves exactly one tense left behind (below)..env.examplestates the source for each name per actor.new_case,start_stub,assert_*), and the stub is the shippedstub_store.py.main(a22d59f, one commit ahead, touchingdocs/store-layout.mdon a different line).git merge-treereports no conflict.Named, not charged
bao/policies/automation-runner.hcl:168still 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.env.mapheader; the ticket's own sentence), is narrower in practice than it reads.operator.hcl:8(secret/data/*) andadmin-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.runnerAppRole 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/deployandsecret/homelab/proxmox/runner-tokenmust hold the field names the rows read,OPENBAO_STATE_*andPROXMOX_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
hermeshave no pinning case; AC3 is an Operator step, disclosed, not verified hereNo blockers, one advisory. The recommendation is merge, and one advisory does not trip the volume rule.
870e5ba2fdf6ea009168New commits pushed, approval review dismissed automatically according to repository settings
Review started (round 1/5) on
f6ea009168— reading the diff now.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 at870e5ba, which the forge dismissed as stale when the branch was rebased) · verdict: merge, with one advisoryRecommendation: merge
Round scope
870e5bais not an ancestor off6ea009: the branch was rebased onto currentmain(eb1a78c, which is also the PR'sbase.sha;git ls-remote origin refs/heads/mainagrees). The round's own change is therefore compared by content, not by tree diff.git patch-id --stableovergit diff 65eb4a3 870e5baand overgit diff eb1a78c f6ea009gives the same id,e48738e3c850f4c3051baf2c7532eaf6c56899ad: the five files,.env.example,docs/env-fetch.md,docs/store-layout.md,env.mapandscripts/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.hermesunpinned) is not addressed by this head, as the identical patch-id shows; it is carried below with its evidence re-reproduced at this head.f6ea009rather than inheriting round 1's tallies.Spec and standard
mise exec -- make checkgreen;make env ACTOR=pitfetches the same name set as today; an AppRole login on 145 as the runner runsmake env ACTOR=runnerto the end with no 403.AGENTS.md§Checks (make checkis the floor, reported aspr-checks / check (pull_request));docs/env-fetch.md§the map's four rules (:179); workshop ADRs as cited in round 1. The repo keeps nodocs/adr/of its own (AGENTS.md§Decisions). No documented standard is broken.Spec axis
bao/policies/automation-runner.hcl:56(runner-token) and:171(openbao/deploy) are the runner's;bao/policies/ci-secrets.hcl:19is the onesecretspath,secret/data/ci/secrets/semaphore-api. The age-class actors read throughoperator.hclandadmin-agent.hcl.actors=pit,hermesenv.map:55actors=runner …/openbao/deployunder the names the backend readsenv.map:51, theOPENBAO_STATE_*pair the Makefile'sstate_credentialsmaps onto the S3 backend's pair (Makefile:190).actors=runner …/runner-token PROXMOX_VE_API_TOKENenv.map:52actors=secrets …/semaphore-api SEMAPHORE_API_TOKENenv.map:53.env.exampledeclares every nameenv-check:env.map: 5 names, all declared in .env.examplemise exec -- make checkis greencache/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)issuccessforf6ea009(run 69).make env ACTOR=pitfetches the same name set as today4 names · 1 paths · 2 from the age classfor pit and that the deploy, runner-token and CI paths are not read (scripts/tests/run.sh:823).make env ACTOR=runnerto the enddocs/env-fetch.mdboth name the missing toolchain (TR-58). Disclosed, not charged.Red/green, driven by me. Head's suite over base's
env.mapand.env.example: rc 1, 13 FAIL rows, every one a runner or secrets assertion inrepo 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, onesededit,VOIDchecked per row):runnersecretsrow also served torunner…/applyrunnerhermesdropped from the apply rowhermesdropped from the literal rowFindings
hermeshalf ofpit,hermesunpinned. Evidence: the four survivors above.scripts/tests/run.sh:848removesprod.agebefore the runner run, so a literal that reached the runner would write nothing and the case stays green; the case drivespit(:823),runner(:851) andsecrets(:875) and neverhermes, so dropping the Admin agent fromenv.map:50/:55would break itsmake envwith no red. SC-36's "the literal row:actors=pit,hermes" is the requirement this leaves unpinned. Clearing change: ahermesfetch in the same case (the stub and a seededhermesapprole already exist in the suite, as atscripts/tests/run.sh:213) asserting the same four names as pit; and, for the literal's scope, a runner run on a machine whoseprod.ageopens for the runner, assertingPROXMOX_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,55anddocs/env-fetch.mdagree on the row count (four store rows and one literal, five names, matchingenv-check).docs/store-layout.md:101deploy-row cell no longer defers the fetch row to SC-36, anddocs/env-fetch.md:86no longer says the runner's row is pending.SC-36across the head tree:env.map:38,docs/env-fetch.md:86and:216,docs/store-layout.md:101,scripts/tests/run.sh:777are this change's;bao/policies/automation-runner.hcl:168is the one left in the future tense, see below.Operator and the Admin agenthit (docs/env-fetch.md:209) is the apply row's own scope, correct; the Makefile'senvhelp line (Makefile:248) already names the actor byACTOR=and does not enumerate the old pair.new_case,start_stub,assert_*) and registers in the case list (scripts/tests/run.sh:979).git merge-tree --write-tree origin/main f6ea009exits 0 (tree6be245a); the API'smergeable: trueand my own measurement agree.Named, not charged
bao/policies/automation-runner.hcl:168still 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.operator.hcl(secret/data/*) andadmin-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.runnerAppRole 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/deploymust carryOPENBAO_STATE_*andsecret/homelab/proxmox/runner-tokenmust carryPROXMOX_VE_API_TOKEN.Summary
hermeshave no pinning case (carried from round 1, unchanged); AC3 is an Operator step, disclosed, not verified hereNo 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.