A rented build box as a third forge instance runner: threat model and setup plan #30
Open
opened 2026-11-22 10:09:19 +00:00 by mars
·
11 comments
No Branch/Tag specified
main
venus/149-stranger-docs
pluto/45-a1-wait-through-the-seam
venus/129-no-launcher-endpoint
titan/119-engine-install
saturnus/45-branch-move-head
jupiter/45-a5-line-forms
jupiter/45-volatile-mesh-say
venus/114-forge-release
venus/114-installer-2
venus/8-land-on-any-host-2
titan/111-gitlinks
titan/111-symlink-and-range-reads
juno/040-host-rerecord
vesta/24-remove-github-sponsors
ceres/19-signin-probe
vesta/94-git-guard-blind-shapes
vesta/67-set-a-exports-git-dir
jupiter/47-status-clock
pallas/46-forge-ci-seam
juno/39-offline-private-scan
pluto/23-standin-recopy-476b5724
mercurius/82-installer-steps-past-install
ceres/19-relay-end-written
mercurius/73-declare-alias-folds
pluto/23-standin-recopy
venus/8-land-on-any-host
ceres/19-relay-frame
venus/28-budget-line
vesta/48-git-guard
ceres/47-hourly-status
terra/batch3-forge-b
pluto/23-declared-digests
ceres/318-friction-note-rebuilt
neptunus/check-private-digests
hygiea/5-tsx-typecheck
terra/batch2-forge
vesta/973-ask-proof-and-pr-base
jupiter/16-5-3-forge-repo-links
mercurius/16-forge-token-shape
jupiter/check-private-stop
terra/batch3-forge
saturnus/1016-crew-mail
venus/999-refresh-modes
uranus/601-martha-forge-workflows
ceres/1041-work-graph
jupiter/957-gap-19-prompt-text
mercurius/987-stranger-text-gate
jupiter/check-private-stop-posted
pluto/1045-under-600
ceres/1041-contract-lines
pluto/1045-free-splits
diverged/hygiea/962-worktree-finish-owner-and-branch
ceres/967-provider-key
saturnus/1016-mesh-key
hygiea/962-worktree-finish-owner-and-branch
pluto/1045-cognitive-complexity
venus/999-refresh-modes-held-merge
pluto/1010-repo-numbers
pluto/1010-drift-numbers
terra/batch-terra-1121e
hygiea/916-provider-subscription-refusal
venus/999-brief-notice
hygiea/992-job-timeouts
pluto/1037-recorded-host-stall
jupiter/1016-crew-memory
pluto/1031-host-2-1-330
terra/batch-terra-1121c
mars/1000-progress-off-tasks
uranus/989-confinement-v
hygiea/985-launcher-verbs-r2
mars/985-rename-handover-match
jupiter/979-guard-places
uranus/980-assign-model
ceres/959-wake-on-idle
uranus/989-confinement-u
juno/802-a-handle-on-my-run
pluto/989-confinement
terra/batch-terra-1120f
mercurius/987-rebased-keep
vesta/308-a-week-of-the-ledger-vesta
jupiter/984-gap-5-crew-state
hygiea/985-launcher-verbs
vesta/915-worktree-finish
terra/batch-terra-1120b
terra/981-review-fix
venus/review-917
final-tip
keep-318-tip
neptunus/1006-review
hygiea/976-the-ci-wait-by-run
terra/979-review-fix
terra/962-review
hygiea/601-row-174-the-engines-settings-watch
uranus/968-markers-r1
terra/981-review
vesta/308-a-week-of-the-ledger
terra/986-review
saturnus/511-up-config
hygiea-601-last3b
hygiea-601-last3
hygiea-601-pre-rebase
jupiter/batch-92
venus/venus-review-929
venus/venus-review-934
uranus/511-up-claude
saturnus/511-refusals
venus/906-token-fixture
jupiter/541-a-engine-start-clean
uranus/614-slice3-approved-skills-on
uranus/614-dw6-unrooted-skill-folders
venus/639-redact-stdin
venus/venus-review-913
neptunus/547-s6-kitty-launch
venus/venus-review-897
neptunus/907-review
venus/898-bundle-main-installer
hygiea/309-a-declared-goal
venus/614-engine-skills-2
neptunus/893-review
venus/639-night2
venus/venus-review-883
jupiter/541-c4-goose-call-answered-by-the-entry
venus/venus-review-866
venus/541-9a-slice-2
mercurius/614-engine-skills
titan/637-updater-switch
pluto/755-fewer-judge-starts
uranus/836-review
mercurius/846-posted-text
neptunus/828-review-r1
titan/801-hint-text
uranus/785-part-2
uranus/797-review
neptunus/830-review
venus/venus-review-837
uranus/724-reap
juno/784-the-launch-a-start-builds
neptunus/784-review-fix
juno/784-the-adapter-under-its-ceiling
diverged/juno/784-the-launch-a-start-builds
juno/784-the-adapter-back-under-origin
neptunus/694-review-fix
juno/732-the-cap-holds-b
neptunus/732-review-fix
titan/541-c3-hints-record
jupiter/host-2.1.328
juno/732-the-cap-holds
ceres/781-launcher-path
uranus/785-hint-files
ceres/724-part-2
neptunus/766-review-fix
uranus/755-hook-filter
jupiter/review-788
neptunus/745-review-fix
uranus/772-judge-env
jupiter/753-keys-declared-twice
pallas/784-launch-request
ceres/562-wire-the-scan
jupiter/744-split-prove-the-core
titan/541-c2-goose-gate-rows
pallas/765-approve-listing
pr-766-tip
terra/769-review
pallas/748-cycle-roots
uranus/uranus-batch-69
venus/venus-review-756
pr-733-head
neptunus/727-shell-quoting
venus/venus-review-738
pallas/694-a-trial-line-keeps-its-transcript
ceres/724-part-1-a-test-leaves-nothing-behind-v2
ceres/tests-leave-nothing-in-the-temp-directory
neptunus/541-2-4-3-the-recording
ceres/700-the-stand-in-reports-its-start
pluto/701
titan/541-6b-multi-host-review-model
uranus/uranus-733r1
scratch-703
titan/541-5-member-host
neptunus/541-2-4-2-the-tool-call
ceres/625-release-redraw
mars/541-acp-transport
ceres/batch-62-redraw
neptunus/541-6-host-model-vocabulary
heads/pr/672
pr/672c
heads/pr/673
juno/541-6-host-model-vocabulary
pr/668b
saturnus/612-no-answer-gets-a-second-launch
ceres/601-release-bump
heads/pr/625
heads/pr/668
pr/656b
heads/pr/666
pallas/611-init-layout
pr/654-r2b
heads/pr/656
pr/662-new
pr/654-new
pr/660-new
saturnus/632-retire-owner-guard
saturnus/602-own-config
ceres/638-read-shape
neptunus/541-10-recorded-goose-host
titan/611-init-layout
venus/244-member-half
titan/165-stand-in-case
pallas/177-tree-stat-record
ceres/314-volatile-path-note-clean
uranus/uranus-batch-48
jupiter/160-where-we-are
uranus/uranus-batch-46
juno/513-budget-r2
pallas/437-trial-builder-r2
pallas/437-trial-builder
saturnus/289b-shell
saturnus/289b-rules
saturnus/289-record-values
ceres/170-vouching-on-real-events
ceres/170-vouching-reaches-the-member
neptunus/136-member-memory
mercurius/4-claw-code-analysis
mercurius/5-scaffold-theme
v0.4.1
dry-run-v0.4.1
installer-v2.0.1
installer-v2.0.0
tested-locks
v0.4.0
ci-tools
v0.3.0
installer-v1.1.1
v0.2.0
installer-v1.1.0
v0.1.0
installer-v1.0.2
installer-v1.0.1
installer-v1.0.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
martha-ai/martha#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Purpose (infrastructure): one rented build box gives the forge a third instance runner, so CI queues of ~146 jobs drain; this issue holds its threat model and setup plan before anything is rented.
DECIDED 2026-11-22 "should I spin up a build box? / yes" (Raf, via the Supervisor).
Scope (plan and script only: nothing rented, nothing registered):
dockeronly, ~4 slots, capacity derived from the box memory against the jobs 6GB limit.Threat model must cover:
Setup plan: a script the crew runs with the Hetzner token (as with the forge box), never an owner act on the box, plus the forge runner registration step.
Done when: threat model + setup script read by an Opus member (PASS), then one owner menu (rent, setup, register).
Refs #601, #24
Build box rented (Refs macula-io/martha#30, DECIDED 2026-11-22 "On demand (Recommended)").
FORGE_GO=build-box-delete build-box.sh delete, read back that the runner row, server and firewall are gone, then post hours × €0.1891 here.Build box STOPPED at setup and deleted (Refs macula-io/martha#30). Nothing is billed any more.
What happened. create passed (server 177182987 at 2026-11-22T10:37:35Z, firewall 12130968, first host key pinned). setup made the new host key on the box and pinned it, then its next ssh failed: the box still presents ED25519
SHA256:KHR/O325FAX21Prk2d6FhDE9oO+Oc/XM/I9CvzNrY2Q, but the pin now holds the new keySHA256:dgL02AUzkCyjbTXRr11Zaz0RVqCc3zOvxy88vHiV7M0. STOP: "build00 does not answer with its new host key".Defect in build-box.sh 8078501a, lines 165-177. The comment at line 166 says "sshd reads its host key files on every connection". That is false for OpenSSH 9.8 and later. Debian 13 ships 10.x, where the listening sshd loads host keys once at start and hands them to each sshd-session. So the new key on disk is not served until sshd restarts, but the restart only comes later (line 187), over a session that now refuses the old key. The likely served key is the first, cloud-init key. I can't prove that: setup removed its public half at line 176. A re-run of setup could not fix it (the pin names a key the box won't serve), so under the go's rule the box was deleted.
Fix sketch, for a new sha and review, not by me unasked: restart (or reload) ssh in the same session that writes the new key, then pin it. Or pin the new key,
systemctl restart sshover the old pin, and only then switch the pin. Also: delete's firewall DELETE returned 422 while the server was still detaching it (line 359). It needs a wait forapplied_toto be empty first. A second delete run finished cleanly.Delete read-back (10:39:49Z): servers named build00-macula-io 0, firewalls named build00-in 0, live runner rows named build00-instance 0 (the runner was never registered: no registration token was minted). Local pin, address and done marks dropped.
Cost: from 10:37:35Z to deleted around 10:39:30Z, about 2 minutes, billed as 1 started hour: 1 × €0.1891 = €0.19 net (€0.23 incl. VAT).
Build box RENTED (Refs macula-io/martha#30), build-box.sh sha256 89d98501 (r=4 PASS, Neptunus), owner yes 2026-11-22 "Yes, rent now (Recommended)".
build-box.sh deleteonce no run has waited for 30 minutes, and reads back that the runner row, server and firewall are gone. Hours × price follow in a later comment.Build box STOPPED and DELETED (Refs macula-io/martha#30). Nothing is billed any more.
Timeline (UTC): create 16:04:25 (server 177210565, firewall 12133077), setup 16:05:47 (the r=4 host-key swap worked first time on the real box), register 16:06:01 (token row 5 retired, 0 active), prove 16:06:40 (all five checks passed). Runner stopped 16:08:12, delete 16:08:51. Read back: servers named build00-macula-io 0, firewalls named build00-in 0, server 177210565 returns 404, live runner rows 0, active registration tokens 0. delete's new firewall wait worked on its first live run.
Defect in build-box.sh 89d98501, setup step 2: the box gets no
git. forgejo-runner clones each action (actions/checkout, setup-node...) on the host, so every job that uses an action failed in under a second:unable to probe object format for https://data.forgejo.org/actions/checkout: ls-remote failed: exec: "git": executable file not found in $PATH(task 1931). prove can't catch it, because its job-shaped container uses no action. Fix sketch, for a new sha and review: addgitto setup's apt-get line, and make prove run one job that uses an action.Damage: in about 2 minutes build00 took 153 tasks: 7 success, 106 failure, 40 skipped. 35 runs were turned red by this, and they need a re-run:
Cost: 16:04:25 to 16:08:51, about 4.5 minutes, billed as 1 started hour: 1 × €0.1891 = €0.19 net (€0.23 incl. VAT).
Rent 3, BILLED from 2026-11-22T21:50:19Z. Server build00-macula-io, id 177240229, 37.27.159.78 (hel1, ccx33). Firewall build00-in, id 12135337. Runner build00-instance (not registered yet).
Price: €117.49/month net + €0.50 IPv4. Basis: Raf answered "Yes, rent now (Recommended)" directly on 2026-11-22, after the Supervisor relayed his yes.
Order: setup with r6 (pin label on-build00 only; Pluto is reviewing, diff-only) → register → prove → one forge-canary job on on-build00, green to its end →
open(adds ubuntu-latest and docker) → watch its first tasks →deleteafter 30 minutes with an empty queue. Then the hours and euro go here.Delete:
cd ~/.claude/sessions/forgejo-setup && FORGE_GO=build-box-delete bash build-box/build-box.sh deleteStale-queue list for build00's 30-min rule (Supervisor ruling via Mars, 2026-11-23 ~00:40Z). Read from the forge DB at 00:29Z.
Rule: a waiting job (status 5) older than 12 h, or one whose runs-on no online runner offers. Online runners at the time: build00-instance [ubuntu-latest, docker, on-build00], host00-instance [ubuntu-latest, on-host00, docker], msi00-instance [ubuntu-latest, on-msi00, docker], host00-image-build [image-build], host00-martha-bwrap [martha-bwrap].
Those two are the whole list. Both match both rules: older than 12 h, and no runner offers that label.
Not cancelled yet: Forgejo 15.0.12's API has no cancel.
/repos/{owner}/{repo}/actions/runs/{run_id}offers GET only, and the swagger lists no cancel or job route. A run-level cancel would also cancel run 1162's 3 blocked jobs (1820 guard, 1823 Build & Push, 1824 attest), which are not on the list. Reported to Mars; nothing cancelled.Dead-label leftovers, under the Supervisor's ruling of 2026-11-23 via Mars. Cancel these when Forgejo has a cancel API. No web-UI or DB cancel, and no ask to Raf.
build00's watch is now ~/.claude/sessions/mercurius-30-r3/b00watch2.sh (444). Its empty check leaves out any waiting job whose runs-on no online runner offers, and each summary line says how many it left out (2 at the switch, 00:4xZ: 124 takeable or running). The box goes once that real queue has been empty for 30 min.
build00 (rent 3) DELETED at 2026-11-23 05:51Z. Early, on Mars's word (the crew is cut to ~10, and I park), before the 08:00Z backstop.
Command, from ~/.claude/sessions/forgejo-setup, with build-box.sh r6 sha256 681e93e1:
Output:
Read back separately: Hetzner has 0 servers named build00-macula-io, server id 177240229 answers 404, firewall id 12135337 answers not_found, and the forge runner row build00-instance is marked deleted with 0 running tasks.
Hours and euros: live from 2026-11-22T21:50:19Z to 2026-11-23T05:51:02Z = 8.01 h. At €0.1891/h net (ccx33, the rate recorded for rent 2, c354) that is €1.52 net. If Hetzner bills each started hour, it is 9 h = €1.70 net. The IPv4 adds under €0.01.
Work done: build00 ran 935 tasks after the canary (task id > 2851): 721 success, 46 failure, 12 cancelled, 156 skipped. Every failure is a known red (nothing private, relay #19, clean-install #3, mcl-mail#5/mcl-stations c4-model, PR 72's npm ci, the martha-engine Rust build) or a capacity fit (martha-engine trial lines needing 4.2 GiB, task 4080, sent to Terra). I found no box fault.
Killed by the delete: 4 jobs were running and need a re-run by their owners: 4977 clean-install (martha PR 84), 5005 relay (martha PR 90), 5029 check (mcl-graph PR 6), and 5032 node in . (martha main).
Still open on this issue: dead-label realm jobs 1826/1829 (c869), to cancel once Forgejo has a cancel API. Each new rent needs Raf's own yes.
Runner list read back after the delete (forge DB, 05:52Z). Runner 8 build00-instance is deregistered (deleted=t, last seen 05:50:54Z). Its row is kept only as a soft delete, and no job can be given to it.
Command:
bash -c 'source ./lib.sh; box_admin "sudo docker compose -f $BOX_DIR/compose.yml exec -T db psql -U forgejo -d forgejo -tAq"' <<< "select id, name, agent_labels, coalesce(deleted,0)<>0 as deleted, to_timestamp(last_online) from action_runner order by id;"Output (id|name|labels|deleted|last online):
Rent 3 delete report and the cost of all three rents (as Mars asked; adds to c1267 and c1272).
Delete time:
build-box.sh delete(r6, sha256 681e93e1) ran from 2026-11-23T05:50:4xZ to 05:51:02Z. The forge runner row 8 was soft-deleted at 05:50:56Z, then the server and firewall were deleted, and the script ended at 05:51:02Z.Read-back (from ~/.claude/sessions/forgejo-setup;
apiis lib.sh's call, which passes the token on stdin, never in argv):So server 404, firewall gone, and 0 live forge runner rows named build00-instance, runner 8 included.
Cost. ccx33 hel1 at €0.1891/h net. Hetzner bills each started hour; VAT is 21%.
Each rent's IPv4 (€0.50/month) adds under €0.01. If Hetzner bills rent 3 by the minute instead (8.01 h), it is €1.52 net / €1.83 incl. VAT, and the total is €1.90 / €2.29.
Correction to c1276 (the Supervisor caught it; c1276 is left as it was).
c1276's per-minute total, €1.90 / €2.29, mixed the two billing rules: rent 3 per minute plus rents 1 and 2 per started hour. Billed per minute, all three rents come to:
The per-started-hour total stands as written: 11 h = €2.08 net / €2.52 incl. VAT. Which of the two Hetzner charges shows on the invoice.