Declare the tracker records' deploy-shaped state keys (SC-15) #19
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-silo!19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/sc15-tracker-deploy-state-keys"
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?
Summary
SC-15. The two infra-tracker records gain their third key shape — the deploy key a Stack is applied with, which writes the record and deletes only the lock beside it (workshop ADR-0012).
Each policy is the record's
applypolicy narrowed to the deploy shape:s3:GetObjectands3:PutObjecton the record, plusDeleteObjecton the lock alone, so a deploy cannot remove a state object.Evidence
2 to add, 0 to change, 0 to destroy— no key is replaced and nothing else moves.make key-auditreporting21 key(s) under silo/, 20 audited, 1 out of scope, **0 failing**.403onprod/openbao.tfstateandprod/silo.tfstate, andAccessDeniedon a delete outside its policy. A wrong secret on the same access key answers403, so the test is not falling back to admin credentials.make checkpasses.A created key is not a scoped key — §7 now says so.
minio_iam_service_accountcreated both withPolicy: implied, inheriting the account's root, whiletofu planstill read clean because the provider never reads a policy back. They were re-created withmcli admin accesskey create silo/ --policy … --access-key … --secret-key …, which embeds it; both now readembedded. The declaration stays as the reviewed policy and the destroy guard. Anything created by the declaration alone — SC-16's and SC-20's keys next — has the same hole, which is the ticket filed beside this one.Merge Danger
Door: two-way. Removing an entry is a key's delete, which is why the destroy guard refuses it without the guard lifted in the same diff.
Blast Radius: two records. Only the runner's deploy reads them, and that Guest does not exist yet (CP-42), so nothing consumes either key today.
Two keys for the deployer's third shape: tofu-deploy-state-tracker-{guest,edge}, each naming its record and deleting only the lock beside it (workshop ADR 0012). Both are in the store with the policy embedded; the runbook records that minio_iam_service_account leaves a created key's policy implied and that make key-audit is what tells the two apart.Review started (round 1/5) on
c9c3ab4eda— reading the diff now.The provider hole this branch ran into is filed as SL-22 (needs-triage, related to SC-15): "A key the declaration creates is not scoped: minio_iam_service_account leaves the policy implied".
It carries the three shapes a fix could take, with a recommendation (a
make key-mintthat creates with--policyand imports;key-auditfailing onimpliedbeside it). Nothing about this branch waits on it: both keys here areembeddedand audit clean.olympus/infra-silo #19 · head
c9c3ab4· round 1/5 (the dispatch's 1/5; the thread carried no prior review) · verdict: merge, four advisories carriedRecommendation: fix
Verdict
Merge. Nothing in the diff is wrong: both policy files are this repo's established deploy shape narrowed to the right record, the two
var.state_keysentries name them, andmake checkis green at the head. There are four advisories, all documentation and all one-line, and the recommendation turns on their count, not their weight — at three or more advisories one batched pass costs less than three taste calls argued one at a time. No blocker stands, so the state is APPROVE.Standards
S1 · ADVISORY · the PR body names a task this repository's tracker cannot resolve.
AGENTS.md:75-79§Pull requests: "Name the task a PR addresses in its body asSL-<index>."AGENTS.md:69-73puts this repo's tasks in Vikunja projectinfra-silo(id 7, identifierSL). The body opens "SC-15", which is projectinfra-secrets(id 8). No SL task covers this change: project 7 carries SL-19 and SL-21 for the other Stacks' keys and SL-22 for the provider hole below, but nothing for the two tracker deploy keys. !15 and !16 carried SC references too, so this may be house practice now — if it is, the file that should say so isAGENTS.md.Clearing: an
SL-<index>reference in the body, or theAGENTS.md:75-79rule amended in this diff.Spec
Spec source: SC-15 (Give the Semaphore runner its policy and infra-tracker's reach) with its comment of 2026-11-05 12:27, which records this branch and this commit. What the change claims — two policies, two declarations, §7's table, count and note — is delivered. The policy shape is exactly workshop ADR-0012's (verified below). The three findings are in the prose the change edits.
P1 · ADVISORY ·
docs/runbooks/0003-the-state-in-the-store.md:334-337says one row of the table takes the deploy shape; three do."
tofu-deploy-state-semaphoreis the one row of the table that takes it" — true before this diff, false after it: the table this same change edits carries three deploy rows, the two it adds at:302-303and the semaphore row at:306. The reader is corrected by the table a screen above, which is what keeps this advisory rather than blocking.Clearing: name the three rows, or write "the rows that take it".
P2 · ADVISORY · the count this change moves is corrected in §7 and left stale in two other places.
docs/adr/0010-a-declared-state-key-keeps-the-owner-it-was-minted-with.md:4-6: "a key per record per shape, seventeen of them across the fleet … the store half now declares fifteen of them". At this head the two numbers are 19 and 17 (eight records × apply+plan = 16, plus three deploy keys). The change moved §7's copy (:262,:449, both now correct) and not the ADR's.docs/runbooks/0003-the-state-in-the-store.md:376-378: "The fifteen keys were minted by hand … it names fifteen keys to add". That is the rebuild procedure, and a fresh record plans seventeen to add at this head.Clearing: renumber both in this diff.
P3 · ADVISORY · the mint recipe in the new note omits
--name, and a nameless key is the one keymake key-auditdoes not audit.docs/runbooks/0003-the-state-in-the-store.md:458-463givesmcli admin accesskey create silo/ --policy <file> --access-key … --secret-key …, then tells the readermake key-audit"is the check that tells the two apart … run it after any key is added or re-created".scripts/key-audit.sh:140-158decides a key's scope from its--name(label=${label:-unnamed}, then thetofu*)case): an unnamed key is printed as "out of scope" and never counted inaudited, so a key minted by that recipe is the one the audit skips. §0's own mint (:39-42) carries--name tofu-state --description …, and the body's audit line (20 audited, 1 out of scope) only adds up if the two re-created keys were named.Clearing: add
--name <the key's name>to the example.Verified, by my own hand
refs/pull/19/headresolved from the forge twice — at the start and again before this report — bothc9c3ab4edaed4c80a40a08c998834b8cf383f458; basemain3617cabgit diff 3617cab...c9c3ab4 --statkey-audit.sh's owncanonand compared withsemaphore-deploy-state-policy.json, the record name normalised away: identical. Per statement:GetObject+PutObjecton the record,GetObject+PutObject+DeleteObjecton the lock,ListBucket+GetBucketLocationon the bucket, andDeleteObjectabsent from the recordinfra-trackerat main:vikunja/guest/backend.tf→key = "prod/tracker-guest.tfstate",npm/backend.tf→key = "prod/tracker-edge.tfstate", buckettfstate,use_lockfile = true(so the.tflockobject the policy scopes is the one the backend takes)var.state_keyshas 17 entries at the head; §7's table has 18 rows (17 declared + this repo's plan key)mise exec -- make check→ exit 0 (env-check, env-test,tofu fmt -check,tofu validate);make key-audit-test→ exit 0, every case passed;tofu fmt -check -recursive silo/cleanpr-checks / check (pull_request)→success, 16sAGENTS.md§Docs); no secret or plaintext credential in the diff (AGENTS.md§Secrets)Not verified, and why
2 to add, 0 to change, 0 to destroy;make key-auditreporting21 key(s) under silo/, 20 audited, 1 out of scope, 0 failing; the403s onprod/openbao.tfstateandprod/silo.tfstate;AccessDeniedon a delete outside the policy;Policy: embedded. All of it needs the store's root credential (MC_HOST_silo), which I do not hold, and nothing was run against a store. The audit's arithmetic is at least consistent with the repo (18 table rows + §0's apply key + the provisioning key = 20 in scope, + the store-app credential = 21) — that is consistency, not observation.minio_iam_service_accountleaving the policy implied on create. Taken as the author's live observation; SL-22 tracks it and nothing in the repo contradicts it. Its consequence for this change is worth stating once: the declaration is not what scopes these two keys today — themclire-create is — so the note's advice ("run key-audit after any key is added or re-created") is the only guard on every future entry to this map, which is why P3 matters.Pre-existing, not charged
The §7 table is described as "the whole set" (
:274) but carries 18 rows while the store holds 20 in-scope keys: §0's apply key and the provisioning key are not rows. That gap predates this change and this diff does not touch it. Noted so it is not read as approved.Summary
AGENTS.md:75-79Four advisories and no blocker: state APPROVE,
Recommendation: fixbecause the count tripped the three-advisory line, andreview/needs-fixon that recommendation — not because anything here is a defect. All four clear in one pass.Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
- §7 said `tofu-deploy-state-semaphore` was "the one row of the table that takes it". Three rows do at this head — that one and the two this change adds — so the paragraph names all three, which is what its own table shows a screen above. - The count the change moved was corrected in §7 alone. ADR 0010's opening still said seventeen keys across the fleet and fifteen of them declared; at this head it is nineteen and seventeen (eight records × apply+plan, plus three deploy keys). The rebuild procedure still said the fifteen keys were minted by hand and that a plan names fifteen to add; seventeen is what it plans. - `docs/runbooks/0001-deploy-and-teardown.md`'s teardown comment carried the same fifteen ("rather than fifteen times"), which the finding did not name. It moves with the rest. - The mint recipe in the new note omitted `--name`, and the name is the scope test `make key-audit` applies: `scripts/key-audit.sh` reads `.name` off `accesskey info`, falls back to `unnamed`, and counts only a `tofu*` label — so a key minted by that recipe is exactly the one the audit prints as out of scope. The command carries the flag, and the sentence says why the check that tells the two apart needs it.New commits pushed, approval review dismissed automatically according to repository settings
Fixed at
a042dd7— two commits onhermes/sc15-tracker-deploy-state-keys,c9c3ab4..a042dd7, fast-forward, nothing rewritten.AGENTS.md§Pull requests names the task by the project it belongs to —SL-<index>here,SC-<index>/CP-<index>when the change lands this repository's half of a task ininfra-secrets/infra-cockpit— anddocs/agents/issue-tracker.md's bullet on resolving a PR's task moves with it. I did not add anSL-reference: project 7 holds no task for these keys (SL-19 and SL-21 are the other Stacks' keys, SL-22 the provider hole), so one would have been false.a042dd7beb10eebeb10eedocs/runbooks/0001-deploy-and-teardown.md:170carried the same count in its teardown comment ("rather than fifteen times"). It moved with the rest.beb10ee--name--name <the key's name>, and the note says why:key-auditscopes a key by that name (label=${label:-unnamed}, thentofu*), so an unnamed key is the one it prints as out of scope.beb10eeThe counts, measured rather than transcribed.
var.state_keyshas 17 entries ata042dd7, 3 of them deploy; 17 + this Stack's own apply and plan keys is the 19 ADR 0010 now states. §7's table has 18 rows — the 17 declared plus this repository's plan key — which is the arithmetic the review used.Verified
Both run on the committed tree at
a042dd7. Width and orphan test over the diff's added lines, in characters (not bytes): 29 added lines, 0 over 80, 0 whose break leaves a word that would have fitted on it. Every relative link in the edited files resolves inside the repo, and the diff adds none.Disagreed with, or left alone: nothing. All four advisories are cleared, and I did not dispute any. Three notes for the reviewer, none of them a request:
AGENTS.mdamendment is the wider of the two clearings on offer: it changes a rule rather than one PR body. It is also the truthful one — !15 and !16 already citeSC-tasks, so the rule was behind the practice.make plan,make store-planandmake key-auditrefuse for want of a.envand the store's root credential. A docs-only change needs none of them; the live claims in the body are still the author's observation, as the review recorded.Review started (round 2/5) on
a042dd7d0c— reading the diff now.olympus/infra-silo #19 · head
a042dd7· round 2/5 · verdict: merge, one advisory carriedRecommendation: merge
Verdict
Merge. All four round-1 findings are cleared at this head, and the two new policy files are the deploy shape exactly — ADR-0012's apply shape minus
DeleteObjecton the record — named for the record each tracker Stack'sbackend.tfactually types. The diff is 8 files, +85/−17, and every one of them earns its place. One advisory stands: the rulea042dd7amended inAGENTS.mdis still stated the old way in two other files. It is advice, not a blocker — one clause each — and the contract this PR is judged against is now the correct one.Round-1 findings — every one cleared
a042dd7SC-task against anSL--only ruleAGENTS.md:77-81(rule now namesSC-<index>/CP-<index>forinfra-secrets/infra-cockpit) anddocs/agents/issue-tracker.md:61-63— commita042dd7, the wider of the two clearings round 1 offereddocs/runbooks/0003-the-state-in-the-store.md:335-339names all three rows; the table at:302-303carries the two this change adds:4-6(nineteen / seventeen), runbook:262,:378-381,:451, anddocs/runbooks/0001-deploy-and-teardown.md:170— commitbeb10ee--name:461-466carries--name <the key's name>and says whyscripts/key-audit.sh:24-25skips an unnamed keyI re-checked the arithmetic behind P2 rather than take it:
var.state_keyshas 17 entries at this head (silo/store/variables.tf:54-82), §7's table has 18 rows (the 17 declared plus this repository's plan key), and 17 + this Stack's apply and plan keys is the 19 ADR 0010 now states. §0's and 0002's mints at:40-42both already carry--name, so the amended recipe matches its sibling runbooks.Standards
S1 · ADVISORY · the rule this change amends is still stated the old way in two files.
AGENTS.md:77-81now saysSL-<index>, orSC-<index>/CP-<index>for a sibling project's task. Two files carrying the same instruction were not moved with it:README.md:190-191: "Name the task the change addresses in the pull request body asSL-<index>"docs/agents/workflow.md:139: "Name the task in the body (SL-<index>)"Before
a042dd7those four files agreed. NowAGENTS.mdanddocs/agents/issue-tracker.md:61-63allow whatREADME.mdanddocs/agents/workflow.mdstill forbid, and an agent followingworkflow.md§4 reproduces exactly the error round 1 charged. No gate reads prose, so nothing goes red.Clearing: one clause in each, in the phrasing
AGENTS.md:77-81now uses — in this diff or a follow-up.Spec
Spec source: the PR description, which states what the change is for in full. It names
SC-15but links no task, and the tracker answers401to an unauthenticated read — this session holds no tracker credential — so the description is the spec and nothing is invented past it.No findings. Delivered as described: two
silo/store/*-deploy-state-policy.json, the twovar.state_keysentries (variables.tf:67-71), §7's table (:302-303), the three-row paragraph (:335-339), the count, and the "a created key is not a scoped key" note (:456-466). Nothing in the diff is outside the ask: theAGENTS.mdamendment is the clearing round 1 offered, not scope creep.Verified, by my own hand
refs/pull/19/headresolved twice — at the start and again before this report —a042dd7both times; merge-base3617cab; diff 8 files, +85/−17jq -Scanonicalised and compared againstsilo/store/semaphore-deploy-state-policy.jsonwith the record name normalised: identical. Record statementGetObject+PutObjectonly (tracker-guest-deploy-state-policy.json:9-13); lock statement addsDeleteObject(:14-18); bucket pairListBucket+GetBucketLocation; noDeleteObjecton any.tfstateinfra-trackeratorigin/main:vikunja/guest/backend.tf:7-8,17→ buckettfstate, keyprod/tracker-guest.tfstate,use_lockfile = true;npm/backend.tf:7-8,17→prod/tracker-edge.tfstate, same — so the.tflockobject each policy scopes is the one the backend writesvar.state_keys= 17 entries; §7's table = 18 rows; 17 + 2 = 19 (ADR 0010:4)mise exec -- make check→ rc 0 (env-check "the pin and the map agree", env-test "every case holds", fmt-check,tofu validate→ "Success! The configuration is valid.");make key-audit-test→ rc 0, "every case passed"pr-checks / check (pull_request)→success, 16s (run 16)SC=infra-secrets(project 8) andCP=infra-cockpit(project 11) per those repositories' ownAGENTS.mdNot verified, and why
2 to add, 0 to change, 0 to destroy;make key-auditat21 key(s) under silo/, 20 audited, 1 out of scope, 0 failing; the403s onprod/openbao.tfstateandprod/silo.tfstate;AccessDeniedon an out-of-policy delete;Policy: embedded. All need the store's root credential, which I do not hold, and nothing was run against a store. The audit arithmetic is consistent with the repo (18 table rows + this Stack's apply key + the provisioning key = 20 in scope, + the store-app credential = 21) — consistency, not observation.mclirecipe's flags. There is nomcliin the checkout (runbook 0002 §0 downloads it), soadmin accesskey create --policy … --name … --access-key … --secret-key …is checked for consistency withrunbook 0003:40-42and0002:40-42only, not against the client.minio_iam_service_accountleaving the policy implied on create. Taken as the author's observation; SL-22 tracks it and nothing in the repo contradicts it. Worth stating once: the declaration is not what scopes these two keys today — themclire-create is — which is why the note's "runkey-auditafter any key is added or re-created" is the guard, not the declaration.Pre-existing, not charged
:274) carries 18 rows against 19 keys now that ADR 0010 states nineteen. The sentence predates this change and this diff does not touch it; noted again so it is not read as approved.*-deploy-state-policy.jsonthat regaineds3:DeleteObjecton its.tfstatewould keepmake checkand CI green, andkey-auditwould agree with it because the file is what it compares against. True of every policy file here, the semaphore deploy key included; a one-line test oversilo/store/*-deploy-state-policy.jsonwould pin it. Not this PR's debt, and not charged.Summary
README.md:190-191anddocs/agents/workflow.md:139One advisory, no blocker: state APPROVE and
Recommendation: merge. The volume rule does not come into play at one, and S1 — a clause in each of two files — does not hold the merge.pit referenced this pull request from olympus/infra-secrets2026-11-05 12:50:34 +00:00