image-boot: a timed-out SSH dial escapes waitForSSHCommand's retry loop on attempt one #930

Closed
opened 2026-08-28 06:52:55 +00:00 by matou-build-agent · 3 comments

No live box was offered

No live-box section was appended to this task, so there is no access line and no read-only limit to obey — I dialed nothing. Everything below is read from the harvested run directory alone. Both droplets are recorded active at harvest time, so the boxes were very likely still up; I did not ask them.

This is not the KNOWN frontier

The pairing/own-VPS-carrier frontier is not what red this run, and this drive's own records name no skip reason at all — there are no skips to name one:

artifacts/verdict.json

"legs": { "total": 5, "green": 3, "red": 2, "skip": 0 }

artifacts/legs.json carries five records and not one "status": "skip". The frontier was never reached: artifacts/journey.json is

{ "rows": null, "fault": null }

— no founding rows, no fault. The drive died upstream of the pair step. This is an earlier, different red.

The failing leg is image-boot, not standing

verdict.json names "firstRedLeg": "standing", but standing is the umbrella leg for the whole spec (journey.device.spec.ts:272, "drives the #183 device-add journey on the standing rented community") and it carries the inner leg's error verbatim. The arithmetic in legs.json proves the nesting — the inner legs sum to the umbrella:

wizard-rent 36863 + claim 273 + create 214 + image-boot 10129 = 47479 ms
standing                                                      = 48734 ms

So the leg that actually broke is image-boot:

{ "leg": "image-boot", "status": "red", "ms": 10129,
  "error": "ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent" }

The app was not the thing failing. The page snapshot in error-context.md at the instant of the throw shows it mid-step, not errored:

- generic: Connect to the rented server over SSH
- generic: 2%

The defect

Playwright embedded the fixture source as it stood at drive time (error-context.md, "Test source"). waitForSSHCommand exists precisely to absorb a not-yet-reachable fresh box — its own comment cites GOTCHAS #2 and #691, "a fresh boot can still refuse the very first connection for several seconds after the rent API call returns" — but it awaits the dial with no catch:

116 |   for (;;) {
117 |     last = await sshDroplet(ip, cmd, perAttemptMs, identityFile);
118 |     if (last.stdout.trim() === want) return last;
119 |     if (Date.now() >= deadline) return last;
120 |     await new Promise((resolve) => setTimeout(resolve, pollMs));
121 |   }

The two dial outcomes are asymmetric. A refused dial reaches the close handler and resolves 255, so the loop retries it:

 89 |     child.on('close', (code) => {
 90 |       clearTimeout(timer);
 91 |       resolve({ code: code ?? -1, stdout, stderr });

A timed-out dial takes the SIGKILL path and rejects, escaping the loop. The caret in error-context.md points at exactly that line:

 81 |     const timer = setTimeout(() => {
 82 |       child.kill('SIGKILL');
> 83 |       reject(new Error(`ssh root@${ip} timed out after ${timeoutMs}ms: ${command}`));
      |              ^ Error: ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent

The leg's own clock is the proof that it never made a second attempt: 10129 ms — one 10000 ms perAttemptMs plus spawn overhead.

And a later attempt would have gotten an answer. The gateway was ~1 second old when probed (logs/gateway-do-forensics.txt):

=== droplet 595814907 ===
name:    idss-gateway-rehearsal-c-2068
created: 2026-08-28T06:36:46Z
3373056579  completed  create  2026-08-28 06:36:46 +0000 UTC  2026-08-28 06:37:20 +0000 UTC

DO finished creating at 06:37:20; image-boot ran ~06:37:21 → ~06:37:31 (verdict.json endedAt is 06:37:31.326Z) and killed its only dial. Fourteen seconds later the box answered:

=== reachability from the drive host, 2026-08-28T06:37:34Z ===
3 packets transmitted, 3 received, 0% packet loss
tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did

Corroborating that sshd came up inside that gap: the gateway evidence harvest at the same moment got an authentication refusal, not a transport one — root@134.199.165.253: Permission denied (publickey,keyboard-interactive) in gateway-journal.txt. Only a listening, running sshd emits that. The 10 s hang was the pre-sshd window (SYNs dropped, so the dial blocks rather than failing fast), and it closed seconds after the harness gave up.

Suspected layer

Harness, and only the harness — app/tests/e2e/fixtures/droplet.ts. Not product (the app was at 2% of "Connect to the rented server over SSH", still working, and founding-state.log shows a coherent draft through "step": "created"). Not infra (the gateway was created on schedule, 34 s, and answered).

What plugging it needs

  1. Confirm the in-run heal landed. logs/healer-claude.out records "action":"healed", commit 2e038b6e85d25a90060e1b267db4c76406a34ef4, teaching the loop to catch a rejected dial and retry to the budget, rethrow on a never-reachable box, and raise the #885 missing-identity refusal up front so the new catch cannot swallow it (+3 seam tests; vitest run tests/e2e/fixtures/droplet.test.ts 17 pass, and 1 fails with this drive's exact message when the fix is stashed). The drive ran at f618a6ce. I could not verify that commit is on main — the check was not permitted in this session. If it is on main, this red needs no further product or harness code; if it is not, land it.

  2. Plug the evidence gap this red exposed (independently actionable, and the healer's own filed residual). All four gateway-side captures are one line —

root@134.199.165.253: Permission denied (publickey,keyboard-interactive).
    note: gateway ... harvest failed (gateway unreachable?)

— in gateway-journal.txt, gateway-units.txt, gateway-stall.txt, gateway-caddy.txt, while the same verb against the device box harvested 133 KB of device-journal.txt plus device-stall.txt and device-units.txt. The parenthetical is falsified by the run's own forensics (tcp/22 answered a fresh connect at 06:37:34). The shell harvest in scripts/lib/rehearsal-droplet.sh dials with no -i, riding the executor's ambient key, which a broker-rented gateway can never accept — it trusts only the app's rent-operator key (#885, GOTCHAS #101; #744 scrubbed the golden snapshot's authorized_keys set that used to make the ambient fallback work by accident). Thread a per-box identity through oc_droplet_evidence, derived from OC_STANDING_DIR (never re-spelled — see healer 5c8f4c6e) and loud when the key is absent rather than silently ambient, mirroring identityArgs at droplet.ts:36-46. Without it, this red had to be inferred from timestamps instead of read off the box.

Absent from this run (explained, not defects)

  • logs/droplet-journal.txt does not exist. On a device-target drive that capture is split into the gateway-* / device-* labelled files present here.
  • state/ in the run dir is empty — the drive red before any deploy, so no clan-config flake was captured. logs/state-logs.log separately records ENOENT ... test-results/standing-rented/state/logs.
  • logs/broker-journal.txt is an off-mesh dev@100.98.48.68: Permission denied (publickey) — by design on this executor, and the verdict does not depend on it (ADR 0208, #681).
  • logs/guest-*.log and logs/qemu.log are empty by construction. artifacts/host.json shows qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT, and guest-failed-units.log says "the guest was never created, so there is nothing to ask". This drive used real droplets, not a guest VM.
  • logs/helper.log is only Electron GLX/EGL noise on a headless host — not load-bearing.

drive 20260828T063513Z red at image-boot: ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T063513Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## No live box was offered No live-box section was appended to this task, so there is no access line and no read-only limit to obey — I dialed nothing. Everything below is read from the harvested run directory alone. Both droplets are recorded `active` at harvest time, so the boxes were very likely still up; I did not ask them. ## This is not the KNOWN frontier The pairing/own-VPS-carrier frontier is **not** what red this run, and this drive's own records name no skip reason at all — there are no skips to name one: `artifacts/verdict.json` ```json "legs": { "total": 5, "green": 3, "red": 2, "skip": 0 } ``` `artifacts/legs.json` carries five records and not one `"status": "skip"`. The frontier was never reached: `artifacts/journey.json` is ```json { "rows": null, "fault": null } ``` — no founding rows, no fault. The drive died upstream of the pair step. This is an earlier, different red. ## The failing leg is image-boot, not standing `verdict.json` names `"firstRedLeg": "standing"`, but `standing` is the umbrella leg for the whole spec (`journey.device.spec.ts:272`, *"drives the #183 device-add journey on the standing rented community"*) and it carries the inner leg's error verbatim. The arithmetic in `legs.json` proves the nesting — the inner legs sum to the umbrella: ``` wizard-rent 36863 + claim 273 + create 214 + image-boot 10129 = 47479 ms standing = 48734 ms ``` So the leg that actually broke is `image-boot`: ```json { "leg": "image-boot", "status": "red", "ms": 10129, "error": "ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent" } ``` The app was not the thing failing. The page snapshot in `error-context.md` at the instant of the throw shows it mid-step, not errored: ``` - generic: Connect to the rented server over SSH - generic: 2% ``` ## The defect Playwright embedded the fixture source as it stood at drive time (`error-context.md`, "Test source"). `waitForSSHCommand` exists precisely to absorb a not-yet-reachable fresh box — its own comment cites GOTCHAS #2 and #691, *"a fresh boot can still refuse the very first connection for several seconds after the rent API call returns"* — but it awaits the dial with no catch: ```ts 116 | for (;;) { 117 | last = await sshDroplet(ip, cmd, perAttemptMs, identityFile); 118 | if (last.stdout.trim() === want) return last; 119 | if (Date.now() >= deadline) return last; 120 | await new Promise((resolve) => setTimeout(resolve, pollMs)); 121 | } ``` The two dial outcomes are asymmetric. A *refused* dial reaches the close handler and **resolves** 255, so the loop retries it: ```ts 89 | child.on('close', (code) => { 90 | clearTimeout(timer); 91 | resolve({ code: code ?? -1, stdout, stderr }); ``` A *timed-out* dial takes the SIGKILL path and **rejects**, escaping the loop. The caret in `error-context.md` points at exactly that line: ```ts 81 | const timer = setTimeout(() => { 82 | child.kill('SIGKILL'); > 83 | reject(new Error(`ssh root@${ip} timed out after ${timeoutMs}ms: ${command}`)); | ^ Error: ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent ``` The leg's own clock is the proof that it never made a second attempt: **10129 ms — one 10000 ms `perAttemptMs` plus spawn overhead**. And a later attempt would have gotten an answer. The gateway was ~1 second old when probed (`logs/gateway-do-forensics.txt`): ``` === droplet 595814907 === name: idss-gateway-rehearsal-c-2068 created: 2026-08-28T06:36:46Z 3373056579 completed create 2026-08-28 06:36:46 +0000 UTC 2026-08-28 06:37:20 +0000 UTC ``` DO finished creating at 06:37:20; `image-boot` ran ~06:37:21 → ~06:37:31 (`verdict.json` `endedAt` is `06:37:31.326Z`) and killed its only dial. Fourteen seconds later the box answered: ``` === reachability from the drive host, 2026-08-28T06:37:34Z === 3 packets transmitted, 3 received, 0% packet loss tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did ``` Corroborating that sshd came up inside that gap: the gateway evidence harvest at the same moment got an **authentication** refusal, not a transport one — `root@134.199.165.253: Permission denied (publickey,keyboard-interactive)` in `gateway-journal.txt`. Only a listening, running sshd emits that. The 10 s hang was the pre-sshd window (SYNs dropped, so the dial blocks rather than failing fast), and it closed seconds after the harness gave up. ## Suspected layer **Harness**, and only the harness — `app/tests/e2e/fixtures/droplet.ts`. Not product (the app was at 2% of "Connect to the rented server over SSH", still working, and `founding-state.log` shows a coherent draft through `"step": "created"`). Not infra (the gateway was created on schedule, 34 s, and answered). ## What plugging it needs 1. **Confirm the in-run heal landed.** `logs/healer-claude.out` records `"action":"healed"`, commit `2e038b6e85d25a90060e1b267db4c76406a34ef4`, teaching the loop to catch a rejected dial and retry to the budget, rethrow on a never-reachable box, and raise the #885 missing-identity refusal up front so the new catch cannot swallow it (+3 seam tests; `vitest run tests/e2e/fixtures/droplet.test.ts` 17 pass, and 1 fails with this drive's exact message when the fix is stashed). The drive ran at `f618a6ce`. **I could not verify that commit is on `main` — the check was not permitted in this session.** If it is on `main`, this red needs no further product or harness code; if it is not, land it. 2. **Plug the evidence gap this red exposed** (independently actionable, and the healer's own filed residual). All four gateway-side captures are one line — ``` root@134.199.165.253: Permission denied (publickey,keyboard-interactive). note: gateway ... harvest failed (gateway unreachable?) ``` — in `gateway-journal.txt`, `gateway-units.txt`, `gateway-stall.txt`, `gateway-caddy.txt`, while the same verb against the device box harvested 133 KB of `device-journal.txt` plus `device-stall.txt` and `device-units.txt`. The parenthetical is falsified by the run's own forensics (tcp/22 answered a fresh connect at 06:37:34). The shell harvest in `scripts/lib/rehearsal-droplet.sh` dials with no `-i`, riding the executor's ambient key, which a broker-rented gateway can never accept — it trusts only the app's rent-operator key (#885, GOTCHAS #101; `#744` scrubbed the golden snapshot's `authorized_keys` set that used to make the ambient fallback work by accident). Thread a per-box identity through `oc_droplet_evidence`, derived from `OC_STANDING_DIR` (never re-spelled — see healer `5c8f4c6e`) and **loud** when the key is absent rather than silently ambient, mirroring `identityArgs` at `droplet.ts:36-46`. Without it, this red had to be inferred from timestamps instead of read off the box. ## Absent from this run (explained, not defects) - **`logs/droplet-journal.txt` does not exist.** On a device-target drive that capture is split into the `gateway-*` / `device-*` labelled files present here. - **`state/` in the run dir is empty** — the drive red before any deploy, so no clan-config flake was captured. `logs/state-logs.log` separately records `ENOENT ... test-results/standing-rented/state/logs`. - **`logs/broker-journal.txt`** is an off-mesh `dev@100.98.48.68: Permission denied (publickey)` — by design on this executor, and the verdict does not depend on it (ADR 0208, #681). - **`logs/guest-*.log` and `logs/qemu.log` are empty by construction.** `artifacts/host.json` shows `qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT`, and `guest-failed-units.log` says "the guest was never created, so there is nothing to ask". This drive used real droplets, not a guest VM. - **`logs/helper.log`** is only Electron GLX/EGL noise on a headless host — not load-bearing. drive `20260828T063513Z` red at `image-boot`: `ssh root@134.199.165.253 timed out after 10000ms: systemctl is-active idss-agent` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T063513Z` 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 -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13097
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13097 (automated multi-host claim — lowest live claim id works this ticket)
Owner

Closing as a duplicate of #929, in #929's favour (ADR 0174 — veto anytime).

Same drive 20260828T063513Z, same defect (a timed-out first SSH dial escaping waitForSSHCommand's retry loop). The signatures differ only because standing wraps the inner leg: 25304f657c24 is the wrapper, a25a6c0aae50 is image-boot itself. #929 was filed first and carries the same diagnosis and the #691 / DDR 0192 lineage.

This is the FIFTH wrapped-leg duplicate pair today — #885/#886, #904/#905, #921/#922, #923/#924, and now #929/#930. Each one costs a worker slot, a blocker edge and a manual close. The cause is constant: a red inside a wrapped leg is filed once per leg key, so standing and the leg it wraps each mint a ticket for one fault.

This is distinct from the exit-3 phantom #918 fixed and from #919's reproducibility guard — it needs its own dedupe, keying on the INNER leg rather than the wrapper (or matching an open ticket carrying the same drive stamp before filing a second). Recording it here rather than filing a sixth ticket overnight; worth arming when someone picks up the reporter work.

**Closing as a duplicate of #929, in #929's favour** (ADR 0174 — veto anytime). Same drive `20260828T063513Z`, same defect (a timed-out first SSH dial escaping `waitForSSHCommand`'s retry loop). The signatures differ only because `standing` wraps the inner leg: `25304f657c24` is the wrapper, `a25a6c0aae50` is `image-boot` itself. #929 was filed first and carries the same diagnosis and the #691 / DDR 0192 lineage. **This is the FIFTH wrapped-leg duplicate pair today** — #885/#886, #904/#905, #921/#922, #923/#924, and now #929/#930. Each one costs a worker slot, a blocker edge and a manual close. The cause is constant: a red inside a wrapped leg is filed once per leg key, so `standing` and the leg it wraps each mint a ticket for one fault. This is distinct from the exit-3 phantom #918 fixed and from #919's reproducibility guard — it needs its own dedupe, keying on the INNER leg rather than the wrapper (or matching an open ticket carrying the same drive stamp before filing a second). Recording it here rather than filing a sixth ticket overnight; worth arming when someone picks up the reporter work.
ben closed this issue 2026-08-28 06:54:53 +00:00
Author
Member

close-report for #930 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 930,
  "status": "success",
  "commits": [],
  "changed_files": [],
  "tests": [],
  "criteria": {},
  "summary": "Closed as a duplicate of #929 per Ben's ADR-0174 ruling on 2026-08-28T06:54:52Z — same drive 20260828T063513Z, same defect (a timed-out first SSH dial escaping waitForSSHCommand's retry loop), differing only by the standing wrapper vs the inner image-boot leg key.",
  "reason": "Ben ruled this ticket a duplicate of #929 in #929's favour (the fifth wrapped-leg dup pair of the day: standing wraps image-boot, so one fault mints two tickets). #929 is still open, priority, ready-for-agent, and carries the identical diagnosis plus the #691/DDR 0192 lineage; the waitForSSHCommand catch-and-retry fix (and the rehearsal-droplet.sh evidence-identity residual) belong there, not here. The fix is confirmed absent from origin/main, so nothing has silently landed. Following the human ruling under Rule 6 rather than reimplementing the fix against a deduplicated ticket, which would conflict with #929's own work.",
  "blockers": [],
  "no_code_change": "Closed as a duplicate of #929 per Ben's recorded ADR-0174 ruling on the issue thread; the fix is owned by #929, which remains open and will be worked in its own iteration. No code change is correct for a dedup close — implementing here would duplicate #929's slice and risk a merge conflict with it."
}
**close-report** for #930 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 930, "status": "success", "commits": [], "changed_files": [], "tests": [], "criteria": {}, "summary": "Closed as a duplicate of #929 per Ben's ADR-0174 ruling on 2026-08-28T06:54:52Z — same drive 20260828T063513Z, same defect (a timed-out first SSH dial escaping waitForSSHCommand's retry loop), differing only by the standing wrapper vs the inner image-boot leg key.", "reason": "Ben ruled this ticket a duplicate of #929 in #929's favour (the fifth wrapped-leg dup pair of the day: standing wraps image-boot, so one fault mints two tickets). #929 is still open, priority, ready-for-agent, and carries the identical diagnosis plus the #691/DDR 0192 lineage; the waitForSSHCommand catch-and-retry fix (and the rehearsal-droplet.sh evidence-identity residual) belong there, not here. The fix is confirmed absent from origin/main, so nothing has silently landed. Following the human ruling under Rule 6 rather than reimplementing the fix against a deduplicated ticket, which would conflict with #929's own work.", "blockers": [], "no_code_change": "Closed as a duplicate of #929 per Ben's recorded ADR-0174 ruling on the issue thread; the fix is owned by #929, which remains open and will be worked in its own iteration. No code change is correct for a dedup close — implementing here would duplicate #929's slice and risk a merge conflict with it." } ``` </details>
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#930
No description provided.