The device drive's approve leg asserts the landing against ANY connected card — the gateway's own enrolled row satisfies it, so a refused Approve is reported as an ssh exit code instead of the control plane's own sentence #1005

Closed
opened 2026-08-29 22:54:36 +00:00 by matou-build-agent · 2 comments

Failure

On drive 20260829T221738Z (red at approve, sig c1ac37bc5a0d) the control plane refused to mint the device's mesh admission and the dashboard rendered exactly why. The leg did not report that. It reported the approved join exited 255 with a join transcript that stops at waiting for the operator's decision… — an ssh outcome, not a fault — and it burned ~300 s doing it. The refusal was recoverable only by opening the leg's screenshot by hand.

Evidence

  • app/tests/e2e/fixtures/deviceAdd.ts:206-214 — approvePending races connected.or(refusal).first() where connected = page.locator('[data-field="connected-device"]'), unscoped to the device this leg approved.
  • dashboard/src/components/device-add/PendingDevicesSurface.vue:43-47 — ConnectedScreen renders for every row with phase === 'enrolled', and dashboard/src/components/device-add/ConnectedScreen.vue:7 puts data-field="connected-device" on each one. On a standing community the strip therefore always carries at least one such card.
  • artifacts/legs/approve-dash.png (drive 20260829T221738Z) — the strip's FIRST card is the gateway's own enrolled row, idss-gateway-rehearsal-e-907c · "joined the community network just now" · ● connected — not set up, sitting above the pending card and above the OcErrorState. In DOM order it is what .first() selects, and it was on screen before the leg ever clicked Approve.
  • Same screenshot, the error state the leg never surfaced: mint mesh admission: enroll: mesh minter: ensure group "node-req-0003": decode GET /api/groups response: json: cannot unmarshal object into Go struct field group.peers of type string.
  • app/tests/e2e/journey.device.spec.ts:612 — the thrown error Playwright anchors the red to, confirming approvePending returned without raising: the refusal.isVisible() check at deviceAdd.ts:215 is a single immediate read that loses the race to the in-flight Approve request.

The expect is thus vacuous: it asserts "some device on this community is connected", which was already true, rather than "the device this leg approved landed". pendingCardByCode already scopes the PENDING card to the code this leg minted (#934); the connected card never got the same treatment.

Suspected layer

The drive harness only — app/tests/e2e/fixtures/deviceAdd.ts. The dashboard is behaving correctly; the strip is shared by design on a standing community.

What plugging it needs

  1. Scope the landing assertion to the device this leg approved. The pending card is already addressable by code, so read the device's rendered name off it ([data-field="device-name"], or add a code-bearing attribute to ConnectedScreen) BEFORE clicking Approve, and assert connected-device filtered by that identity.
  2. Prefer the refusal when both are on the page: check pending-device-error after the race resolves rather than trusting a single immediate isVisible(), or race the SCOPED connected card against the refusal so neither can be satisfied by the other's absence.
  3. Keep the honest ceiling: a refusal must still red in seconds (ADR 0214 d.6, #965) — the point of the race — but a green must mean this device.

The substantive fault behind this drive's red (the mesh minter's group decode) is fixed in commit 1bfc8041; this issue is the reason that fault arrived mislabelled and cost a full paid run to read out of a screenshot.

drive 20260829T221738Z red at approve: the approved join exited 255 --- transcript --- Warning: Permanently added '170.64.208.118' (ED25519) to the list of known hosts. idss: fetching this community's pinned agent from rehearsal-e.idss.nz�
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T221738Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure On drive `20260829T221738Z` (red at `approve`, sig `c1ac37bc5a0d`) the control plane refused to mint the device's mesh admission and the dashboard rendered exactly why. The leg did not report that. It reported `the approved join exited 255` with a join transcript that stops at `waiting for the operator's decision…` — an ssh outcome, not a fault — and it burned ~300 s doing it. The refusal was recoverable only by opening the leg's screenshot by hand. ## Evidence - `app/tests/e2e/fixtures/deviceAdd.ts:206-214` — `approvePending` races `connected.or(refusal).first()` where `connected = page.locator('[data-field="connected-device"]')`, unscoped to the device this leg approved. - `dashboard/src/components/device-add/PendingDevicesSurface.vue:43-47` — `ConnectedScreen` renders for **every** row with `phase === 'enrolled'`, and `dashboard/src/components/device-add/ConnectedScreen.vue:7` puts `data-field="connected-device"` on each one. On a standing community the strip therefore always carries at least one such card. - `artifacts/legs/approve-dash.png` (drive `20260829T221738Z`) — the strip's FIRST card is the gateway's own enrolled row, `idss-gateway-rehearsal-e-907c` · "joined the community network just now" · `● connected — not set up`, sitting **above** the pending card and above the `OcErrorState`. In DOM order it is what `.first()` selects, and it was on screen before the leg ever clicked Approve. - Same screenshot, the error state the leg never surfaced: `mint mesh admission: enroll: mesh minter: ensure group "node-req-0003": decode GET /api/groups response: json: cannot unmarshal object into Go struct field group.peers of type string`. - `app/tests/e2e/journey.device.spec.ts:612` — the thrown error Playwright anchors the red to, confirming `approvePending` returned without raising: the `refusal.isVisible()` check at `deviceAdd.ts:215` is a single immediate read that loses the race to the in-flight Approve request. The `expect` is thus vacuous: it asserts "some device on this community is connected", which was already true, rather than "the device this leg approved landed". `pendingCardByCode` already scopes the PENDING card to the code this leg minted (#934); the connected card never got the same treatment. ## Suspected layer The drive harness only — `app/tests/e2e/fixtures/deviceAdd.ts`. The dashboard is behaving correctly; the strip is shared by design on a standing community. ## What plugging it needs 1. Scope the landing assertion to the device this leg approved. The pending card is already addressable by code, so read the device's rendered name off it (`[data-field="device-name"]`, or add a code-bearing attribute to `ConnectedScreen`) BEFORE clicking Approve, and assert `connected-device` filtered by that identity. 2. Prefer the refusal when both are on the page: check `pending-device-error` after the race resolves rather than trusting a single immediate `isVisible()`, or race the SCOPED connected card against the refusal so neither can be satisfied by the other's absence. 3. Keep the honest ceiling: a refusal must still red in seconds (ADR 0214 d.6, #965) — the point of the race — but a green must mean this device. The substantive fault behind this drive's red (the mesh minter's group decode) is fixed in commit `1bfc8041`; this issue is the reason that fault arrived mislabelled and cost a full paid run to read out of a screenshot. drive `20260829T221738Z` red at `approve`: `the approved join exited 255 --- transcript --- Warning: Permanently added '170.64.208.118' (ED25519) to the list of known hosts. idss: fetching this community's pinned agent from rehearsal-e.idss.nz�` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T221738Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: c1ac37bc5a0d -->
Author
Member

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

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

close-report for #1005 — status success

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

envelope
{
  "issue": 1005,
  "status": "success",
  "commits": [
    "2bbca11"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/deviceAdd.ts",
    "app/tests/e2e/fixtures/deviceAdd.test.ts",
    "dashboard/src/components/device-add/ConnectedScreen.vue",
    "dashboard/tests/unit/pendingDevices.test.ts"
  ],
  "tests": [
    {
      "command": "cd app && CI=true npx vitest run tests/e2e/fixtures/deviceAdd.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && CI=true npx vitest run tests/unit/pendingDevices.test.ts tests/unit/pendingActsLive.test.ts tests/unit/pendingLive.test.ts tests/unit/deviceAddGuard.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && CI=true npx vue-tsc --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Scope the landing assertion to the device this leg approved (read a code-bearing identity off the card before Approve, assert connected-device filtered by that identity)": "ConnectedScreen.vue now pins data-code=view.code; app/tests/e2e/fixtures/deviceAdd.ts adds connectedCardByCode(code) and approvePending scopes the connected locator to connectedCardByCode(code) (commit 2bbca11)",
    "Prefer the refusal when both are on the page; race the SCOPED connected card against the refusal so neither can be satisfied by the other's absence": "approvePending races page.locator(connectedCardByCode(code)).or(refusal).first(); with the connected card scoped it can no longer be won by the gateway's own card, so the refusal.isVisible() read is honest and surfaces the control plane's sentence (deviceAdd.ts)",
    "Keep the honest ceiling: a refusal must still red in seconds, a green must mean this device": "The 5-min ceiling and race are preserved; a green now ends with expect(connected).toBeVisible() on the code-scoped card so it means THIS device (deviceAdd.ts)"
  },
  "summary": "The device drive's approve leg now scopes its landing assertion to the code this leg minted, so a refused mint reds with the control plane's own sentence instead of a stale gateway card satisfying an unscoped connected-device selector.",
  "reason": "",
  "blockers": []
}
**close-report** for #1005 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1005, "status": "success", "commits": [ "2bbca11" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/deviceAdd.ts", "app/tests/e2e/fixtures/deviceAdd.test.ts", "dashboard/src/components/device-add/ConnectedScreen.vue", "dashboard/tests/unit/pendingDevices.test.ts" ], "tests": [ { "command": "cd app && CI=true npx vitest run tests/e2e/fixtures/deviceAdd.test.ts", "exit_code": 0 }, { "command": "cd dashboard && CI=true npx vitest run tests/unit/pendingDevices.test.ts tests/unit/pendingActsLive.test.ts tests/unit/pendingLive.test.ts tests/unit/deviceAddGuard.test.ts", "exit_code": 0 }, { "command": "cd dashboard && CI=true npx vue-tsc --noEmit", "exit_code": 0 } ], "criteria": { "Scope the landing assertion to the device this leg approved (read a code-bearing identity off the card before Approve, assert connected-device filtered by that identity)": "ConnectedScreen.vue now pins data-code=view.code; app/tests/e2e/fixtures/deviceAdd.ts adds connectedCardByCode(code) and approvePending scopes the connected locator to connectedCardByCode(code) (commit 2bbca11)", "Prefer the refusal when both are on the page; race the SCOPED connected card against the refusal so neither can be satisfied by the other's absence": "approvePending races page.locator(connectedCardByCode(code)).or(refusal).first(); with the connected card scoped it can no longer be won by the gateway's own card, so the refusal.isVisible() read is honest and surfaces the control plane's sentence (deviceAdd.ts)", "Keep the honest ceiling: a refusal must still red in seconds, a green must mean this device": "The 5-min ceiling and race are preserved; a green now ends with expect(connected).toBeVisible() on the code-scoped card so it means THIS device (deviceAdd.ts)" }, "summary": "The device drive's approve leg now scopes its landing assertion to the code this leg minted, so a refused mint reds with the control plane's own sentence instead of a stale gateway card satisfying an unscoped connected-device selector.", "reason": "", "blockers": [] } ``` </details>
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#1005
No description provided.