drive harness: readConnectedDeviceId picks the FIRST non-gateway fleet row — on a reused standing gateway that's the prior run's ghost, so assess reds while the real device sits one row down offering set-up #1043

Closed
opened 2026-08-30 17:28:51 +00:00 by ben · 2 comments
Owner

Parent

#854. Standing-reuse family, sibling of #1042.

What broke

Drive 20260830T172147Z (the first standing-REUSE run of the day — standing green in 8s, gateway kept from the prior drive) redded at assess: device node-req-0003's row offers no "set up" control.

The DOM snapshot shows the truth: the reused gateway's fleet holds TWO non-gateway rows — node-req-0003, the ghost of the previous drive's destroyed member device (● no recent signal, action change), and node-req-0005, this drive's freshly joined device, correctly offering set up. The product surface is right; approve approved the right (pending) request.

The harness misread the id: readConnectedDeviceId (app journey.device spec) selects the first fleet-row-* row that isn't the gateway. Its own comment says "so assess/select-files/remove address the exact node the join created" — but .first() addresses the first non-gateway node, which on a reused standing gateway is the ghost. Every fresh-found drive had exactly one non-gateway row, so this never bit until standing reuse landed.

What to build

Make the harness address the node the join actually created:

  • Prefer the row carrying a set-up-<id> action (a connected, not-yet-provisioned device — the state the leg is about to exercise), or thread the request id from the join/approve context into readConnectedDeviceId. Either kills the ambiguity; threading the id is the stronger contract if the approve surface exposes it.
  • Keep the loud failure when NO row offers set-up (that remains a real product red — nodeSurfaceRoute regression).

Acceptance criteria

  • A standing-reuse drive whose gateway holds ghost rows from prior runs assesses the freshly joined device (green through assess/select-files to deploy-takeover).
  • A run where no row offers set up still fails loud with the current message.
  • Offline test: row-picking with a ghost row + a fresh row selects the fresh one (the pure fleet-row selector seams already have a test home, deviceProvision.test.ts per the spec header).

Blocked by

None — can start immediately.

## Parent #854. Standing-reuse family, sibling of #1042. ## What broke Drive `20260830T172147Z` (the first standing-REUSE run of the day — `standing` green in 8s, gateway kept from the prior drive) redded at `assess`: `device node-req-0003's row offers no "set up" control`. The DOM snapshot shows the truth: the reused gateway's fleet holds TWO non-gateway rows — `node-req-0003`, the **ghost** of the previous drive's destroyed member device (`● no recent signal`, action `change`), and `node-req-0005`, **this drive's freshly joined device, correctly offering `set up`**. The product surface is right; `approve` approved the right (pending) request. The harness misread the id: `readConnectedDeviceId` (app journey.device spec) selects the **first** `fleet-row-*` row that isn't the gateway. Its own comment says "so assess/select-files/remove address the exact node the join created" — but `.first()` addresses the first non-gateway node, which on a reused standing gateway is the ghost. Every fresh-found drive had exactly one non-gateway row, so this never bit until standing reuse landed. ## What to build Make the harness address the node the join actually created: - Prefer the row carrying a `set-up-<id>` action (a connected, not-yet-provisioned device — the state the leg is about to exercise), or thread the request id from the join/approve context into `readConnectedDeviceId`. Either kills the ambiguity; threading the id is the stronger contract if the approve surface exposes it. - Keep the loud failure when NO row offers set-up (that remains a real product red — nodeSurfaceRoute regression). ## Acceptance criteria - [ ] A standing-reuse drive whose gateway holds ghost rows from prior runs assesses the freshly joined device (green through `assess`/`select-files` to `deploy-takeover`). - [ ] A run where no row offers `set up` still fails loud with the current message. - [ ] Offline test: row-picking with a ghost row + a fresh row selects the fresh one (the pure fleet-row selector seams already have a test home, deviceProvision.test.ts per the spec header). ## Blocked by None — can start immediately.

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

swarm-claim host=elitebook-distributed-server-03 run=14673 (automated multi-host claim — lowest live claim id works this ticket)
matou-build-agent 2026-08-30 17:37:07 +00:00

close-report for #1043 — status success

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

envelope
{
  "issue": 1043,
  "status": "success",
  "commits": [],
  "changed_files": [],
  "tests": [
    {
      "command": "CI=true pnpm --filter app exec vitest run tests/e2e/fixtures/deviceProvision.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A standing-reuse drive whose gateway holds ghost rows assesses the freshly joined device (green through assess/select-files to deploy-takeover)": "adc6ff5 moved readConnectedDeviceId (app/tests/e2e/journey.device.spec.ts:902-923) off .first() row-order onto connectedDeviceIdFromActions, which discriminates on the set-up-<id> control (a not-yet-provisioned node) rather than order, so the ghost node-req-0003 (change action) is skipped and the fresh node-req-0005 (set-up action) is addressed",
    "A run where no row offers set up still fails loud with the current message": "journey.device.spec.ts:916-921 keeps the throw 'no fleet row offers a \"set up\" control (...)' when connectedDeviceIdFromActions returns null, and openDeviceSetup (deviceProvision.ts) still asserts the loud 'offers no \"set up\" control' message",
    "Offline test: row-picking with a ghost row + a fresh row selects the fresh one (deviceProvision.test.ts)": "app/tests/e2e/fixtures/deviceProvision.test.ts:33-40 'picks the un-provisioned device past an already-provisioned stray, whatever the row order' — connectedDeviceIdFromActions(['change-node-node-req-0003','set-up-node-req-0005']) === 'node-req-0005'; 8/8 pass"
  },
  "summary": "The set-up-<id> discriminator that fixes readConnectedDeviceId's ghost-row ambiguity was already landed by rehearsal-healer commit adc6ff5 (ancestor of origin/main); all acceptance clauses verified, offline seam test 8/8 green.",
  "no_code_change": "The exact fix #1043 asks for — pick the connected device off the set-up-<id> control rather than fleet-row order, keep the loud failure when no row offers set-up, and prove it offline in deviceProvision.test.ts — was already implemented and pushed to origin/main by rehearsal-healer commit adc6ff5 before this ticket was worked. No further code change is required; re-verified by running the offline seam test (8 passed)."
}
**close-report** for #1043 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1043, "status": "success", "commits": [], "changed_files": [], "tests": [ { "command": "CI=true pnpm --filter app exec vitest run tests/e2e/fixtures/deviceProvision.test.ts", "exit_code": 0 } ], "criteria": { "A standing-reuse drive whose gateway holds ghost rows assesses the freshly joined device (green through assess/select-files to deploy-takeover)": "adc6ff5 moved readConnectedDeviceId (app/tests/e2e/journey.device.spec.ts:902-923) off .first() row-order onto connectedDeviceIdFromActions, which discriminates on the set-up-<id> control (a not-yet-provisioned node) rather than order, so the ghost node-req-0003 (change action) is skipped and the fresh node-req-0005 (set-up action) is addressed", "A run where no row offers set up still fails loud with the current message": "journey.device.spec.ts:916-921 keeps the throw 'no fleet row offers a \"set up\" control (...)' when connectedDeviceIdFromActions returns null, and openDeviceSetup (deviceProvision.ts) still asserts the loud 'offers no \"set up\" control' message", "Offline test: row-picking with a ghost row + a fresh row selects the fresh one (deviceProvision.test.ts)": "app/tests/e2e/fixtures/deviceProvision.test.ts:33-40 'picks the un-provisioned device past an already-provisioned stray, whatever the row order' — connectedDeviceIdFromActions(['change-node-node-req-0003','set-up-node-req-0005']) === 'node-req-0005'; 8/8 pass" }, "summary": "The set-up-<id> discriminator that fixes readConnectedDeviceId's ghost-row ambiguity was already landed by rehearsal-healer commit adc6ff5 (ancestor of origin/main); all acceptance clauses verified, offline seam test 8/8 green.", "no_code_change": "The exact fix #1043 asks for — pick the connected device off the set-up-<id> control rather than fleet-row order, keep the loud failure when no row offers set-up, and prove it offline in deviceProvision.test.ts — was already implemented and pushed to origin/main by rehearsal-healer commit adc6ff5 before this ticket was worked. No further code change is required; re-verified by running the offline seam test (8 passed)." } ``` </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.

Reference
Matou/idss#1043
No description provided.