fleetwire: grow the host seam — loopback byte-identical, remote gets accept-new + pinned known-hosts (own-VPS T1) #382

Closed
opened 2026-08-10 02:26:16 +00:00 by ben · 2 comments
Owner

Slice T1 of docs/superpowers/specs/2026-08-10-own-vps-carrier-design.md (ADR 0152; #368's design-independent
prerequisite, held back by the swarm's own #368 triage until the shape was
ruled — it now is).

internal/fleetwire's root@127.0.0.1:<port> constant (fleetwire.go:60,
fleet.go scp/push URLs, supply.go, enrolment.go) becomes a target parameter.

  • Loopback keeps today's exact posture byte-for-byte — the private path
    must not notice (the smoke-script target seam's invariant discipline;
    StrictHostKeyChecking=no stays justified there by locality, its own
    comment fleetwire.go:44-56).
  • A remote target (root@<host>[:port]) gets accept-new on first
    contact and a pinned known-hosts file in the community's state dir
    thereafter — the loopback justification does not survive a public box.
  • Helper wiring (app/helper/cmd/helper/wiring_prod.go:332-370) keeps
    passing the loopback target for the private path; the own-VPS carrier (T2)
    passes the remote one.

Acceptance:

  • Given the private path's wiring, when fleetwire runs, then every ssh/scp
    invocation is byte-identical to today (seam tests pin the argv)
  • Given a remote target, when fleetwire first contacts it, then the host
    key is accepted-new and pinned in the state dir; a CHANGED key on a
    later contact refuses loudly
  • Seam tests cover both postures
Slice T1 of `docs/superpowers/specs/2026-08-10-own-vps-carrier-design.md` (ADR 0152; #368's design-independent prerequisite, held back by the swarm's own #368 triage until the shape was ruled — it now is). `internal/fleetwire`'s `root@127.0.0.1:<port>` constant (fleetwire.go:60, fleet.go scp/push URLs, supply.go, enrolment.go) becomes a target parameter. - **Loopback keeps today's exact posture byte-for-byte** — the private path must not notice (the smoke-script target seam's invariant discipline; `StrictHostKeyChecking=no` stays justified there by locality, its own comment fleetwire.go:44-56). - **A remote target** (`root@<host>[:port]`) gets `accept-new` on first contact and a **pinned known-hosts file in the community's state dir** thereafter — the loopback justification does not survive a public box. - Helper wiring (`app/helper/cmd/helper/wiring_prod.go:332-370`) keeps passing the loopback target for the private path; the own-VPS carrier (T2) passes the remote one. Acceptance: - [ ] Given the private path's wiring, when fleetwire runs, then every ssh/scp invocation is byte-identical to today (seam tests pin the argv) - [ ] Given a remote target, when fleetwire first contacts it, then the host key is accepted-new and pinned in the state dir; a CHANGED key on a later contact refuses loudly - [ ] Seam tests cover both postures
Author
Owner

Work complete and verified locally, but blocked on the shared push gate — not on this slice.

The T1 implementation is done, tested, and committed locally (b526801 on the worker branch):

  • internal/fleetwire's hardcoded root@127.0.0.1 constant is now a Target value — LoopbackTarget() / RemoteTarget(host, knownHosts) — threaded through every adapter (Fleet, Supply, Enrolment, ChallengeSource) via shared sshOpts/sshArgs/userAt methods.
  • Loopback stays byte-identical (StrictHostKeyChecking=no + UserKnownHostsFile=/dev/null, locality-justified per ADR 0126); every constructor defaults an unset target to loopback so the existing seam tests stand as byte-identical regression guards. Helper wiring passes an explicit LoopbackTarget().
  • Remote target (ADR 0152) uses StrictHostKeyChecking=accept-new against a pinned known-hosts file in the community state dir — key learned+pinned on first contact, a CHANGED key later refuses loudly; the no-pinning options are deliberately absent (mirrors the smoke-clan target seam's remote posture).
  • Seam tests cover both postures (target_test.go + supply_test.go); go test ./internal/fleetwire/... is green, go build ./... clean.

All three acceptance clauses are satisfied at the seam.

Why blocked: the server-side pre-receive push gate (go test ./...) is currently RED on an unrelated test, internal/vm's TestAssemblePayload_ProducesResolvableLayout. It runs scripts/assemble-payload.sh → cd dashboard && pnpm build, and pnpm 11's verify-deps-before-run auto-triggers a pnpm install that aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY ("Aborted removal of modules directory due to no TTY"). This reproduces locally on a Go-only change and has nothing to do with fleetwire — no recent package.json/pnpm-lock change caused it; it is a pnpm/environment drift on the build machines. It blocks every swarm push right now, not just this one.

To re-arm: fix the payload-assembly build gate so pnpm does not attempt an interactive modules purge under the test harness — e.g. run assemble-payload's pnpm build with CI=true, or set confirm-modules-purge=false / verify-deps-before-run=false in the workspace pnpm config, or re-seed the build machines' node_modules against the current pnpm 11.6.0. Once the gate is green, re-run this slice (the change is small and fully specified above) or cherry-pick b526801, then re-add ready-for-agent.

**Work complete and verified locally, but blocked on the shared push gate — not on this slice.** The T1 implementation is done, tested, and committed locally (`b526801` on the worker branch): - `internal/fleetwire`'s hardcoded `root@127.0.0.1` constant is now a `Target` value — `LoopbackTarget()` / `RemoteTarget(host, knownHosts)` — threaded through every adapter (Fleet, Supply, Enrolment, ChallengeSource) via shared `sshOpts`/`sshArgs`/`userAt` methods. - **Loopback stays byte-identical** (`StrictHostKeyChecking=no` + `UserKnownHostsFile=/dev/null`, locality-justified per ADR 0126); every constructor defaults an unset target to loopback so the existing seam tests stand as byte-identical regression guards. Helper wiring passes an explicit `LoopbackTarget()`. - **Remote target** (ADR 0152) uses `StrictHostKeyChecking=accept-new` against a **pinned known-hosts file in the community state dir** — key learned+pinned on first contact, a CHANGED key later refuses loudly; the no-pinning options are deliberately absent (mirrors the smoke-clan target seam's remote posture). - Seam tests cover **both postures** (`target_test.go` + `supply_test.go`); `go test ./internal/fleetwire/...` is green, `go build ./...` clean. All three acceptance clauses are satisfied at the seam. **Why blocked:** the server-side pre-receive push gate (`go test ./...`) is currently RED on an **unrelated** test, `internal/vm`'s `TestAssemblePayload_ProducesResolvableLayout`. It runs `scripts/assemble-payload.sh` → `cd dashboard && pnpm build`, and pnpm 11's `verify-deps-before-run` auto-triggers a `pnpm install` that aborts with `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY` ("Aborted removal of modules directory due to no TTY"). This reproduces locally on a Go-only change and has nothing to do with fleetwire — no recent package.json/pnpm-lock change caused it; it is a pnpm/environment drift on the build machines. It blocks **every** swarm push right now, not just this one. **To re-arm:** fix the payload-assembly build gate so pnpm does not attempt an interactive modules purge under the test harness — e.g. run assemble-payload's `pnpm build` with `CI=true`, or set `confirm-modules-purge=false` / `verify-deps-before-run=false` in the workspace pnpm config, or re-seed the build machines' `node_modules` against the current pnpm 11.6.0. Once the gate is green, re-run this slice (the change is small and fully specified above) or cherry-pick `b526801`, then re-add `ready-for-agent`.
Author
Owner

Closing — the work landed. The blocked push went through after all: b526801 ("fleetwire grows a host Target…") is on origin/main, with the swarm's later pushes (57ac469, f408bf9, f48233c) stacked on top of it. All three acceptance clauses were verified at the seam before commit (both-posture seam tests, loopback byte-identity pinned, go test ./internal/fleetwire/... green).

The pre-receive gate red that parked this slice (pnpm 11's ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY inside internal/vm's payload test) cleared environmentally within the hour, but nothing repo-side prevents a recurrence — that hardening is now #389.

Dropping agent-blocked; nothing left for this slice. T2 (the own-VPS carrier passing the remote target) proceeds against the landed seam.

**Closing — the work landed.** The blocked push went through after all: `b526801` ("fleetwire grows a host Target…") is on origin/main, with the swarm's later pushes (`57ac469`, `f408bf9`, `f48233c`) stacked on top of it. All three acceptance clauses were verified at the seam before commit (both-posture seam tests, loopback byte-identity pinned, `go test ./internal/fleetwire/...` green). The pre-receive gate red that parked this slice (pnpm 11's `ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY` inside `internal/vm`'s payload test) cleared environmentally within the hour, but nothing repo-side prevents a recurrence — that hardening is now **#389**. Dropping `agent-blocked`; nothing left for this slice. T2 (the own-VPS carrier passing the remote target) proceeds against the landed seam.
ben 2026-08-10 05:14:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#382
No description provided.