rented founding: the first seed dies on ENOENT — the mirror is never created for an empty box #2183

Closed
opened 2026-11-10 07:04:13 +00:00 by ben · 4 comments
Owner

Severity: blocks every fresh rented founding at the seed row.

What happens

Point your community name at the server
founding: seed the community config: clan: config mutation "idss: seed the community flake for tu-ia":
open ~/.config/IDSS/communities/<id>/clan-config/flake.nix: no such file or directory

Reproduced twice on 2026-11-09 (communities 75aceea1… and 6c126096…, app 2026.11.3363, rented DigitalOcean syd1). Retry fails identically.

Root cause

RemoteConfigRepo.Mutate = ensureStore → pull → apply(mirrorDir) → push. pull runs tar -c --exclude=./.git -C <box> . and hands the bytes to untarInto(mirrorDir, …). A freshly git inited box holds nothing but .git, so the archive is the bare root entry ./. extractTar deliberately skips that entry and creates directories only as parents of real entries — so nothing ever creates mirrorDir. SeedCommunity's apply then does os.WriteFile(mirror/flake.nix) and dies on ENOENT.

Any box tree with at least one file would have created the mirror as a side effect, which is why only the first seed of a fresh rental fails. The re-rent test (seedcommunity_rerent_test.go) starts from t.TempDir(), an existing mirror, so it could not see this.

Fix

internal/clan/mirror.go untarInto: os.MkdirAll(dir, 0o755) after clearing and before extractTar. Idempotent. Test: TestUntarInto_CreatesTheMirrorForAnEmptyBox in mirror_test.go (archive with only ./, mirror path that does not exist, then a write into it must succeed). Whole internal/clan suite green.

Secondary

The failure surfaced as a raw Go error chain under a Retry that can never succeed. The seed leg should name a missing mirror as its own fault (ADR 0100/0125), the way the nix-missing case is routed to the prepare-this-machine block.

Fix: lands as session/rented-seed-mirror on main with GOTCHAS #412. Then the operator app must be rebuilt at that revision (the feed pin is exact, GOTCHAS #410 / #1769).

**Severity:** blocks every fresh rented founding at the seed row. ## What happens ``` Point your community name at the server founding: seed the community config: clan: config mutation "idss: seed the community flake for tu-ia": open ~/.config/IDSS/communities/<id>/clan-config/flake.nix: no such file or directory ``` Reproduced twice on 2026-11-09 (communities 75aceea1… and 6c126096…, app 2026.11.3363, rented DigitalOcean syd1). Retry fails identically. ## Root cause `RemoteConfigRepo.Mutate` = ensureStore → pull → apply(mirrorDir) → push. `pull` runs `tar -c --exclude=./.git -C <box> .` and hands the bytes to `untarInto(mirrorDir, …)`. A freshly `git init`ed box holds nothing but `.git`, so the archive is the bare root entry `./`. `extractTar` deliberately skips that entry and creates directories only as parents of real entries — so **nothing ever creates `mirrorDir`**. `SeedCommunity`'s apply then does `os.WriteFile(mirror/flake.nix)` and dies on ENOENT. Any box tree with at least one file would have created the mirror as a side effect, which is why only the *first* seed of a *fresh* rental fails. The re-rent test (`seedcommunity_rerent_test.go`) starts from `t.TempDir()`, an existing mirror, so it could not see this. ## Fix `internal/clan/mirror.go` `untarInto`: `os.MkdirAll(dir, 0o755)` after clearing and before `extractTar`. Idempotent. Test: `TestUntarInto_CreatesTheMirrorForAnEmptyBox` in `mirror_test.go` (archive with only `./`, mirror path that does not exist, then a write into it must succeed). Whole `internal/clan` suite green. ## Secondary The failure surfaced as a raw Go error chain under a Retry that can never succeed. The seed leg should name a missing mirror as its own fault (ADR 0100/0125), the way the nix-missing case is routed to the prepare-this-machine block. **Fix:** lands as `session/rented-seed-mirror` on main with GOTCHAS #412. Then the operator app must be rebuilt at that revision (the feed pin is exact, GOTCHAS #410 / #1769).
ben self-assigned this 2026-11-10 07:04:13 +00:00
Author
Owner

Fix landed on main as f780f625 (branch session/rented-seed-mirror, GOTCHAS #412, STATUS line). internal/ is in the fleet-software set, so the release rail should cut 2026.11.3425 at f780f625 on its next tick. The operator app is being hand-built at the same revision (pnpm package, payload reused from the installed 3363) so the helper's stamp matches the feed's newest release (#1769 exact pin). Will close once a fresh rented founding on tech.tuia.co gets past the seed and supply rows on that build.

Fix landed on `main` as f780f625 (branch `session/rented-seed-mirror`, GOTCHAS #412, STATUS line). `internal/` is in the fleet-software set, so the release rail should cut **2026.11.3425** at f780f625 on its next tick. The operator app is being hand-built at the same revision (`pnpm package`, payload reused from the installed 3363) so the helper's stamp matches the feed's newest release (#1769 exact pin). Will close once a fresh rented founding on tech.tuia.co gets past the seed and supply rows on that build.

This was generated by AI during triage.

Triage: bug + ready-for-human

Category — bug: a true positive that blocks every fresh rented founding at the seed row (reproduced twice 2026-11-09).

Why not ready-for-agent: there is no agent/code work left. The fix already landed on main as f780f625 (internal/clan/mirror.go untarInto now MkdirAlls the mirror before extractTar; TestUntarInto_CreatesTheMirrorForAnEmptyBox guards it). The secondary "name the missing mirror as its own fault" ask (ADR 0100/0125 routing) is the only code residue; if you want that split out as its own agent ticket, say so and it can be filed — it does not block closing this one.

Why not an auto-close rail (deploy-pending / snapshot-pending): the fix lives in internal/, which scripts/lib/rehearsal-deploy-pending-lib.sh explicitly excludes from both the broker publish set and the gateway-snapshot bake set — "internal/: those are carried by the drive itself … a ticket fixed there is proven by the next drive, not by a snapshot." So no rail closes this; it is proven by a live founding.

Why human

The residue is a live rented founding verification that only Ben can run:

  • it needs the operator app GUI rebuilt at f780f625 (hand-built, per the issue comment — no headless agent can click the founding walk),
  • against Ben's real domain tech.tuia.co, and
  • it rents a real DigitalOcean droplet (non-routine spend).

Close once a fresh rented founding on that build gets past the seed and supply rows, exactly as the issue comment states. (Note #2184 — the address/verify-before-IP bug seen on the same walk — is triaged separately and may surface before the seed row on the next attempt.)

> *This was generated by AI during triage.* ## Triage: `bug` + `ready-for-human` **Category — `bug`:** a true positive that blocks every fresh rented founding at the seed row (reproduced twice 2026-11-09). **Why not `ready-for-agent`:** there is no agent/code work left. The fix already landed on `main` as `f780f625` (`internal/clan/mirror.go` `untarInto` now `MkdirAll`s the mirror before `extractTar`; `TestUntarInto_CreatesTheMirrorForAnEmptyBox` guards it). The secondary "name the missing mirror as its own fault" ask (ADR 0100/0125 routing) is the only code residue; if you want that split out as its own agent ticket, say so and it can be filed — it does not block closing this one. **Why not an auto-close rail (`deploy-pending` / `snapshot-pending`):** the fix lives in `internal/`, which `scripts/lib/rehearsal-deploy-pending-lib.sh` explicitly excludes from both the broker publish set and the gateway-snapshot bake set — "internal/: those are carried by the drive itself … a ticket fixed there is proven by the next drive, not by a snapshot." So no rail closes this; it is proven by a live founding. ## Why human The residue is a **live rented founding verification** that only Ben can run: - it needs the operator **app GUI** rebuilt at `f780f625` (hand-built, per the issue comment — no headless agent can click the founding walk), - against **Ben's real domain** `tech.tuia.co`, and - it rents a **real DigitalOcean droplet** (non-routine spend). Close once a fresh rented founding on that build gets past the seed and supply rows, exactly as the issue comment states. (Note #2184 — the address/verify-before-IP bug seen on the same walk — is triaged separately and may surface before the seed row on the next attempt.)
Author
Owner

The rail cut 2026.11.3425 at f780f625 (feed testing now names it, roles agent/control-panel/control-plane/idss-idp). Operator app hand-built at the same revision on Ben's laptop: idss_2026.11.3425_amd64.deb (sha256 50ec4dca…), helper stamped Release=f780f625 ReleaseVersion=2026.11.3425, payload reused from the installed 3363 (private-path carriage is still 3363's; the rented path fetches from the feed, so that is fine for this walk).

Packaging on a fresh Ubuntu 24.04 laptop needed two workarounds, worth a GOTCHAS entry if anyone else hand-builds:

  1. pnpm package → fpm → tar -I app-builder → app-builder shells out to 7za from SZA_PATH. electron-builder points SZA_PATH at 7zip-bin's bundled 7za (p7zip 16.02, 2016). That binary dies ~8 s into the 5 GB stream with Break signaled / exit 255, and fpm only reports tar failed (exit code 2) with no stderr. Cause not pinned down (no OOM in the kernel log, works by hand outside fpm).
  2. Workaround that produced the build: shim that 7za path so a streaming a -si -so -txz call execs system xz -T0 -3 -c; restore the binary after. Everything else (verify-payload, helper stamp, electron-builder) ran unchanged.

Also: the disk was at 99 % before the first attempt (same tar failed symptom); freed ~10 GB first.

Closing once the founding on tech.tuia.co passes seed + supply on this build.

The rail cut **2026.11.3425** at f780f625 (feed `testing` now names it, roles agent/control-panel/control-plane/idss-idp). Operator app hand-built at the same revision on Ben's laptop: `idss_2026.11.3425_amd64.deb` (sha256 `50ec4dca…`), helper stamped `Release=f780f625 ReleaseVersion=2026.11.3425`, payload reused from the installed 3363 (private-path carriage is still 3363's; the rented path fetches from the feed, so that is fine for this walk). **Packaging on a fresh Ubuntu 24.04 laptop needed two workarounds, worth a GOTCHAS entry if anyone else hand-builds:** 1. `pnpm package` → fpm → `tar -I app-builder` → app-builder shells out to `7za` from `SZA_PATH`. electron-builder points `SZA_PATH` at `7zip-bin`'s bundled `7za` (p7zip 16.02, 2016). That binary dies ~8 s into the 5 GB stream with `Break signaled` / exit 255, and fpm only reports `tar failed (exit code 2)` with no stderr. Cause not pinned down (no OOM in the kernel log, works by hand outside fpm). 2. Workaround that produced the build: shim that `7za` path so a streaming `a -si -so -txz` call execs system `xz -T0 -3 -c`; restore the binary after. Everything else (`verify-payload`, helper stamp, electron-builder) ran unchanged. Also: the disk was at 99 % before the first attempt (same `tar failed` symptom); freed ~10 GB first. Closing once the founding on tech.tuia.co passes seed + supply on this build.
Author
Owner

Verified on a real box: app 2026.11.3425 (f780f625) relaunched 2026-11-10 11:01, Resume on tu-ia — seed passed (flake seeded 11:01:46 through logo landed 11:06:33) and supply passed (fleet software seeded onto the rented server 11:14:33, feed pin matched). The founding then faulted one stage later at enroll-configure on an unrelated cause, filed as #2185. Closing this one.

Verified on a real box: app 2026.11.3425 (f780f625) relaunched 2026-11-10 11:01, Resume on tu-ia — seed passed (`flake seeded` 11:01:46 through `logo landed` 11:06:33) and supply passed (`fleet software seeded onto the rented server` 11:14:33, feed pin matched). The founding then faulted one stage later at enroll-configure on an unrelated cause, filed as #2185. Closing this one.
ben closed this issue 2026-11-10 16:24:22 +00:00
Sign in to join this conversation.
No milestone
No project
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
Matou/idss#2183
No description provided.