The forge's task body runs every make after the install under mise (FO-50) #105
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!105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/FO-50-the-task-body-runs-make-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 fix for the red of the first deploy that #104 started.
Summary
The forge's first deploy on a merge (Actions run 190, Semaphore task 30, 16 Nov) went red 33 s after the merge, at
make env:scripts/semaphore-deploy.sh's task body ranmake env,make prodandmake verifybare. A Semaphore bash task'sPATHis the runner process's, with none of mise's tools, so thejqthatmake depshad just installed was not found. The tracker's script routes every make after the install throughmise exec --and its deploy is green; this brings the forge's body to the same shape (AGENTS.md, Toolchain).make depsstays bare: it installs the manager.Evidence
main)make env ACTOR=runnerunder a runner-likePATHwith nojq, the real Makefile andscripts/env.sh,env -ienv: jq is not on PATH …,Makefile:512: env Error 2: the two lines of task 30mise exec --it passes the tool check and stops atrefused: the Automation runner runner has no seed at …, which is where any machine that is not the runner stopsscripts/tests/semaphore-deploy.test.shmake envruns as, and the red of a task with no managerenvbare,prodbare,verifybare, the manager check removed, the actor dropped: each turns the suite red on the claim it targets (5 of 5)mise exec -- make checkoklinesTask 30's own log, read from Semaphore's database, is the real before: the clone fast-forwarded to the merge commit,
make depswas clean (jq@1.7is among the tools it reports as already installed), then the red above. Nothing was applied: the red is beforesnapshot, and 141 and 146 carry no new snapshot.Not run: the offline rehearsal of
make prod(scripts/rehearse-runner.shin the deploy-pipeline notes) needsscripts/tests/stub-proxmox.py, which this repository does not carry. The rehearsal above covers the failing step only. Every step aftermake envis still unrehearsed on a runner-shaped environment:snapshot guest identity-check runner-guest runner-service service edge verify. The key wiring, the verify's SSH read and the NPM URL are not proven here either, and what the first green deploy will change on 141 and 146 is unread: the runner's checkout was 60 files behindmain, which measures a stale clone and not what is pending on the guests.Noticed, not changed:
report failureruns in the task body's own shell, so itsjq(line 204) is bare as well. Reproduced withenv -iand aPATHwithoutjq:jq: command not found, and the call carries on with an empty body (the forge's answer to it was not read). It matters for a merge that touchesrunner/(start --no-wait), where the play's status is the only red the commit gets. It is a second change to the same function; say if you want it in this pull request.Merge Danger
mainis the deploy (ADR-0009). This one starts the forge's first deploy pastmake env, andsnapshot guest identity-check runner-guest runner-service service edge verifyhave never run on the runner. Two read-only facts to hold: a push that touches norunner/file waits for its task, andrunner-servicecarries arestart forgejo-runnerhandler on the Guest where the Actions job runs; whether anything is pending there is unread.scripts/semaphore-deploy.shand its stub test only. The workflow, the Makefile and every Target are unchanged;make depsand thestartandstatusverbs run as before.Agent-written (Hermes), for the Operator's review and merge.
Review started (round 1/5) on
eab3d16b4b— reading the diff now.Review round 1/5 on head
eab3d16b4b. Verdict: block (1 blocker, 1 advisory). Reviewed as bot-minos, not the author.Recommendation: fix
Verdict
Block. On the paths it covers the change does what its title says: every make after
make depsnow runs undermise exec, and the repo's toolchain rule is met (AGENTS.md §Toolchain). What blocks is the test's proof of the path that matters on the runner. Every passing case puts the manager on PATH, so the fallback the runner actually takes is never exercised by a passing case, and a mutant that breaks that fallback survives the whole suite. The smallest clearing change is under S1.Spec source. The ticket FO-50 could not be read: the profile's Vikunja key answers 401 on
/projectsand/user, and this session has no tracker tool. So the spec is the PR description, taken as the claims it makes (S-claims below). Fetched live this session, 2026-11-16: the PR record, its one commit, its two changed files, its diff, the review list (empty) and the comment list (only my sign-on, 6331).Spec
S1: the fallback the runner takes is untested.
PATHis the runner process's, with none of mise's tools." On the runnercommand -v misefails, soscripts/semaphore-deploy.sh:101takesecho "$HOME/.local/bin/mise".Makefile:500says the same: the install dir must be on PATH.misefirst on PATH (scripts/tests/semaphore-deploy.test.sh:228-238; the success case:301-321), so:101takes thecommand -vbranch. The only case that reaches the fallback (:323-334) expects a red with no manager present.:101echo "$HOME/.local/bin/mise"becomesecho "mise". Full suite: 64 ok, 5 FAIL. Those five are the host-environment failures that base shows too (see Verified). m5 survives.env -i PATH=/usr/bin:/bin): head selects/home/hermes/.local/bin/mise, which is runnable; m5 selectsmise, which is RED.TASK_PATH="$NOMISE_BIN:/usr/bin:/bin"),HOMEpointing at a temp dir whose.local/bin/holds a copy of the mise stub. Assert the same threeexec --routes and the make order. I prototyped this on a scratch copy: head plus the case passes (66 ok, only the five host failures); m5 plus the case fails the new case with an empty mise route. Write it in the test's own style; I have not changed the PR.Standards
AGENTS.md §Code comments.A1:
AGENTS.md §Code commentssays "Keep comments to a minimum … propose a docs page underdocs/." Added comments:scripts/semaphore-deploy.sh:97-99(a 3-line rationale for the baremake deps; one non-obvious constraint, so it may fall under the exception),scripts/tests/semaphore-deploy.test.sh:230-232(stub header) and:241. The test-file comments are the ones I would cut.Passes:
AGENTS.md §Toolchainis met. Every Target exceptmake depsruns asmise exec -- make …(semaphore-deploy.sh:104, 112, 113);make depsstays bare (:100). Calling"$mise_bin"by absolute path instead ofmiseis the same tool when mise is off PATH, so it is not a finding.Named, not charged (outside the counts):
report failureruns a barejqinsidestatus()(semaphore-deploy.sh:110,:201). Pre-existing, not in the diff, and the author named it in the body.make envis unrehearsed. The author disclosed it under "Merge Danger". The diff touches no Stack, plan, ADR, branch protection, CI gate or tier-1 service, and creates or replaces no resource, so I read it as no charter hold. The dispatch places any hold elsewhere, so the state follows the blockers.Verified
git ls-remote origin refs/pull/105/head; basemain4b6ed58eab3d16(matches dispatch); one commit; 2 files, +62/−7mise exec -- make deploy-testin a worktree at headmise exec, base worktree vs headmise exec -- make checkat headoklines; the last target, docs-check, holds all 5. Exit code not captured by my background run; no error line in the logenvbare; m2prodbare; m3verifybare; m4 manager check removed; m6 ACTOR droppedmise execforwards envACTOR=runner mise exec -- printenv ACTORrunnermise exec -- jq --versionmise.tomlpinsansible-playbookon this host, base and head alikemise execthey pass. A host-environment issue, not this PR'sNot verified:
make envagainst the store ("refused: … no seed")snapshot … verifyon a runner-shaped environmentmake checkexit codeSummary
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
Round 1 report: S1 fixed in
5cedc07Tally: 1 blocker (S1), cleared in
5cedc07. 1 advisory (A1), left alone. The review I fixed isREQUEST_CHANGESateab3d16, 1 blocker and 1 advisory.$HOME/.local/bin/miseis untested5cedc07: one success case inscripts/tests/semaphore-deploy.test.sh. No mise on PATH,HOMEat a scratch dir holding a copy of the stub, asserts the threeexec --routes and the make ordermise exec -- make deploy-testand the suite at head, plus mutant m5 on a scratch copyMutant m5 (
echo "$HOME/.local/bin/mise"becomesecho "mise", on a scratch copy):FAIL a deploy that starts without the manager on PATH is the task (want exit [0], got [1]),FAIL the mise route carried:,FAIL make ran: deps..git, so the status step'sgit rev-parse HEADfails. Those are copy artifacts, not m5.Commands at
5cedc07(the tree the gates ran on; nothing changed after them):mise exec -- make depsmise exec -- bash scripts/tests/semaphore-deploy.test.shok(was 70, plus three new);semaphore-deploy tests: every case passed.mise exec -- make checkok;docs-check: all 5 assertions hold.mise exec -- make validateSuccess! 2 passed, 0 failed.ANSIBLE_VAULT_PASSWORD_FILE=<literal in scratch> mise exec -- make syntax-checkplaybook: site.yml. The literal is the CI job's shape, not the Operator's secretmise exec -- make docs-checkdocs-check: all 5 assertions hold.mise exec -- make fmt-checkBefore the change,
make deploy-testwas rc=0 with 206ok.CI at
5cedc07: all eight contexts aresuccesson their latest status.pr-checks: env-check, fmt-check, validate, syntax-check, docs-check.plan: guest-plan-check, edge-plan-check, runner-guest-plan-check.Own review (
code-review, two axes): Standards 0 hard violations, 3 judgement calls. Spec 0 missing, 0 scope creep. I left the judgement calls alone: the new block repeats the shape of the case beside it, and theTASK_PATH/HOMEpair appears twice. A helper would rewrite the existing case too, which is outside this blocker.Left alone, not in this round:
scripts/semaphore-deploy.sh:97-99and the stub-header comments landed ineab3d16, not in this fix. This commit adds no comments. Left for the author.70 okfor the suite. At5cedc07it is73 ok. I did not edit the body; the author should update that row.actor=runneron the new case: the case beside it asserts it. S1 did not ask for it, so I did not add it.Not verified: the real Semaphore runner's PATH. The test reproduces a no-mise PATH with a stub, not the runner process. The rest of the deploy (
snapshotthroughverify) is still unrehearsed, as the body discloses. This change does not touch it.Review started (round 2/5) on
5cedc07210— reading the diff now.Review round 2/5 on head
5cedc07210. Verdict: merge (0 blockers, 2 advisories). Reviewed as bot-minos, not the author.Recommendation: merge
Verdict
Merge. Round 1's one blocker (S1) is cleared at
5cedc07, and the delta is the test that round 1 asked for, nothing else. Every behavioural claim in the PR body holds when I run it. Two advisories stand (A1, A2): below the three-advisory line, so the recommendation rests on zero blockers, not on the count. The state follows the findings: the change reroutes the forge's own deploy task body (a tier-1 deploy path), and the dispatch narrows the hold to the findings, so the class is not a reason to withhold. Merging stays with the Operator.Spec source. FO-50 could not be read live:
scripts/fetch-vikunja-task.sh 4 50answered/projects http=401on both keys (run 2026-11-16 ~13:39 CET). No cached stand-in:cache/scratch/vikunja-4-50/is empty andvikunja-FO-50/holds no task JSON. The spec is the PR description's claims, as written.Prior review.
list_pull_reviewsread before posting: #722 (bot-minos, REQUEST_CHANGES,eab3d16,dismissed: false). This APPROVE at5cedc07supersedes it.Prior blocker
eab3d16): manager fallback$HOME/.local/bin/miseuntested5cedc07,scripts/tests/semaphore-deploy.test.sh:323-341: no mise on PATH, HOME holds a stub mise, asserts the threeexec --routes and the make ordermise) on a copy of head: 3 FAIL, all in that case, so red. Head: 73 ok, 0 FAIL, two runs. ClearedDelta:
git diff eab3d16 5cedc07isscripts/tests/semaphore-deploy.test.sh+20/-0 only.scripts/semaphore-deploy.shis blob41f5de7at both heads.Standards
scripts/semaphore-deploy.sh:97-99;scripts/tests/semaphore-deploy.test.sh:230-232, 241. AgainstAGENTS.md §Code comments("Keep comments to a minimum"). Judgement: the 3-line reason for the baremake depsmay fall under the exception; the test-file comments are the ones to cut. Unchanged at5cedc07Passes:
AGENTS.md §Toolchain.make depsbare (:100);env,prod,verifyunder"$mise_bin" exec --(:104, :112, :113); the fallback equalsMISE_FALLBACK := $(HOME)/.local/bin/mise(Makefile:25). Workshop ADRs read atorigin/main: 0001 (toolchain declared; the change routes through it), 0009/0010/0011 (deploy by merge; no destroy or replace in the diff). Charter (1)-(4): no Stack or plan job touched and the plan contexts are green; no ADR at head changed; no literal secret in the diff (the only token is the stub literalstub-token); end-to-end run below.Spec
eab3d16, not5cedc07make checkrow says "242oklines"; head is 245, rc 0. Round 1 flagged the same row; still stale. Refresh before mergeClaims checked at head (all hold):
env,prod,verifyrun under mise;depsbareenvfetched as the runner through miseNamed, not charged
report failure'sjqis bare insidestatus()scripts/semaphore-deploy.sh:201-204(untouched by the diff)jqon PATH,status failuregivesjq: command not found(line 204), then "the status call did not answer", rc 1. Before this change the task died atmake envand never reached it, so no failure status was posted then either: the visible outcome is the same. The PR body discloses it. The runbook's promise (docs/runbooks/0001-deploy-and-rollback.md:443-450, the red posted beforemake prod) does not hold on the runner until this is fixed. A follow-up task, or fold it in: your callmake envon a runner-shaped environmentVerified
git ls-remote origin refs/pull/105/headat start, after the probes, and before posting5cedc07, unchangedgit diff eab3d16 5cedc07make deploy-testat headmise exec -- make deploy-testmise exec -- bash scripts/tests/semaphore-deploy.test.sh, two runsmake checkat headmise exec -- make checkon an unmutated copyreport failurejqstatus failure, forge URL unreachable5cedc07get_commit_statusesupdated_atmoved only on the sign-onNot verified
make envagainst the store ("refused: … no seed")snapshot … verifyon a runner-shaped environmentmise trustSummary
status()jq named above.