standing: rented-gateway SSH refused (publickey) — harness dial carries no identity #886

Closed
opened 2026-08-27 03:51:58 +00:00 by matou-build-agent · 1 comment

Not the known frontier

This drive did not reach the own-VPS carrier/pairing frontier. artifacts/legs.json records zero skips and names no skip reason at all; artifacts/verdict.json says "legs": {"total": 5, "green": 3, "red": 2, "skip": 0} with "firstRedLeg": "standing". The pairing rows (connect/point-row/seed/supply/configure/pair, journey.device.spec.ts:399-408) never executed. This is a new red, upstream of the known frontier — an SSH authentication refusal.

The failure

Both red legs carry the identical error:

idss-agent is not active on the rented box: systemctl is-active reported ""
(Warning: Permanently added '168.144.170.129' (ED25519) to the list of known hosts.
 root@168.144.170.129: Permission denied (publickey,keyboard-interactive).)

The message blames idss-agent; the parenthetical is the real answer. systemctl never ran — the SSH session was refused at the auth stage.

One fault, recorded twice. standing (ms: 159496) and image-boot (ms: 120373) report the same string because runRentedPrefix executes the image-boot check inside the standing leg. There is no second defect here.

Evidence

The box was genuinely rented, up, and reachable — only auth failed.

  • artifacts/legs.json: wizard-rent green (ms: 37356), claim green (ms: 312), create green (ms: 235). The rent succeeded.
  • artifacts/droplet-ip.txt → 168.144.170.129; logs/founding-state.log confirms the draft landed it: "access": {"kind": "rented", "summary": "Rented gateway — DigitalOcean · syd1 · free while alpha · 168.144.170.129"}.
  • Permanently added '168.144.170.129' (ED25519) to the list of known hosts — the TCP connect and the host-key exchange both succeeded. sshd was listening and answered. This rules out a boot/network race.
  • Permission denied (publickey,keyboard-interactive) — failure is at client authentication, after the transport was up.

Not transient. image-boot spent ms: 120373 — the full 2-minute waitForSSHCommand budget (journey.device.spec.ts:354-361: 2 * 60_000, 10 s per attempt, 5 s apart). Every attempt across two minutes was refused identically. A boot race resolves; this did not.

The app itself was healthy and mid-work. artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md snapshots a live, progressing UI at the moment of the throw:

- generic [ref=f1e30]: Copy the system onto the gateway
- generic [ref=f1e31]: 54%
- generic [ref=f1e32]: 178 of 726 store paths · copying path '/nix/store/7bmmxzgix0q2v5drcbi6lvly4srzcvc6-which-2.23-man' from 'https://cache.nixos.org'...

The product was 54% through copying the closure. Nothing in the app faulted — artifacts/journey.json is {"rows": null, "fault": null}. The harness's own out-of-band SSH probe is what red'd.

Suspected layer: harness (app/tests/e2e/)

The run's healer agent (logs/healer-claude.out, run with repo access from /home/swarm/rehearsal-heal/idss) traced it to a specific defect. I could not re-verify these repo-level file/line claims — this diagnosing session's shell is sandboxed to the run directory and cannot read the source tree. Reproduced with that attribution:

app/tests/e2e/fixtures/droplet.ts:28-41 builds the dial: StrictHostKeyChecking=accept-new, UserKnownHostsFile=<knownHostsFile()>, BatchMode=yes, root@${ip} — and no -i. With no identity named, ssh offers the executor's ambient ~/.ssh/id_ed25519.

The rented box trusts exactly one key: broker/internal/broker/provider_do.go:144-155 registers req.SSHPubKey and passes its single fingerprint. That is the app's own rent-operator identity, minted this run at 03:40Z — a different key from the ambient one.

Why it used to pass: d49ece2b (#744, 2026-08-25 22:06Z) stopped the golden snapshot shipping the build box's /root/.ssh/authorized_keys, which had carried Matou's entire DO account key set — including the executor's ambient key. Last green image-boot was drive-rented/20260825T011451Z (11.7 s) at 2026-08-25 01:14Z — before that commit. This is the first drive on a post-#744 snapshot.

That story is fully consistent with everything I can verify in the run directory: auth-stage refusal, host key fine, full budget exhausted, app unfaulted, product carrier still working. #744 did what it set out to do and uncovered a latent harness bug rather than causing one.

No product code is implicated: the app's own carrier reached 54% of a closure copy over its own connection while the harness was being refused.

What plugging it needs

  1. Thread an explicit identity into the harness's rented-gateway dials. Add an optional identityFile to sshDroplet / waitForSSHCommand / sshDropletInteractive in app/tests/e2e/fixtures/droplet.ts, emitting -i <path> only when set — mirroring the existing knownHostsFile() argv seam. Pass the app's rent-operator key (join(live.stateDir, 'rent-operator', 'id_ed25519')).
  2. Per-dial, not blanket. Per the healer, five sites target the rented gateway and need the new identity (rentedPrefix.ts:354, :368, :379, :448; journey.rented.spec.ts:314). Every sshDroplet call in journey.device.spec.ts targets deviceIp() — the member droplet — and journey.selfhosted.spec.ts / journey.droplet.spec.ts dial ambiently by design (ADR 0152/0154). A blanket env-wide -i would break those.
  3. Fail loud, never fall back. If the rent-operator key is missing at a gateway dial, red naming that reason. The silent fallback to an ambient key is exactly what let this hide for two days and cost a paid droplet.
  4. Seam test. app/tests/e2e/fixtures/droplet.test.ts already asserts argv shape for the known-hosts thread; add the mirror cases (-i present with the given path, absent when unset) for all three dial functions. Note this proves argv only — real proof costs another droplet.
  5. Make the error name the right thing. journey.device.spec.ts:363 throws idss-agent is not active for what is an SSH auth refusal. The probe should distinguish "could not authenticate" from "authenticated, agent inactive" — this misattribution is why the red reads as an image defect.
  6. docs/GOTCHAS.md entry. The generalisable rule: a harness dial with no explicit identity is riding trust nobody declared, and stays green until someone correctly removes that trust. Same family as GOTCHAS #100 (a keypair's two halves are one artifact).

What is absent from this run directory

  • No live box was offered. No live-box access section was appended to this diagnosis prompt, so the droplet could not be interrogated for what only a live machine can answer (which unit failed, what is listening, the health probe's real error). Diagnosed from harvested logs alone. Given the fault is an SSH refusal, a shell on the box would likely have been refused anyway.
  • logs/droplet-journal.txt does not exist. The drive never authenticated, so it could not harvest the droplet's journal. Its absence is a consequence of this red, not separate evidence.
  • logs/broker-journal.txt harvested nothing — dev@100.98.48.68: Permission denied (publickey). Its own note says this is by design: "a drive on an off-mesh host harvests nothing by design and the drive's verdict does not depend on it (#681)". Unrelated to the red.
  • The guest-*.log files are all empty misses (no SSH hostfwd ... the guest was never created, cat: .../idss-guest.service: No such file or directory, -- No entries --). Correct — this is the rented-VPS path, not the local qemu-guest path (artifacts/host.json: "qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT").
  • logs/state-logs.log reports ENOENT ... 'test-results/standing-rented/state/logs', and this run dir's own state/ is empty. The healer flags a related harness path bug worth fixing in the same pass: the helper reads $run_dir/state/rent-operator/id_ed25519, but the device drive's app state dir is standingDir()/state, not $run_dir/state.
  • logs/helper.log is zero bytes.

drive 20260827T033903Z red at image-boot: idss-agent is not active on the rented box: systemctl is-active reported "" (Warning: Permanently added '168.144.170.129' (ED25519) to the list of known hosts. root@168.144.170.129: Permission denied
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260827T033903Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Not the known frontier This drive did **not** reach the own-VPS carrier/pairing frontier. `artifacts/legs.json` records **zero skips** and names no skip reason at all; `artifacts/verdict.json` says `"legs": {"total": 5, "green": 3, "red": 2, "skip": 0}` with `"firstRedLeg": "standing"`. The pairing rows (`connect`/`point-row`/`seed`/`supply`/`configure`/`pair`, `journey.device.spec.ts:399-408`) never executed. This is a **new red, upstream of the known frontier** — an SSH authentication refusal. ## The failure Both red legs carry the identical error: ``` idss-agent is not active on the rented box: systemctl is-active reported "" (Warning: Permanently added '168.144.170.129' (ED25519) to the list of known hosts. root@168.144.170.129: Permission denied (publickey,keyboard-interactive).) ``` The message blames `idss-agent`; the parenthetical is the real answer. `systemctl` never ran — the SSH session was refused at the auth stage. **One fault, recorded twice.** `standing` (`ms: 159496`) and `image-boot` (`ms: 120373`) report the same string because `runRentedPrefix` executes the image-boot check inside the `standing` leg. There is no second defect here. ## Evidence **The box was genuinely rented, up, and reachable — only auth failed.** - `artifacts/legs.json`: `wizard-rent` green (`ms: 37356`), `claim` green (`ms: 312`), `create` green (`ms: 235`). The rent succeeded. - `artifacts/droplet-ip.txt` → `168.144.170.129`; `logs/founding-state.log` confirms the draft landed it: `"access": {"kind": "rented", "summary": "Rented gateway — DigitalOcean · syd1 · free while alpha · 168.144.170.129"}`. - `Permanently added '168.144.170.129' (ED25519) to the list of known hosts` — the TCP connect and the **host-key exchange both succeeded**. sshd was listening and answered. This rules out a boot/network race. - `Permission denied (publickey,keyboard-interactive)` — failure is at *client authentication*, after the transport was up. **Not transient.** `image-boot` spent `ms: 120373` — the full 2-minute `waitForSSHCommand` budget (`journey.device.spec.ts:354-361`: `2 * 60_000`, 10 s per attempt, 5 s apart). Every attempt across two minutes was refused identically. A boot race resolves; this did not. **The app itself was healthy and mid-work.** `artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md` snapshots a live, progressing UI at the moment of the throw: ```yaml - generic [ref=f1e30]: Copy the system onto the gateway - generic [ref=f1e31]: 54% - generic [ref=f1e32]: 178 of 726 store paths · copying path '/nix/store/7bmmxzgix0q2v5drcbi6lvly4srzcvc6-which-2.23-man' from 'https://cache.nixos.org'... ``` The product was 54% through copying the closure. Nothing in the app faulted — `artifacts/journey.json` is `{"rows": null, "fault": null}`. The harness's own out-of-band SSH probe is what red'd. ## Suspected layer: **harness** (`app/tests/e2e/`) The run's healer agent (`logs/healer-claude.out`, run with repo access from `/home/swarm/rehearsal-heal/idss`) traced it to a specific defect. **I could not re-verify these repo-level file/line claims — this diagnosing session's shell is sandboxed to the run directory and cannot read the source tree.** Reproduced with that attribution: > `app/tests/e2e/fixtures/droplet.ts:28-41` builds the dial: `StrictHostKeyChecking=accept-new`, `UserKnownHostsFile=<knownHostsFile()>`, `BatchMode=yes`, `root@${ip}` — and **no `-i`**. With no identity named, ssh offers the executor's ambient `~/.ssh/id_ed25519`. > > The rented box trusts exactly one key: `broker/internal/broker/provider_do.go:144-155` registers `req.SSHPubKey` and passes its single fingerprint. That is the app's own rent-operator identity, minted this run at 03:40Z — a **different key** from the ambient one. > > Why it used to pass: `d49ece2b` (#744, 2026-08-25 22:06Z) stopped the golden snapshot shipping the build box's `/root/.ssh/authorized_keys`, which had carried Matou's entire DO account key set — including the executor's ambient key. Last green `image-boot` was `drive-rented/20260825T011451Z` (11.7 s) at 2026-08-25 01:14Z — **before** that commit. This is the first drive on a post-#744 snapshot. That story is fully consistent with everything I *can* verify in the run directory: auth-stage refusal, host key fine, full budget exhausted, app unfaulted, product carrier still working. #744 did what it set out to do and uncovered a latent harness bug rather than causing one. No product code is implicated: the app's own carrier reached 54% of a closure copy over its own connection while the harness was being refused. ## What plugging it needs 1. **Thread an explicit identity into the harness's rented-gateway dials.** Add an optional `identityFile` to `sshDroplet` / `waitForSSHCommand` / `sshDropletInteractive` in `app/tests/e2e/fixtures/droplet.ts`, emitting `-i <path>` only when set — mirroring the existing `knownHostsFile()` argv seam. Pass the app's rent-operator key (`join(live.stateDir, 'rent-operator', 'id_ed25519')`). 2. **Per-dial, not blanket.** Per the healer, five sites target the *rented gateway* and need the new identity (`rentedPrefix.ts:354, :368, :379, :448`; `journey.rented.spec.ts:314`). Every `sshDroplet` call in `journey.device.spec.ts` targets `deviceIp()` — the member droplet — and `journey.selfhosted.spec.ts` / `journey.droplet.spec.ts` dial ambiently by design (ADR 0152/0154). A blanket env-wide `-i` would break those. 3. **Fail loud, never fall back.** If the rent-operator key is missing at a gateway dial, red naming that reason. The silent fallback to an ambient key is exactly what let this hide for two days and cost a paid droplet. 4. **Seam test.** `app/tests/e2e/fixtures/droplet.test.ts` already asserts argv shape for the known-hosts thread; add the mirror cases (`-i` present with the given path, absent when unset) for all three dial functions. Note this proves argv only — real proof costs another droplet. 5. **Make the error name the right thing.** `journey.device.spec.ts:363` throws `idss-agent is not active` for what is an SSH auth refusal. The probe should distinguish "could not authenticate" from "authenticated, agent inactive" — this misattribution is why the red reads as an image defect. 6. **`docs/GOTCHAS.md` entry.** The generalisable rule: a harness dial with no explicit identity is riding trust nobody declared, and stays green until someone correctly removes that trust. Same family as GOTCHAS #100 (a keypair's two halves are one artifact). ## What is absent from this run directory - **No live box was offered.** No live-box access section was appended to this diagnosis prompt, so the droplet could not be interrogated for what only a live machine can answer (which unit failed, what is listening, the health probe's real error). Diagnosed from harvested logs alone. Given the fault *is* an SSH refusal, a shell on the box would likely have been refused anyway. - **`logs/droplet-journal.txt` does not exist.** The drive never authenticated, so it could not harvest the droplet's journal. Its absence is a *consequence* of this red, not separate evidence. - **`logs/broker-journal.txt` harvested nothing** — `dev@100.98.48.68: Permission denied (publickey).` Its own note says this is by design: "a drive on an off-mesh host harvests nothing by design and the drive's verdict does not depend on it (#681)". Unrelated to the red. - **The `guest-*.log` files are all empty misses** (`no SSH hostfwd ... the guest was never created`, `cat: .../idss-guest.service: No such file or directory`, `-- No entries --`). Correct — this is the rented-VPS path, not the local qemu-guest path (`artifacts/host.json`: `"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"`). - **`logs/state-logs.log`** reports `ENOENT ... 'test-results/standing-rented/state/logs'`, and this run dir's own `state/` is empty. The healer flags a related harness path bug worth fixing in the same pass: the helper reads `$run_dir/state/rent-operator/id_ed25519`, but the device drive's app state dir is `standingDir()/state`, not `$run_dir/state`. - **`logs/helper.log` is zero bytes.** drive `20260827T033903Z` red at `image-boot`: `idss-agent is not active on the rented box: systemctl is-active reported "" (Warning: Permanently added '168.144.170.129' (ED25519) to the list of known hosts. root@168.144.170.129: Permission denied ` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260827T033903Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: a25a6c0aae50 -->
Owner

Ruled by agent under ADR 0174 (the watch's hands) — veto anytime: closing as a duplicate of #885, in #885's favour.

Both tickets were filed by the reporter for the SAME fault on the same drive (20260827T033903Z): the rented-gateway SSH dial is refused publickey, and the idss-agent is not active wording is the harness misattributing an authentication refusal to the agent. The two red legs (standing, image-boot) are one fault recorded twice, because runRentedPrefix runs inside the standing leg — both tickets say so independently.

#885 is the keeper: it carries the same evidence AND names the cause — #744's authorized_keys scrub removed the ambient trust the harness dials had been silently riding. It is already claimed (agent-working). This ticket's distinct contribution — the proof that the drive did not reach the known own-VPS frontier (zero skips, no skip reason, firstRedLeg: standing, and the pairing rows at journey.device.spec.ts:399-408 never executing) — is worth keeping, so it is restated here for the record rather than lost: this is a new red upstream of the frontier, not the frontier resting.

#854 stays blocked on #885 alone.

**Ruled by agent under ADR 0174 (the watch's hands) — veto anytime: closing as a duplicate of #885, in #885's favour.** Both tickets were filed by the reporter for the SAME fault on the same drive (`20260827T033903Z`): the rented-gateway SSH dial is refused `publickey`, and the `idss-agent is not active` wording is the harness misattributing an authentication refusal to the agent. The two red legs (`standing`, `image-boot`) are one fault recorded twice, because `runRentedPrefix` runs inside the `standing` leg — both tickets say so independently. #885 is the keeper: it carries the same evidence AND names the cause — #744's `authorized_keys` scrub removed the ambient trust the harness dials had been silently riding. It is already claimed (`agent-working`). This ticket's distinct contribution — the proof that the drive did **not** reach the known own-VPS frontier (zero skips, no skip reason, `firstRedLeg: standing`, and the pairing rows at `journey.device.spec.ts:399-408` never executing) — is worth keeping, so it is restated here for the record rather than lost: **this is a new red upstream of the frontier, not the frontier resting.** #854 stays blocked on #885 alone.
ben closed this issue 2026-08-27 03:55:42 +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#886
No description provided.