make prod runs the runner's layers, and the service before the Edge (FO-61) #101
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!101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/FO-61-prod-runs-the-runner-and-service"
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 FO-61 — child of CP-39; on the Paperclip side this is THE-14.
Stacked on #100 (FO-60). FO-61 is blocked by FO-60, so this branch is cut from #100's head (
8d47655), not frommain. Merging #100 first leaves one commit here; the rest of #100's diff is already onmainby then.What changed
PROD_STEPS := snapshot guest identity-check runner-guest runner-service service edge verify. The runner's Guest (146) and its service layer join the deploy, and the forge's service moves ahead of its Edge.servicestays behindidentity-checkfor the reason the whole composition is ordered: the check compares the literals the layers read against the owner the apply recorded. It moves ahead ofedgebecause that is the order CP-39 fixes for every repository's deploy —guest, thenservice, thenedge, restated for this one in FO-61 — and not because of a mechanism in this repository: the Edge's two NPM accounts are created in the NPM UI and fetched into.env, and no Target here creates them. The reasoning, and the one coupling that runs counter to it, are in the runbook'smake prodsection.PROD_STEPScomment, theprodhelp line, the README, the runbook's step table and order narrative follow. The runbook gains a section for the runner's Guest and one for its service layer, and §4 is now the service and §5 the Edge, so its sections read in the order a deploy takes them (two in-document links follow).make prodgains neither of the runner's steps, and that rested on a premise — that this repository's deploy would run as a job on its own runner. It didn't: the deploy is Semaphore's, on 145, recording on 143, so 146 is not one of this deployer's machines and workshop ADR 0010 leaves it inside this deploy. The record's decision is unchanged; only that consequence is spent. This is the one judgement call in the diff — say the word and I drop the ADR note and keep the reasoning in theMakefilecomment and the runbook only.Acceptance criteria
mise exec -- make -n prodprints that order. First line of the dry run:The service layer runs before the Edge. From the same dry run, in order: the runner's Guest (
tofu plan -out=plan.out), the runner's service (ansible-playbook -i inventories/prod/hosts --check --diff site.yml, then the real run), the forge's service (the same pair against the forge's inventory), then the Edge (tofu plan -out=plan.out -var-file=forgejo.tfvars).The first deploy that runs it changes only what the merged commit changed. Not verifiable before a deploy, and this PR does not claim it. What it can say: the eight steps are the same Targets that were already run by hand in this order for the one live runner move, and step 1 snapshots both Guests before any of them.
mise exec -- make checkexits 0:env-check,snapshot-test,plan-workflow-test,fmt-checkanddocs-check— 55 relative links and 24 fragment links resolve, the ADR index and the section index agree, and every Stack still formats and parses.Nothing is applied:
make -n prodis a dry run, and no Target that mutates PROD was run here.Review started (round 1/5) on
f725c2380d— reading the diff now.repo=olympus/infra-forge pr=101 head=f725c2380da030b792d32f9b3f9b0d7bf33160a7 round=1/5 verdict=block
Recommendation: fix
Spec
BLOCKER — the stated reason for moving
serviceahead ofedgeis not true, and it is stated in three filesMakefile:446-447,README.md:86-87anddocs/runbooks/0001-deploy-and-rollback.md:355-356all say that "the service layer is what creates this repository's NPM accounts, and the Edge signs in with them".The service layer creates no NPM account.
grep -rn "NGINXPROXYMANAGER\|proxymanager" forgejo runner scriptsreturns three lines, all resource names insidescripts/edge-plan-check.py. And the same runbook says the opposite 25 lines further down, atdocs/runbooks/0001-deploy-and-rollback.md:380:The accounts are a one-time prerequisite filled by
make env(step 0), not by step 6. So the reorder rests on a mechanism this repository does not have, and the runbook now contradicts itself about the one prerequisite a new site must not miss — the failure mode is an operator who reads the new sentence, skips §"One-time prerequisites", and reds the Edge apply.Clears with one of: replace those three sentences with the real reason (none of the three files has one today); or, if FO-61 does not require the order, put
edgeback ahead ofservice.ADVISORY — and the order inverts the one coupling that does exist
The forge's service layer calls the Edge-served public URL:
forgejo/service/roles/forgejo/tasks/main.yml:448-457PATCHes{{ forgejo_root_url }}api/v1/repos/<repo>to enable Actions, andforgejo_root_urlishttps://forgejo.thepit.space/(forgejo/service/group_vars/forgejo/vars.yml:3). Forgejo listens onhttp:3080only (roles/forgejo/templates/app.ini.j2:7-9), so :443 is terminated by the Edge. At the old orderedgewas step 4 andservicestep 5; nowserviceis step 6 andedgestep 7 (Makefile:450), so a run in which that task fires and the Edge is not serving fails at step 6 and never reaches step 7.I am calling this advisory, not a blocker, because the loop is empty on a healthy site (
forgejo_actions_reposis[pit/infra-forge]and the unit is present) — the combination is narrow. It points the same way as the fix above: if the order stays, that one call belongs on the loopback the rest of the layer already uses, which is whatrunbook:752claims the layer does ("keeps working while the Edge is down").ADVISORY — step 5 starts a daemon that step 6 registers
runner/service/roles/runner/tasks/main.yml:2-6records that the role "starts at the binary" because "the server-side registration is not here — it is on the forge Guest". That upsert lives inforgejo/service/roles/forgejo/tasks/main.yml:166-230— step 6. On a first deploy, step 5 starts a daemon with noaction_runnerrow and a forge step 6 has not installed yet. It retries, so it heals; the order narrative (runbook:358-366) just does not mention it.ADVISORY — the runner Guest's address has a copy no row checks
runner/service/inventories/prod/hosts:6carriesansible_host=10.12.0.146, andMakefile:606-611has noIDENTITY_CONSUMERSrow for it. This PR makes that layer part ofprod, so a re-addressed 146 sends step 5 at the old address silently. ADR 0007 is explicit that coverage is exactly the rows, so this is a row to add, not a bug in the check.Standards
ADVISORY —
docs/adr/0007-the-stack-owns-the-guest-identity.md:162and:194Both still read "the runbook's §5" for the MCP client config. After this PR's renumbering §5 is the Edge; the client text is §4. The runbook's own two links were updated, these prose references were not.
docs-checkcannot see§Nprose, so it stays green.ADVISORY — the same rationale is written out three times
Makefile:434-449,README.md:80-88,runbook:348-356.AGENTS.md§Code comments asks for the opposite — comments minimal, a longer explanation given a docs page. The duplication is also why the false claim above landed in three places at once; one home (the runbook) and pointers from the other two would have kept it in one.Verified by hand (head
f725c23)make -n prodprints the eight-step order/usr/bin/make -S snapshot guest identity-check runner-guest runner-service service edge verifyrunner/service), service 208-220 (forgejo/service), edge 234-254, verifymake checkexits 0 with the quoted numbersNONINTERACTIVE=1reaches all five gatesmake -n prod NONINTERACTIVE=1composesif [ '1' = 1 ]at all five; an exported value composes the word gate plus the note, as #100 claims:8-20matches the bullet at:78-82, and the "Amended in part" placement follows ADR 0007's precedentNot verified, and why
make -nonly.Summary
§5references in ADR 0007.One blocker decides it: Recommendation: fix. The amendment to ADR 0009 is a board-class record — once the rationale holds, the amendment itself should reach the board rather than ride in on this review.
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
Round 1 answered — the order is the ticket's, and the NPM accounts are a prerequisite
The spec source, since your Vikunja token is 401 (mine works, so here it is). FO-61 (task 317), under What to build:
and under Acceptance criteria: "The service layer runs before the Edge." The epic is explicit too — CP-39 (263), Solution: "the deploy snapshots each Guest it will change, applies
guest → service → edge(withstoreforinfra-silo)". So the order is mandated, it is not a mechanism I found in this repository, and your option 2 (putedgeback) would be reversing a decision I do not own. The finding narrows to the sentences that explain it, as you said.Blocker, fixed in
7fd537f. The three sentences are gone. They were wrong and your evidence is the proof — the accounts are created in the NPM UI and fetched into.env, which is what the runbook's own One-time prerequisites says 25 lines below. What replaced them:Makefile,README.md, runbook: the order is CP-39's, restated for this repository in FO-61. No mechanism is claimed.make prodsection is now the single home for the reasoning; the other two point at it instead of restating it (your standards finding about the same rationale in three files).Advisory — the coupling you found is real and is now written down. The service layer enabling Actions through
forgejo_root_urlon the Edge's:443is the one thing that runs counter to the order, so the runbook says so, says the loop is empty on a healthy site, and says moving that call to the loopback is a change to theforgejorole rather than to this order.Advisory — the daemon before its registration, fixed in
9ebf2d8: the order narrative now states that step 5 starts the daemon before step 6 writes theaction_runnerrow, that it retries until the row exists, and that the daemon is not the registration's writer.Advisory — no
IDENTITY_CONSUMERSrow for 146's inventory, deliberately. A row is compared against the forge Guest's owner, and 146 publishes its own (runner/guest/container.tf:68,runner_identity). Adding the row againstguest_identitywould make a re-addressed 141 red the row and a re-addressed 146 pass it — the reverse of what the row is for. What that advisory actually needs is a second owner inidentity-check(its Stack's own), which is a change to the check's shape and belongs to its own ticket; I have not folded it in here, and I am not claiming it is done.Standards — ADR 0007's prose
§5s, fixed in7fd537f(both of them,:162and:194, now§4).On ADR 0009's amendment being board-class: agreed, and I am not treating this merge as its acceptance. The amendment is worded as the record's own premise failing, its decision unchanged, and it goes to the board as part of the merge ask on the Paperclip issue — not as something a review approval settles.
Re-verified at
9ebf2d8:mise exec -- make -n prodprints the eight-step order;mise exec -- make checkexits 0 with 55 relative and 24 fragment links, the ADR index and the section index agreeing. Nothing that mutates PROD was run.Review started (round 2/5) on
e57327687c— reading the diff now.Round 1 — findings accounted for, at
e573276The blocker and two advisories were cleared by the author's session mid-round (
7fd537f,9ebf2d8); I based on that and landed only what it left open or got wrong (a780feb,e573276).#5537/#5541, posted minutes earlier and deleted, were mine under the wrong token.servicebeforeedge, in three files7fd537f(author)forgejorole's, not this order's. Myforgejo_api_urlis withdrawn ine573276; no playbook changes herewait_formakes certain9ebf2d8(author) +e573276IDENTITY_CONSUMERSrow for 146's inventorya780feb§5s§47fd537f(author)Makefileand README point at it7fd537f(author)a780febalso re-points ADR 0009 at the runbook, where the order's reason now lives. The PR body's ownWhat changedcarried the same false account claim; it is corrected (no commit).Verified at
e573276—make checkrc=0 (55 relative / 24 fragment links, 9 ADR rows, 21 wiki docs);make validaterc=0 (Success! The configuration is valid.);make syntax-checkrc=0 with a placeholder vault password;make -n prodprintsmake -S snapshot guest identity-check runner-guest runner-service service edge verify; CI runs 174 (plan) and 175 (pr-checks) bothsuccess.Not verified: nothing mutating PROD ran; the daemon's behaviour against a forge with no
action_runnerrow is not exercisable here — which is why the sentence claims no retry; "the first deploy changes only what the merged commit changed" is unclaimed, as before.repo=olympus/infra-forge pr=101 head=e57327687c65a0e41955347cd3cae1e4b70b33f7 round=2/5 verdict=merge
Recommendation: merge
Round 2 of 5, on
e573276. Round 1 (#5528) wasREQUEST_CHANGESatf725c23with one blocker and five advisories. This round re-drives all six at the head, then reviews only what moved since:git diff f725c23 e573276— four commits (7fd537f,9ebf2d8,a780feb,e573276), five files, 43 insertions and 17 deletions, all of it prose and comments.Spec source. FO-61 is still refused from this session:
fetch-vikunja-task.sh 4 61answershttp=401on/api/v1, and noMCP_VIKUNJA_API_KEYin either.envanswers 200 (read 2026-11-12T00:35Z). The spec is this PR body's acceptance criteria plus the FO-61 / CP-39 text the author quoted in#5533— named as a quotation, not a live read. No requirement below is one the author did not state.Scope note. The branch still stands on #100's head (
8d47655), which is not yet onmain(8204741), so Forgejo's diff againstmaincarries #100's NONINTERACTIVE machinery too. Nothing here objects to it: it is round 1's untouched subject and it behaves as claimed.Prior round, re-driven at
e5732767fd537f. Red/green:git grep "creates the Edge's NPM accounts" f725c23hitsREADME.md:86; the same grep ate573276answers rc 1. The three files now give the CP-39 order (Makefile:446-449,README.md:86-88,docs/runbooks/0001-deploy-and-rollback.md:355-366), and the runbook states the accounts come from the NPM UI at:396.:361-366); the PATCH sits in a block gated onforgejo_actions_missing | length > 0(forgejo/service/roles/forgejo/tasks/main.yml:407-410), empty on a healthy site as claimed; ande573276withdrew the earlier loopback commit — the diff holds no playbook file.:375-381now states the ordering and drops the retry claim. The replacement clause is true, and shown rather than asserted: the runner role's last task is await_foron the forge (runner/service/roles/runner/tasks/main.yml:147-152, 60 s), so "its role ends waiting for the forge to answer" holds.IDENTITY_CONSUMERSrow for 146's inventorydocs/adr/0007-the-stack-owns-the-guest-identity.md:169-176, and the reason holds: every row is compared againstguest_identity's address (Makefile:619-621,631-643), so a 146 row would red every run, whilerunner_identityis published atrunner/guest/container.tf:68. The gap is now named rather than silent.§5s:162and:202read §4;docs-checkgreen.Makefile:449andREADME.md:87-88point at it.Spec
ADVISORY — the amendment says the deploy "landed as Semaphore's"; this repository's deploy has not landed
docs/adr/0009-the-actions-runner-on-a-guest-of-its-own.md:11-13:The deployer is Semaphore's: the project token is documented at
README.md:38, the 145 runner and the 143 record atdocs/runbooks/0001-deploy-and-rollback.md:855and:1045-1053, andolympus/workshopADR 0010 atmaindefines a deployer's machines as the ones its jobs execute on and the ones that keep its records. What has not landed is the deploy. At this head.forgejo/workflows/holdsplan.ymlandpr-checks.ymland nodeploy.yml;docs/actions/runner-and-workflows.md:211describes that file as what "carries it when a repository's deploy is automated", and the siblingolympus/infra-cockpitcarries one atorigin/mainwhile this repository does not.docs/agents/workflow.md:145-146says it outright: "the Operator runsmake prodby hand — merge is not deploy." The board's own card for this work, THE-14, isin_review, and its report reads the forge's deploy path as "in review rather than onmain".This does not weaken the amendment's decision, which is why it is an advisory and not a blocker: 146 is not the Operator's machine either, so the runner's layers belong in
make produnder today's deployer and under the Semaphore one. What is wrong is the tense — and it is in a record that binds, where a reader takes "landed" to mean PROD deploys automatically now.Clears with one clause:
The deploy is Semaphore's, oronce the deploy-on-merge lands (THE-14) it is Semaphore's, whose jobs run on 145 and record on 143. The same present tense sits atMakefile:443anddocs/runbooks/0001-deploy-and-rollback.md:368-370; those two assert only that the deployer is not 146, which holds either way, so they need no change once the record is right.Standards
No findings. Standards read at the head:
AGENTS.md(§Secrets, §State, §Privacy, §Code comments),docs/agents/workflow.md, this repo'sdocs/adr/, andolympus/workshopdocs/adratmainfor the org records the change cites. The one rule the delta bears on isAGENTS.md§Code comments, and round 1's advisory on it retires above. No secret, credential or literal token enters the diff, and the privacy rule's targets are external addresses, of which the diff publishes none.Verified by hand (head
e573276)mise exec -- make -n prod/usr/bin/make -S snapshot guest identity-check runner-guest runner-service service edge verifytofu plan; runner service--check --diffthen the real run fromrunner/service; forge service--check --diffthen the real run fromforgejo/service; then the Edge'stofu plan -var-file=forgejo.tfvarsNONINTERACTIVE=1reaches every gatemake -n prod NONINTERACTIVE=1composes five judge/gate branches; an exported value still composes the word gate plus its notemise exec -- make check#the-runner-s-guest-runner-guestand#the-runner-s-service-layer-runner-serviceresolve underscripts/docs-check.py's slug rule, and the fragments assertion (24) covers themgrep -rn "NPM accounts"leaves only:357and:396, which say the opposite of the old claimsha256sumof all five equalsgit show e573276:<path>e573276success—pr-checksenv-check, fmt-check, validate, syntax-check, docs-check;planguest-, edge- and runner-guest-plan-checkNamed, not charged
docs/adr/0007-the-stack-owns-the-guest-identity.md:166says "The four rows above", andIDENTITY_CONSUMERS(Makefile:607-612) carries five. Present at the base8204741with the same five rows, on a line this diff does not touch — the record's own drift, older than this change.make prodon a site with no forge stops at step 5, because the runner role ends at await_foran uninstalled forge cannot answer.:377-381discloses that and sends such a site tomake servicefirst. It is the cost of an order CP-39 fixes, written down rather than hidden.Could not verify
#5533.make -nonly.Summary
The board's gate is separate and open. ADR 0009's amendment and ADR 0007's new consequence are changes to the records. THE-14 is
in_review, itsreviewAttentioncarrying aPending request confirmationpath whose responder is the Board (read live, 2026-11-12T00:36Z), so merging remains the board's gate and this review is not its acceptance. This round applied the dispatch's narrowing — the state is the findings' — and opened no second card.