rehearsal drive red at ports-honest #624

Closed
opened 2026-08-21 00:44:37 +00:00 by matou-build-agent · 2 comments

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out)

drive 20260821T003234Z red at ports-honest: expect(locator).toBeVisible() failed Locator: locator('[data-action="recheck-ports"]') Expected: visible Timeout: 600000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 600
evidence: test-results/…/20260821T003234Z/ on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out) drive `20260821T003234Z` red at `ports-honest`: `expect(locator).toBeVisible() failed Locator: locator('[data-action="recheck-ports"]') Expected: visible Timeout: 600000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 600` evidence: `test-results/…/20260821T003234Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: 89cf86e7639e -->
Owner

Head-start (evidence test-results/drive-selfhosted/20260821T003234Z, first drive on DDR 0188 / 5c8b064+d2c56b6, served pin d2c56b6 via the now-automatic reseed) — DDR 0188 WORKED; this red is the leg's fault-injection sequencing, a spec-only fix.

state/founding-state.json: the S10 auto-probe saw 80/443 refused → reachable: true with the new detail "the knock reaches your machine on ports 80, 443 (nothing is serving yet; the gateway deploy comes next)" → name-wiring "rehearsal-b.idss.nz now points at 209.38.31.39" → step: deploying. Exactly the ruled behaviour (#623).

The leg red is journey.selfhosted.spec.ts:441: [data-action="recheck-ports"] not found (10 min). Cause: portsHonest arms iptables … 443 DROP after the pair leg has seen spec-gate-pass — but the auto-probe fires the instant standup.step flips to reachability, and under DDR 0188 a pre-drop probe now passes and advances, so the S10 board (and its re-check button) has folded away before the SSH drop lands. #622's click-recheck fix assumed the board would still be there; under 0188 it isn't.

Fix (spec only, two-way door): arm the drop before S10 is entered — i.e. in the pair leg before awaiting spec-gate-pass (line ~297), or as the first thing portsHonest does before the step transition is possible. Then the sequence is: auto-probe → 443 dropped rendered on the board + firewall-lane guidance + no reachable (under-report detector intact) → undrop → click recheck-ports → reachable → advances to deploying. The finally { undrop } must still wrap the whole window so a red never strands the droplet. The existing assertions (lines 445–470) need no change; only when plan.drop runs moves. Keep wizardPrecheck/s4AccessSelfHosted as-is — the S4 pre-check is a separate probe and should still see the honest pre-drop state.

Under-report check worth adding while there: assert [data-status="reachable"] has count 0 and standup.step (via the state file or the page) has not advanced past reachability while the rule stands.

**Head-start (evidence `test-results/drive-selfhosted/20260821T003234Z`, first drive on DDR 0188 / `5c8b064`+`d2c56b6`, served pin `d2c56b6` via the now-automatic reseed) — DDR 0188 WORKED; this red is the leg's fault-injection sequencing, a spec-only fix.** `state/founding-state.json`: the S10 auto-probe saw `80/443 refused` → `reachable: true` with the new detail *"the knock reaches your machine on ports 80, 443 (nothing is serving yet; the gateway deploy comes next)"* → name-wiring *"rehearsal-b.idss.nz now points at 209.38.31.39"* → `step: deploying`. Exactly the ruled behaviour (#623). The leg red is `journey.selfhosted.spec.ts:441`: `[data-action="recheck-ports"]` not found (10 min). Cause: `portsHonest` arms `iptables … 443 DROP` *after* the `pair` leg has seen `spec-gate-pass` — but the auto-probe fires the instant `standup.step` flips to `reachability`, and under DDR 0188 a pre-drop probe now **passes and advances**, so the S10 board (and its re-check button) has folded away before the SSH drop lands. #622's click-recheck fix assumed the board would still be there; under 0188 it isn't. **Fix (spec only, two-way door):** arm the drop **before S10 is entered** — i.e. in the `pair` leg before awaiting `spec-gate-pass` (line ~297), or as the first thing `portsHonest` does *before* the step transition is possible. Then the sequence is: auto-probe → `443 dropped` rendered on the board + firewall-lane guidance + no `reachable` (under-report detector intact) → `undrop` → click `recheck-ports` → `reachable` → advances to `deploying`. The `finally { undrop }` must still wrap the whole window so a red never strands the droplet. The existing assertions (lines 445–470) need no change; only *when* `plan.drop` runs moves. Keep `wizardPrecheck`/`s4AccessSelfHosted` as-is — the S4 pre-check is a separate probe and should still see the honest pre-drop state. Under-report check worth adding while there: assert `[data-status="reachable"]` has count 0 *and* `standup.step` (via the state file or the page) has not advanced past `reachability` while the rule stands.
Author
Member

Ruled by agent under ADR 0174 — veto anytime

Ruling: two-way-door test-driver retiming, no app/DDR change. Revertible by
commit (e101413b), provable against the run dir's own evidence
(test-results/drive-selfhosted/20260821T003234Z/) plus a source-level read
of internal/reachability/prober.go's DDR 0188 verdict fold and
internal/join/takeover.go's wipe-timing comments. Not on the one-way-door
list: no credentials, no security-posture widening, no trust-surface accept,
no data destruction, no hardware.

Diagnosis

DDR 0188 (#623) changed pre-deploy S10 semantics: a required port that only
refuses (nothing listening, nothing filtered) now reads Reachable: true
(path-proven). journey.selfhosted.spec.ts's ports-honest leg drops port
443 after leg 7 (pair) resolves, then waits for
[data-action="recheck-ports"] to appear — banking on the walkthrough board
already being up (however stale) so the button exists to click. Under DDR
0188's new fold that assumption no longer holds: before the drop lands, S10's
one-shot auto-probe (which fires reactively the same poll tick
spec-gate-pass renders, per #622's own finding) sees only refused ports,
renders the plain green "Reachable" checkmark, and the walkthrough — and its
recheck button — never renders at all pre-drop. Waiting on a button that
structurally cannot exist yet is exactly the toBeVisible timeout at
600000ms this ticket reports. DDR 0188's own consequences section claim
("the ports-honest leg... is unchanged... and now passes against the real
product") was untested by a live drive and turned out to be wrong — this
ticket is the live proof.

Fix

app/tests/e2e/journey.selfhosted.spec.ts (e101413b): the SSH drop of port
443 now fires before leg 7 (pair) starts, concurrently with pairing,
instead of after pair resolves inside the ports-honest leg body — giving
it the whole of leg 7's wait (up to 5 minutes) to land ahead of S10's reactive
one-shot probe instead of racing a sub-second window after pair resolves.
Safe that early: nothing before deploy-takeover (leg 10, the
nixos-anywhere kexec/disko reformat) touches the droplet's firewall — the
wipe is provisioning's first deploy, never device-add's join
(internal/join/takeover.go's own comment) — so the box is still running its
original OS, untouched, through pair/ports-honest/point. No app code, DDR, or
gate semantics changed; DDR 0188's ruling stands exactly as written. Leg
boundaries, ceilings, and the leg's own assertions (dropped-not-masked, then
undrop+recheck proves reachable) are unchanged.

Proof

  • vue-tsc -p tsconfig.json --noEmit clean.
  • eslint app/tests/e2e/journey.selfhosted.spec.ts clean.
  • fixtures/selfhosted.test.ts (17/17, the fault-injection-ordering unit
    contract) green, unaffected.
  • Full vitest run: 906/906 green (with the host's stray IDSS_PAYLOAD_DIR
    env var unset — that leak is pre-existing on main and unrelated to this
    fix, confirmed by reproducing it on a clean checkout).
  • go test ./...: green.
  • NOT re-proved by a fresh live drive this session — same host-capacity
    constraint as #622/#623 (this session holds matou-session-runner.lock for
    its own duration). The next unattended selfhosted re-drive is the live
    proof, the same closure path #608/#609/#622/#623 all took. A fresh red
    there — a different leg, or this fix being wrong — mints its own new ticket
    via the same reporter/dedup path.

Advances #624; commit e101413b, STATUS.md updated in the same commit.

## Ruled by agent under ADR 0174 — veto anytime **Ruling:** two-way-door test-driver retiming, no app/DDR change. Revertible by commit (`e101413b`), provable against the run dir's own evidence (`test-results/drive-selfhosted/20260821T003234Z/`) plus a source-level read of `internal/reachability/prober.go`'s DDR 0188 verdict fold and `internal/join/takeover.go`'s wipe-timing comments. Not on the one-way-door list: no credentials, no security-posture widening, no trust-surface accept, no data destruction, no hardware. ## Diagnosis DDR 0188 (#623) changed pre-deploy S10 semantics: a required port that only *refuses* (nothing listening, nothing filtered) now reads `Reachable: true` (path-proven). `journey.selfhosted.spec.ts`'s `ports-honest` leg drops port 443 **after** leg 7 (`pair`) resolves, then waits for `[data-action="recheck-ports"]` to appear — banking on the walkthrough board already being up (however stale) so the button exists to click. Under DDR 0188's new fold that assumption no longer holds: before the drop lands, S10's one-shot auto-probe (which fires reactively the same poll tick `spec-gate-pass` renders, per #622's own finding) sees only refused ports, renders the plain green "Reachable" checkmark, and the walkthrough — and its recheck button — never renders at all pre-drop. Waiting on a button that structurally cannot exist yet is exactly the `toBeVisible` timeout at 600000ms this ticket reports. DDR 0188's own consequences section claim ("the `ports-honest` leg... is unchanged... and now passes against the real product") was untested by a live drive and turned out to be wrong — this ticket is the live proof. ## Fix `app/tests/e2e/journey.selfhosted.spec.ts` (`e101413b`): the SSH drop of port 443 now fires **before** leg 7 (`pair`) starts, concurrently with pairing, instead of after `pair` resolves inside the `ports-honest` leg body — giving it the whole of leg 7's wait (up to 5 minutes) to land ahead of S10's reactive one-shot probe instead of racing a sub-second window after `pair` resolves. Safe that early: nothing before `deploy-takeover` (leg 10, the `nixos-anywhere` kexec/disko reformat) touches the droplet's firewall — the wipe is provisioning's first deploy, never device-add's join (`internal/join/takeover.go`'s own comment) — so the box is still running its original OS, untouched, through pair/ports-honest/point. No app code, DDR, or gate semantics changed; DDR 0188's ruling stands exactly as written. Leg boundaries, ceilings, and the leg's own assertions (dropped-not-masked, then undrop+recheck proves `reachable`) are unchanged. ## Proof - `vue-tsc -p tsconfig.json --noEmit` clean. - `eslint app/tests/e2e/journey.selfhosted.spec.ts` clean. - `fixtures/selfhosted.test.ts` (17/17, the fault-injection-ordering unit contract) green, unaffected. - Full `vitest run`: 906/906 green (with the host's stray `IDSS_PAYLOAD_DIR` env var unset — that leak is pre-existing on `main` and unrelated to this fix, confirmed by reproducing it on a clean checkout). - `go test ./...`: green. - **NOT re-proved by a fresh live drive this session** — same host-capacity constraint as #622/#623 (this session holds `matou-session-runner.lock` for its own duration). The next unattended `selfhosted` re-drive is the live proof, the same closure path #608/#609/#622/#623 all took. A fresh red there — a different leg, or this fix being wrong — mints its own new ticket via the same reporter/dedup path. Advances #624; commit `e101413b`, `STATUS.md` updated in the same commit.
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.

Reference
Matou/idss#624
No description provided.