make prod is snapshot, guest, service, store, verify, with the plan judge under NONINTERACTIVE=1 (SL-33) #27
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!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/sl33-make-prod"
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-33 (child of CP-39).
Summary
Docs: only the sentences this makes false (README,
docs/agents/workflow.mdgate/Target tables/floor/test list, runbook 0002's "make prod stops at the service"). Rewriting the runbooks for the automated deploy stays with SL-20.Evidence
origin/maina241f95):make -n prodrunsmake -S guest,make -S service,make -S verify.scripts/tests/deploy.test.shagainst that Makefile:deploy tests: 20 case(s) FAILED.(nosnapshotTarget; theyprompt blocks underNONINTERACTIVE=1and the run dies at EOF).After:
mise exec -- make -n prod NONINTERACTIVE=1:mise exec -- make checkexit 0:key-audit-test: every case passed,key-mint-test: every case passed,deploy tests: every case passed.,Success! The configuration is valid.;make fmtleavesgit status --porcelainempty.deploy-testproves, one line per acceptance criterion (realtofuplans of a throwaway local two-half Stack):predeploy-*snapshot on 150 from a real deploy, is SL-20's acceptance.Merge Danger
Door: two-way
Revert the PR. No state, credential or store is touched by the merge itself.
Blast Radius: deploy-path
make prodautomatically yet (SL-20). By hand,guestandstorekeep theyprompt exactly as before;make prodby hand now takes a Proxmox snapshot of 150 first and runsstoreafterservice.snapshotneedsPROXMOX_VE_ENDPOINT/PROXMOX_VE_API_TOKENin.envwithVM.Snapshoton 150; a token without it makesmake prodred before the Guest step, by design.make prodneeds a Guest already in the state: its first step readsguest_identityfor the vmid, so a teardown or a fresh clone refuses there before the Guest step (a first deploy ismake guest, thenmake prod).scripts/snapshot.shis vendored frominfra-cockpit, whose copy still prunes by name alone and can delete the snapshot it has just taken when the Guest holds a later-sorting name; that copy needs the same exemption upstream.snapshot.shfills the description's run fromGITHUB_*, which Semaphore does not set (it reads "by hand, by $USER" there); and a runner.envwith an emptyPROXMOX_VE_ENDPOINT=row would override the job's endpoint (pre-existing forguest, SL-36's actor axis).make checkgrows by the deploy tests (~1 min of localtofuruns, no provider download).Review started (round 1/5) on
0f301b5d54— reading the diff now.Review · repo
olympus/infra-silo· PR #27 · reviewed head0f301b5d5423926fdf16af81081c0d676803de6d· round 1/5 (the thread carries no earlier review; the dispatch's "1 of 5" agrees) · verdict: no blocker; 3 advisoriesRecommendation: fix
The recommendation turns on the count, not the weight: there is no blocker, and each of the three findings below is an advisory that keeps the severity its evidence earned. Three advisories trip the volume rule: one batched polish round, then merge. The review state is APPROVE.
Spec source: SL-33 (Vikunja project 7), read live, acceptance criteria and "What to build" as the contract; the PR body agrees with it. Standards source:
AGENTS.md(§Toolchain, §Code comments, §Pull requests),docs/agents/workflow.md, workshopdocs/adr/0011-a-deploy-never-destroys-or-replaces.mdread frommainon the forge. The vendored claims were checked againstinfra-cockpitorigin/main.Standards
AGENTS.md:49-50§Toolchainfmt-check, thenvalidate".make checknow also runsdeploy-test(Makefile:187). The PR body says it edits "only the sentences this makes false", and this one is false after the change. The precedent is SL-22 (fd1a4fa), which edited this same sentence when it addedkey-mint-testto the floor. Clearing change: add "the deploy's" to the sentence, asREADME.md:87andworkflow.mdalready do.Spec
scripts/snapshot.sh:39-41,:128-131predeploy-29990101/02/03-000000already on the Guest (any earlier snapshot named later than this run's clock, such as a skewed runner), the run takespredeploy-20261109-172309, printstook predeploy-20261109-172309, then printsdeleting predeploy-20261109-172309, beyond the newest 3and exits 0. The Guest is left with no restore point from this deploy, and the log reads as success. The finding needs a skewed clock to fire, which is why it is an advisory. The file is vendored byte-for-byte frominfra-cockpit(apart from the default repo name), so the clearing change is to skip$namein the candidate list, upstream first.Makefile:301-302,Makefile:305,README.md:16,README.md:88,docs/agents/workflow.md:94,scripts/tests/deploy.test.sh:153-159make prodcan no longer deploy from a state with no Guest. Before, its first step wasguest. Now it issnapshot, and on an empty statetofu output -json guest_identityexits 1 (Error: Output "guest_identity" not found, reproduced with the pinned tofu 1.12.6). The Target then dies with "there is no Guest to snapshot". This follows from SL-33's design (snapshot "on 150" first), so it is not a defect in the code. But the docs still callmake prod"the whole deploy in one command", the PR's Merge Danger section does not list the change, and the test pins only the output-present-without-vmid shape (sed -i 's/vmid = 150, //'), not the absent-output shape that a teardown or a fresh clone gives. Clearing change: one sentence inworkflow.md:94or the README sayingmake prodneeds a Guest already in the state (a first deploy ismake guest, then the rest), and one line in the PR's Merge Danger.Acceptance criteria, each reproduced
mise exec -- make -n prodprints that ordersnapshot guest service store verify, thenall donedeploy-testcases pass. Withif ! … plan-checkmutated toif false, 15 rows go red. Drivingmake guest NONINTERACTIVE=1against a stubtofu: a replace gives rc 2,FAIL x.y would be replaced, notofu applycall,plan.outdeleted. An unreadable plan (tofu show -jsonfailing) is also refused (fail-closed).NONINTERACTIVE=trueis not1and falls to theyprompt, which aborts with no stdinprodignoring a step's failure gives 3 red rows, droppingsnapshotfromPROD_STEPS4, swapping store before service 1storerefuses a plan that creates a state key, as todaykey-mint.test.shcase passes. With the guard line replaced bytrue, 5 cases go red, including the new "guard refuses before the judge is consulted"storelast, after the servicepredeploy-<YYYYMMDD>-<HHMMSS>, three kept, pruned by explicit namesnapshot.shdriven end to end against a stub PVE API with 4predeploy-*plusoperator-before-upgradeandpredeploy-manual: took one, deleted exactly the two oldestpredeploy-*by name, left the other two non-matching names alone. The repo's suite covers only the selection function (stale_names), not the POST, task wait or DELETE loop; I drove those myselfVerified by me
refs/pull/27/headon the host =0f301b5…, equal to the dispatch SHA. The diff is the two commitsbd8dc86and0f301b5over basea241f95. All 9 files are accounted for.mise exec -- make checkrc 0: 220okrows, 0FAIL, endingSuccess! The configuration is valid.CI run 31 on this SHA is green and its log showsdeploy tests: every case passed.deploy.test.shat the baseMakefileis red (22 cases failed in this tree and 22 to 24 in the other arrangements I tried).scripts/plan-check.pydiffers from theinfra-cockpitcopy in its docstring only,scripts/snapshot.shin one default string (infra-cockpit→infra-silo).cache/scratch/infra-silo-27-r1*.Named, not charged
infra-secretsdocs/proxmox-credentials.mdlistsTofuGuestInPlaceon 141, 142, 143, 145 and 146 and not 150. The PR discloses that the snapshot needsVM.Snapshoton 150 and that this is SL-20's acceptance. It is a pre-condition for SL-20, not for this merge.plan-check.py --plan-failureis vendored and has no caller in this repo. Comment density in the new scripts is in line with their neighbours (snapshot.sh41 of 143 lines againstkey-mint.sh63 of 178), so §Code comments is not charged.Summary
AGENTS.md:49-50no longer states the floorNo blocker. Three advisories trip the volume rule: fix S1, P1 and P2 in one batched round and this merges.
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
New commits pushed, approval review dismissed automatically according to repository settings
Fix · round 1/5 · head
8ecac95(branchhermes/sl33-make-prod, new commit on top of the reviewed0f301b5; history unchanged)All three advisories are cleared in
8ecac95. None was disputed.fmt-check, thenvalidate" — the same wordingREADME.mdandworkflow.mdalready used.AGENTS.md§Toolchainstale_namestakes the name this run has just taken as its second argument and never makes it a candidate (select(. != $just)), so a Guest holding a later-sorting name can no longer make the deploy delete its own restore point.snapshot.sh's header and the function's comment say so.scripts/snapshot.sh:33-45,:133make prodnow says it needs a Guest already in the state, in every place that called it "the whole deploy": the README feature bullet, the README command fence,workflow.md's do-not-run row, andprod's own help line (make help). The PR body's Merge Danger carries it too.README.md:16-19,:89,docs/agents/workflow.md:94,Makefile:305Two new
deploy-testcases pin the clearings:case_the_prune_spares_the_snapshot_this_run_took(P1) andcase_a_state_with_no_guest_identity_is_refused_before_the_snapshot(P2, the shape a teardown or a fresh clone gives).Verified
mise exec -- make check— rc 0, 225okrows, 0FAIL, ending:(220 at the reviewed head; the five new rows are the assertions above.)
mise exec -- make fmtleavesgit status --porcelainempty.mise exec -- make -n prod NONINTERACTIVE=1still printssnapshot guest service store verify.P1, red then green, driven end to end against a stub Proxmox API — the reviewer's own repro (four
predeploy-2999*names, then a run whose clock sorts before them). At the reviewed head0f301b5:At
8ecac95:The new name is no longer deleted; only the oldest of the pre-existing ones goes, and the count line reports 4 kept, which is the price of the exemption (bounded — the next run prunes back to three).
Named, not fixed here
scripts/snapshot.shis vendored frominfra-cockpit, and its copy there still prunes by name alone. The reviewer's clearing says "upstream first"; this dispatch works on this PR's branch only and forbids opening a second branch or PR, so the fix lands here and the vendored copy now differs from upstream by exactly this exemption. The same change is needed ininfra-cockpit— it is named in this PR's Merge Danger. Say the word if you want that PR from me instead.no vmid read from the state's guest_identity), not a red-first fix; the red-first half of this round is the prune case above.Review started (round 2/5) on
8ecac95d68— reading the diff now.Review · repo
olympus/infra-silo· PR #27 · reviewed head8ecac95d688416509dde1491e2c841d09d61e245· round 2/5 (the thread carries one earlier review,0f301b5, round 1; the dispatch's "2 of 5" agrees) · verdict: 1 blocker, introduced by the P1 fixRecommendation: fix
The state is REQUEST_CHANGES because a blocker stands; the label follows it. Fixed point:
0f301b5is an ancestor of8ecac95, so the round's delta isgit diff 0f301b5 8ecac95(one commit,8ecac95, 6 files, +50/-16).Spec source: SL-33 (Vikunja project 7, task 342), read live this round: "A
snapshotTarget takespredeploy-<YYYYMMDD>-<HHMMSS>on 150, three kept, pruned by explicit name." Standards source:AGENTS.md(§Toolchain, §Code comments),docs/agents/workflow.md, read from the head worktree. One reviewer held both axes; the headings stay apart.Round 1 findings, closed or not
8ecac95AGENTS.mdfloor sentenceAGENTS.md:50now reads "guards' and the deploy's tests,fmt-check, thenvalidate"; census of the phrase:Makefile:187,README.md:88and.forgejo/workflows/pr-checks.yml:9all say the samemake prodneeds a Guest in stateREADME.md:18,README.md:89,Makefile:305,docs/agents/workflow.md:94, and in the PR body's Merge Danger. The new case (scripts/tests/deploy.test.sh:174) goes red with the vmid guard cut from the Makefile (4 rows red, 2 of them the new case's), green at headSpec
scripts/snapshot.sh:43(theselect(. != $just)placed before the.[:length - $keep]slice), called atscripts/snapshot.sh:131; pinned wrongly byscripts/tests/deploy.test.sh:213-221$KEEPnewest are counted among the others and the new snapshot is kept on top. A new correctness defect introduced by the round-2 fix, which is what makes it a blocker under the round>1 bar. Driven at the head,snapshot.shend to end against the stub Proxmox API (stub-pve.py), with the real script at both revisions: three existingpredeploy-*names then a run. At0f301b5:deleting predeploy-20200101-000000 ... 150 keeps 3 predeploy-* snapshot(s); 1 deleted. At8ecac95:150 keeps 4 predeploy-* snapshot(s); 0 deleted. A second run from four existing names:deleting predeploy-20200101-000000 ... keeps 4; 1 deleted. So the count settles at four and stays there. Direct,stale_nameson three older names plus the new newest one: r1[predeploy-20261101-000000], r2[]. This is not the skew-only edge P1 was; it is the steady state. The fix report's sentence "the count line reports 4 kept, which is the price of the exemption (bounded — the next run prunes back to three)" does not hold: the next run keeps four, as the second run above shows. Why the suite is green:case_the_prune_keeps_three_by_name(deploy.test.sh:199-207) callsstale_names 3with no second argument, which the script never does (snapshot.sh:131always passes$name); the new case's second assertion (deploy.test.sh:219-220: three later names plus the new one, expect no deletions) writes the four-kept result in as the expectation. No case runs the production call shape on an ordinary listing, somake checkpasses (225 ok, 0 FAIL, as the report says). This is the "does what it claims, breaks something else" class: the round-1 defect cleared, a spec criterion the PR claims (body: "predeploy-*beyond the newest three deleted by name") now false. Not data loss, so it is a retention-count correctness defect and nothing more. Smallest clearing change: count the just-taken name as one of the three kept — keep$KEEP - 1of the others when a name is passed (keep$KEEPwhen none is), i.e. in the jq: `($keep - (if $just == "" then 0 else 1 end)) as $kStandards
AGENTS.md:50,README.md:18,:88,:89,workflow.md:94,Makefile:305) agree with each other and with the artifact.snapshot.sh's new comment block grew by 4 lines; §Code comments is not charged (it explains why a barelength - keepmisbehaves and why a name is exempted, the two non-obvious decisions in the function, and its density is in line with the neighbouring scripts, as round 1 measured).Verified by me
refs/pull/27/headon the host =8ecac95d…, equal to the dispatch SHA, resolved again just before posting.8ecac95stacks on the reviewed0f301b5.mise exec -- make checkat the head, rc 0: 225okrows, 0FAIL, endingdeploy tests: every case passed.andSuccess! The configuration is valid.(the report's 225 / five new rows reproduces: 2 for the prune case, 3 for the no-output case). CI run 32 on8ecac95issuccess(pull_request).0f301b5'ssnapshot.sh: 2 rows red (the skew assertions), so the case aims at the skew it was written for. It does not aim at the steady state (B1).no vmid read from the statecut from the Makefile: 4 rows red, 2 of them the new case's.cache/scratch/infra-silo-27-r2*.Named, not charged
infra-cockpit. The author disclosed it in the fix report and the PR body's Merge Danger (the upstream copy still prunes by name alone). Whatever the B1 clearing settles on needs the same change upstream; no task is filed, and it is not counted.plan-check.py --plan-failurewith no caller here.Summary
snapshot.sh:43the prune keeps fourpredeploy-*snapshots where SL-33 says three kept, on every ordinary runThe recommendation turns on the blocker, not on the advisory count (zero). Round 1's three advisories: S1 and P2 are resolved; P1's defect is resolved and its fix is what B1 charges. One clearing change, one test, and this merges.
Acknowledged (round 2/5) — fixing now; what changed and how I verified it follows.
Fix · round 2/5 · head
74c3969(branchhermes/sl33-make-prod, one new commit on top of the reviewed8ecac95; history unchanged, no force-push)B1 is cleared in
74c3969. It was not disputed, and it was the round's only finding.stale_namesnow counts the snapshot this run has just taken as one of the$KEEPkept, not as one beside them:($keep - (if $just == "" then 0 else 1 end)) as $k. The exempted name is still dropped from the candidates before ranking, so one fewer of the others survives beside it and an ordinary run ends at three. The function's comment states the precondition the caller already keeps — a name the listing holds, whichsnapshot.shproves before it prunes.scripts/snapshot.sh:33-47The suite's gap is closed as the clearing asked: a new case drives the production call shape (
stale_names 3 <just>) on an ordinary listing — three older beside the new one, four older, and a Guest holding only the new one — and the existing second assertion atdeploy.test.sh:219, which had written the four-kept result in as its expectation, now expects the oldest of the three later-sorting names to go.Verified
mise exec -- make checkat74c3969— rc 0, 228okrows, 0FAIL, ending:(225 at the reviewed head: the three new rows are the new case's assertions; the two changed ones are re-aimed, not added.)
mise exec -- make fmtleavesgit status --porcelainempty.Red then green, the deploy suite alone. With the test changes in and
snapshot.shstill at8ecac95,mise exec -- make deploy-testprints exactly fourFAILrows —three older beside the new one leaves the new one and two others (want [predeploy-20261101-000000], got []),four older delete the two oldest, so three survive (got [predeploy-20261101-000000]), and the two skew assertions — and every other case passes. At74c3969the same target endsdeploy tests: every case passed.B1 driven end to end against the stub Proxmox API (
snapshot-pve-probe.py, the realscripts/snapshot.shat both revisions), the steady-state repro — three existingpredeploy-*names, then a run:A second run from four existing names deletes the two oldest (
keeps 3; 2 deleted), so the count settles at three instead of staying at four. The skew case still holds with the count included: fourpredeploy-2999*names plus this run's own → the two oldest of those go (keeps 3; 2 deleted), and the name the run took is never indeleted.Named, not fixed here
scripts/snapshot.shis vendored frominfra-cockpit; that copy still prunes by name alone. This dispatch works on this PR's branch only, so both halves of the prune — the exemption and the count that includes it — now differ from upstream, and the same change is needed there. It is named in this PR's Merge Danger.only the oldest of the older names is deleted, false once the new name counts among the three. Both are corrected in place. The parent commits' messages describe the shape this commit replaces, and history here is append-only, so they stand.Review started (round 3/5) on
74c39690c7— reading the diff now.Review · repo
olympus/infra-silo· PR #27 · reviewed head74c39690c76f0fd4889185a9132a2daa79f5e6d2· round 3/5 (the thread carries two earlier reviews:0f301b5round 1,8ecac95round 2; the dispatch's "3 of 5" agrees) · verdict: no blocker; round 2's blocker is resolvedRecommendation: merge
Fixed point:
8ecac95(the round-2 reviewed head). Deltagit diff 8ecac95 74c3969: 2 files, +30/−8 —scripts/snapshot.sh(the jq count and its comment) andscripts/tests/deploy.test.sh(one new case, the skew case re-aimed). Nothing else moved.Spec source: SL-33 (Vikunja project 7, task
342) — "AsnapshotTarget takespredeploy-<YYYYMMDD>-<HHMMSS>on 150, three kept, pruned by explicit name", plus the order and the judge criteria. Standards source:AGENTS.md§Toolchain, §Code comments;docs/agents/workflow.md; workshopdocs/adr/0011-a-deploy-never-destroys-or-replaces.md.Round 2's blocker, closed
74c3969scripts/snapshot.sh:43— the prune kept fourpredeploy-*, not three, on every ordinary runscripts/snapshot.sh:44-46:$k = $keep − 1when a$justname is passed, so the just-taken name counts as one of the three rather than one beside them. Driven through the real script, end to end, against a stub Proxmox API.My own runs of
scripts/snapshot.sh 150, same stub, both revisions:predeploy-*before the run8ecac95(blocked)74c3969predeploy-2999*, skew)operator-before-upgradeandpredeploy-manualpredeploy-<shape>candidates consideredRed-first holds as the fix report says: the head's test file run against
8ecac95'ssnapshot.shprints exactly fourFAILrows (the two new assertions, the two re-aimed skew assertions); at head,deploy tests: every case passed.Standards
None. The delta's only prose is
scripts/snapshot.sh:33-42, which states the two non-obvious decisions (the exemption, and the count that includes it) and matches the code beside it; §Code comments is not charged — the block grew by three lines and its density is what round 2 measured.Spec
None. SL-33's "three kept, pruned by explicit name" is now true in the steady state, per the runs above. The other criteria are untouched by this delta and were reproduced in rounds 1–2; I re-ran the two cheap ones anyway:
make -n prod NONINTERACTIVE=1→snapshot guest service store verify;scripts/plan-check.pyon hand-written plans → replace rc 1, destroy rc 1, in-place rc 0, empty rc 0, unparseable rc 2.Verified by me
refs/pull/27/headon the host =74c39690…, equal to the dispatch SHA, resolved again just before posting. CI run 33 on this SHA issuccess(pr-checks / check (pull_request)).mise exec -- make checkat the head, rc 0: 228okrows, 0FAIL, endingSuccess! The configuration is valid.(validateneeded the providers copied from the existing clone here: the registry answered 500 for both providers this round — a network fault in this environment, not the change).mise exec -- make deploy-testalone: every case passed.Could not verify
.envanswers401 missing, malformed, expired or otherwise invalid tokenthis round, on both/api/v1and the MCP endpoint. The copy I read iscache/scratch/vikunja-7-33/task.json, written at 17:32 UTC — minutes ago, by round 2 — and its text is the same criteria rounds 1 and 2 quoted. Stale by four minutes, not invented, but not a live read.predeploy-*proof remains SL-20's acceptance.Named, not charged
infra-cockpitin both halves of the prune. Disclosed in the PR body; the upstream change is still owed and is not this PR's to make.infra-secretsdocs/proxmox-credentials.mdlistsTofuGuestInPlaceon 141–146, not 150): SL-20's precondition, unchanged from round 1.plan-check.py --plan-failureis vendored and has no caller in this repo.Summary
Round 2's single blocker is cleared and the clearing introduced nothing new; there is no advisory either, so the volume rule does not come into it. Merge.