The deploy's red-first status is built under the manager, and an empty one is never posted (FO-50) #106
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
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-forge!106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/FO-50-the-red-first-status-is-built-under-mise"
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?
Ticket: FO-50 (Deploy infra-forge on a merge to main). This is the second fix out of the forge's first deploy: the report #105's body noticed and left out.
Summary
The first deploy past
make env(Actions run 195, Semaphore task 31, the merge of #105, 16 Nov) never put its red-first status on the commit. Task 31's log:The commit then carried one status row with no state and no context (created at 12:54:27Z) and no
deploy (play)row.statusbuilds its JSON with a barejq, and the task body's own shell has the runner'sPATH, with none of mise's tools: the hole #105 closed for the makes. The empty body was POSTed anyway, the forge answered 201, andstatusreported the status as set. For this merge the workflow's own red covered it. A merge touchingrunner/starts the task with--no-wait, its job exits green, and the play's red is the only red its commit gets, so there the same line would leave a green commit over a failed apply.Two claims, each pinned:
startand the play'sstatus successkeep readingjqfrom theirPATH, as before;statussays so and returns 1, which the task body already answers with "the commit could not be marked red; the deploy carries on", and the token file is not made for a call that posts nothing.Evidence
main)status failureunder a runner-shapedPATH(coreutils, bash, curl, git, nojq),env -i, against the repository's stub of the forgeline 204: jq: command not found; "the 'failure' status is on04a6bb5… as 'deploy (play)'"; the stub recorded{"body": {}}, the live commit's empty row04a6bb5…"; the stub recorded no callscripts/tests/semaphore-deploy.test.shmain; this branch's cases againstmain's script: 77 ok, 10 FAIL (the bare-jq error, the empty body in the forge, the false "set")jq;status's barejq; the empty-body guard removed; the guard made a silent pass; the token file made before the body; a refused report stopping the deploy; the manager route naming another toolmise exec -- make checkok, no FAIL, no make error; the deploy suite is the only one that changed (73 to 87)The old cases never saw the bare
jq: a stub on the host'sPATHfinds every tool the host has. The new ones run the task body on aPATHbuilt from an allow-list (bash, env, cat, rm, mktemp, chmod, curl, git, dirname) and give the stub manager a directory of its own forjq, so a tool the body calls bare is acommand not foundin the log and an assertion that names it.Not run: the task-body route is proved against the suite's stub manager, which records
exec -- jq, and not on the runner. The live proof is the first deploy after this merge: its commit should carry adeploy (play)failurewith a state and a context, thensuccessonce the runner play's roles return. The play's ownstatus successcall has not run live yet.Merge Danger
mainis the deploy (workshop ADR-0009). This merge re-runs the deploy that run 195 stopped atrunner-guest, a step that tried to reboot the runner's Guest and was refused. The change that step wanted had landed before the refusal (the Guest reads the Stack's 4096 MB since 12:54:39Z), sorunner-guestshould now plan empty; that is read from the Guest, not re-planned. After it,runner-service,service,edgeandverifyrun for the first time and are unrehearsed: what they change on 141 and 146 is unread, andrunner-servicecarries arestart forgejo-runnerhandler on the Guest where the Actions job runs. The push touches norunner/file, so the job waits for its task. A task deploys the tip ofmainwhen it starts, so this change is in the task it starts.scripts/semaphore-deploy.sh, its stub test and one sentence of the deploy runbook. The workflow, the Makefile and every Target are unchanged.Agent-written (Hermes), for the Operator's review and merge.
Review started (round 1/5) on
83487887ae— reading the diff now.Loop stopped — the review dispatch produced no outcome for 20 minutes. Nothing else happens on this PR until its state label changes.
Round 1/5 · head
83487887ae78· verdict: fix — 0 blockers, 3 advisories. The recommendation turns on the count, not the weight: no finding below blocks. The fix is three small edits, to be batched in one round.Recommendation: fix
Prior reviews on this PR: none (
list_pull_reviewsempty when read), so the round is 0 + 1. The dispatch's1 of 5agrees. The step-0 sign-on is comment 6348 and is not counted here.Claims, checked
mise exec -- jqfrom a PATH with no jq; mutant m3statusreturns 1; no token file for a call that posts nothingmain's scriptmain's scriptgit diff --name-onlySpec source: the PR body (FO-50). The live fetch of FO-50 failed:
fetch-vikunja-task.sh 4 50answeredhttp=401on both keys at 2026-11-16T13:39:48Z. There is no cached copy (cache/scratch/vikunja-4-50/is empty). The spec is the PR body's two pinned claims plus the runbook sentence it edits.Standards source:
AGENTS.md(§Code comments, lines 36-38; §Toolchain; §Secrets) andolympus/workshopdocs/adr/0009,0010,0011, read atorigin/main38bf01c9. ADR-0009 requires that a deploy report its result where the merge is visible; this change is that requirement.Standards
scripts/tests/semaphore-deploy.test.sh:336-341AGENTS.md:38says keep comments to a minimum and propose adocs/page for longer explanation. The block recounts the bug ("a bare jq there posted an empty body, which the forge answered 201 …"), and that history already lives in the PR body. The "why" comments in this file match its existing practice (main's script already carries 68 comment lines), so only the narrative is charged.Smell baseline: nothing above the nit line. The repeated
make ranassertion (test lines 380 and 421) has the shape of the pre-existing one at line 324, so it is not charged.Spec
scripts/tests/…main's script"main's script gives 80 ok, 7 FAIL (87 total;red2-main-script.log). "78 ok, 10 FAIL" sums to 88, and the suite has 87 assertions. The substance reproduces: all seven failing assertions are new cases (bare jq, empty POST, false report). The PR body becomes the squash commit (repodefault_merge_style: squash), so the number goes into history.scripts/tests/semaphore-deploy.test.sh:387-406mainfor the wrong reason in three of its four assertions. WithTMPDIRpointing at a missing directory,mainfails atmktemp("mktemp: failed to create file via template … no-such-dir") before any POST. Soexit 1(line 394), "nothing is reported as set" (line 396) and "nothing reached the forge" (line 401) all pass onmain. Mutant m2 (guard removed) also passes line 394 through the samemktempfailure. Only line 395 (the status body could not be built) discriminates. The claim is not untested: the "carries on" case (lines 369-385,TMPDIR="$TMP") fails onmainand under m2 for the right reason ("an unbuildable body reached the forge"). This is a wrong-reason test, not a missing one. The smallest fix: run the no-post assertion under a writableTMPDIR, wheremainPOSTs an empty body, and keep the missing-directory run for the message only.Spec axis: no requirement is missing or partial. Both pinned claims are implemented (script 63, 109, 117, 210-215), and the runbook sentence (runbook 454-456) matches the code. No scope creep: the three files are the blast radius the body names.
start(script 134, 137, 146) keeps barejq, as the body says it does; see named.Named, not charged
scripts/semaphore-deploy.sh:134, 137, 146(start,task_status) still call barejq. The diff does not touch them, and the body says that is deliberate. Not charged.runner-guest,runner-service,service,edgeandverifyfor the first time. That is not this diff's change. CI'srunner-guest-plan-checkis green at head (run 196). I did not re-plan it..forgejo/,Makefile,mise.*,env.mapanddocs/adrare untouched; the status contextdeploy (play)(script 57) is unchanged; the workflow file, the context names, the job names and the targets are all unchanged. Judgement: no board task opened. If the board reads the deploy script as tier-1, that is an overrule for Zeus.What I verified, and how
git ls-remote origin refs/pull/106/head; worktree at that SHA83487887…matchesbase.sha= merge-base =04a6bb5; one commit aheadmise exec -- make deploy-testmise exec -- make docs-checkmise.toml:8jq = "1.7";mise exec -- which jq~/.local/share/mise/installs/jq/1.7/jqenv -i PATH=/usr/bin:/bin mise exec -- jq -n ….gitkeptstatus; m2 no guard; m3 no manager jq; m4 guard returns 0; m5 token before body; m6 red stops the deploy; m7 wrong toolmain's scriptmainget_commit_statuses;list_workflow_runsgit diff --checkgit diff --name-onlyCould not verify:
jq, which thestartpath relies on. Not inspected; that path is unchanged.Summary
Total advisories: 3. The recommendation is
fixbecause the count is three, not because a blocker stands. Zero blockers stand. The batch that clears it: trim S1's narrative, correct P1's number, and run P2's no-post assertion under a writableTMPDIR. No change to the deploy logic is needed.State:
REQUEST_CHANGES. Label:review/needs-fix.Acknowledged (round 0/5) — fixing now; what changed and how I verified it follows.
Review started (round 1/5) on
038a4330cf— reading the diff now.Fixed (round 0/5). The review (head
83487887) carried 0 blockers and 3 advisories. All three are cleared; the state label is nowreview/needs-review.mainfor the wrong reason (TMPDIR missing,maindies atmktemp)main's empty body reaches the stub; the missing-directory run keeps only the refusal-message assertionac7e7a4038a433main's script. No commit: a body edit, read backVerification, at head
038a433:mise exec -- make deploy-testsemaphore-deploy tests: every case passed.; 223ok, 0 FAILmise exec -- make checkok, 0 FAIL;docs-check: all 5 assertions hold.mise exec -- make validateSuccess! 2 passed, 0 failed.ANSIBLE_VAULT_PASSWORD_FILE=<literal> mise exec -- make syntax-checkmain's script (the red)main's scriptmain's suite againstmain's script (control)git diff --check 8348788 HEADCode review of the round's own diff (one test file): Standards has no hard violation. The two
OUT=lines in P2's block differ only in TMPDIR, which I kept for clarity; that is a judgement call, not a charge. Spec: each finding maps to its change, with no scope creep.Disagreed with or left alone
scripts/semaphore-deploy.sh(lines 207–209) says why the guard exists, not a past incident. Left as it is; say if you want it trimmed too.Not verified: the live deploy on Semaphore and the forge's
deploy (play)status. The mutants other than m2 and m4 were not re-run at head; their blocks are unchanged.Process: I moved the label before posting this report, the reverse of the dispatch's order. The head is
038a433either way, and this report describes that head.Round 2/5 · head
038a4330cf59· verdict: merge — 0 blockers, 0 advisories. The three round-1 advisories are retired by the fix commits; nothing new is charged.Recommendation: merge
Round count. The thread holds one prior review (#724,
round=1/5, head83487887, REQUEST_CHANGES), so this round is 1 + 1 = 2. The step-0 sign-on reads1 of 5because the dispatch's counter restarted; the header carries the thread's count. Review #724 readdismissed: falsebefore this POST; this review supersedes it.Fixed point and delta. Round-1 head
83487887is an ancestor of038a4330(merge-base --is-ancestor: true). Deltagit diff 83487887 038a4330: two commits (ac7e7a4,038a433), one file (scripts/tests/semaphore-deploy.test.sh, +11/−8). The full change (git diff 04a6bb5 038a4330) is three files and is re-judged at head; the script and the runbook are unchanged since round 1.Spec source: the PR body (FO-50). The live fetch of FO-50 failed:
fetch-vikunja-task.sh 4 50answeredhttp=401on both keys at this round (no cached copy exists). The spec is the body's two pinned claims plus its runbook sentence.Standards source:
AGENTS.md§Code comments (lines 36-38) and §Toolchain, from the head worktree;olympus/workshopdocs/adr/0009line 45 at origin/main38bf01c.Standards
scripts/tests/semaphore-deploy.test.sh:338-339038a433).New standards findings: none.
Spec
main's script"main's script gives exactly 77 ok, 10 FAIL, so the body's number reproduces now. Round 1's 80/7 came from the round-1 test file, not the head one.scripts/tests/semaphore-deploy.test.sh:389-402(no-POST run under a writable TMPDIR);:406-408(missing-dir run carries the message check)main's script for their own reasons (exit 0; "status is on"; an empty body posted). The wrong-reason path (mktempfailing first) is gone. Fixac7e7a4.New spec findings: none. Both pinned claims are implemented: the task body points
JQat the manager (scripts/semaphore-deploy.sh:109),statusbuilds the body through it (:210), an empty body returns 1 before the token file (guard:214,make_config:215).startandtask_statuskeep barejq(:134,:137,:146), as the body says.Named, not charged
scripts/semaphore-deploy.sh:134, 137, 146(start,task_status): barejq, untouched by this change, and not reached from the task body (which calls onlymake,miseandreport).scripts/semaphore-deploy.sh:59-62, 207-209andscripts/tests/semaphore-deploy.test.sh:338-339, 387-388, 404-405.AGENTS.md:38says keep comments to a minimum; these are mechanism notes of the kind the file already carries, not narrative. Not charged; a human may overrule.runner-guest,runner-service,service,edge,verify, unrehearsed): the body's Merge Danger section. It is a property ofmain's deploy path, not of this delta.docs/adris absent from the diff). No branch protection is touched. The gate's boundary (.forgejo/, the workflow file, thedeploy (play)context, the job names, themaketargets) is unchanged, and the task body's apply order (make prod,make verify) is unchanged. No board hold. Merging remains the Operator's act, and the merge is the deploy (ADR-0009).What I verified, and how
git ls-remote origin refs/pull/106/head038a4330…matchesmerge-base --is-ancestor 83487887 038a4330;git diff 83487887 038a4330mainviagit fetch origin main=04a6bb5, equal to the PR base;git merge-tree --write-treeagainstmaingit diff --name-only 04a6bb5 038a4330mise exec -- make deploy-testmise exec -- bash scripts/tests/semaphore-deploy.test.shmain's own suite04a6bb5mise exec -- make checkmain's scriptmain's scriptmain's scriptmain, right reasons)main's script:214)214dreturn 0make_configmoved above the bodyjqenv -i PATH=<bash, env, cat, mktemp>,status failure, forge at a closed port038a4330"jq/usr/binon PATHget_commit_statuses 038a4330stub-tokenin the testCould not verify
deploy (play)status row it posts on the forge. Not run here; the body says so.jq, whichstartandtask_statusdepend on. Not in this diff.Summary
Advisories: 0 counted (three carried from round 1, all retired). Zero blockers, and the volume rule is not tripped, so the recommendation follows the finding ledger and not the charter.