decline-resume: leg declines whichever pending card is up, not the one it minted #934

Closed
opened 2026-08-28 08:01:24 +00:00 by matou-build-agent · 2 comments

The failure

decline-resume, the fifth and last leg; the four before it are green.

"leg": "decline-resume", "status": "red", "ms": 60341
"firstRedLeg": "decline-resume"

The leg clicks DECLINE on the P2-S4 pending card and waits for the strip to empty. It never does:

Locator:  locator('[data-field="pending-device"]')
Expected: 0
Received: 1
Timeout:  60000ms
  - waiting for locator('[data-field="pending-device"]')
    123 × locator resolved to 1 element
        - unexpected value "1"

Count is 1 for all 123 polls — never 2, never 0.

The evidence that it declined the wrong card

The card still standing at the timeout is this drive's own. artifacts/journey.device-device-add--809eb-e-standing-rented-community/test-failed-1.png reads:

clan-lab-rehearsal-adf06828 wants to join . Code 93AB-2GWB-QUNE-ADSA-FJR8, issued by operator, 1 minute ago

and both halves are this run's:

  • artifacts/enrollment-code.txt → 93AB-2GWB-QUNE-ADSA-FJR8
  • logs/device-do-forensics.txt → name: clan-lab-rehearsal-adf06828 / created: 2026-08-28T07:47:30Z

So the request the leg meant to end is the one that outlived it. What it actually clicked was a different card, already on the strip when the leg opened. Three things say so:

  1. The helper is unscoped. error-context.md quotes journey.device.spec.ts:185-190 verbatim:

    export async function declinePending(page: Page): Promise<void> {
      await backToFleetList(page);
      const pending = page.locator('[data-field="pending-device"]');
      await expect(pending).toBeVisible({ timeout: DRILL_IN_TIMEOUT_MS });
      await pending.locator('[data-action="decline"]').click();
      await expect(pending).toHaveCount(0, { timeout: DRILL_IN_TIMEOUT_MS });
    

    Nothing ties pending to the code the leg just minted. On a community that outlives the drive, that reads as "whichever card is up". approvePending (:167-177) has the same bare locator.

  2. Timing puts a card on the strip before this drive's own could be there. verdict.json starts the run at 07:48:21.948Z; summing legs.json durations (standing 8597 + mint 409 + device-create 1366 + agent-install 2388 ms) puts the start of decline-resume at ≈07:48:34.8, and its 60341 ms is the final toHaveCount wait — so toBeVisible passed and DECLINE was clicked within about a second of the leg opening. The device droplet had only booted at 07:48:03 (logs/device-stall.txt: 07:49:50 up 1 min). The card that satisfied toBeVisible at ≈07:48:35 was not this drive's.

  3. The community is a standing one carrying an older ledger. logs/founding-state.log:

    "message": "gateway deploy complete — the control plane is live",
    "at": "2026-08-28T07:25:28.341861643Z"
    ...
    "message": "gateway is enrolled node node-req-0001; crown jewels placed; authority flipped to the control-plane API"
    

    Its enrol ledger starts at req-0001 some twenty-three minutes before this drive minted anything, so it carries whatever earlier drives left behind.

The run's healer (logs/healer-claude.out) reached the same failure at request-id resolution out of trace.zip: the strip already held req-0002 (code SDXM-8UYW-R6SG-H67J-PJXJ, host clan-lab-rehearsal-a8e7c6ca, issued 07:26:00Z — the drive ~20 min earlier, which red at this same leg), the leg POSTed decline on that one at 07:48:35 (204), and its own req-0003 landed at 07:48:38 and held the strip at 1. I could not verify that layer myself: this session is sandboxed to the run directory and unzip/python3 against trace.zip were refused. Treat the req-ids and the 204 as the healer's reading; the screenshot, code, host, helper source and timing above are independent of it and carry the diagnosis on their own.

Suspected layer

Harness — the drive's own e2e helper. The product behaved correctly: DECLINE ended the request it was handed. Two things sit behind the red, in order of what actually plugs it:

  1. (primary, harness) approvePending / declinePending in app/tests/e2e/journey.device.spec.ts select [data-field="pending-device"] with no filter, against a Fleet strip owned by a community shared across runs.
  2. (secondary, product hygiene) nothing prunes an abandoned enrol request — the earlier drive's has sat pending since 07:26 and every red drive adds one more. Real, but not what made this run red.

What plugging it needs

  • Scope both helpers to the code the leg holds: pick the card whose callout carries currentCode and assert that card leaves, not the strip. Pin the code text in the card so the selector can't silently stop matching. (The healer reports committing exactly this as 526807bb with a two-card unit case; I am sandboxed out of the repo and cannot confirm it landed — check before duplicating.)
  • Close what the drive opens: in the journey's afterAll, best-effort decline any still-pending request whose code this run minted — non-fatal, so teardown can never mask a leg's real fault.
  • One-off operator action (live community state, not a code change): decline the stranded request already on the standing community's strip.
  • Optional, separate: let the pending projection derive expired from the bound code's expiry, so abandoned requests eventually leave a real operator's Fleet too.

Not the known frontier

This is not the own-VPS pairing red named in the brief. legs.json carries no skip rows and no skip reasons at all (verdict.json: "skip": 0), and pairing succeeded inside standing — founding-state.log logs "paired — the community name was aimed at the server before install, so the public reachability check is skipped; the gateway deploy begins". decline-resume is a distinct, in-scope failure.

What is absent

  • No live-box section was appended to this prompt, so I diagnosed from the harvested evidence alone and touched nothing. (device-do-forensics.txt records tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did, so a box was up; I had no access line for it.)
  • No logs/droplet-journal.txt. This drive harvests logs/device-journal.txt (138 KB) plus device-units.txt, device-stall.txt, device-do-forensics.txt instead.
  • logs/broker-journal.txt harvested nothing: dev@100.98.48.68: Permission denied (publickey) — off the admin mesh, by design (#681); the verdict does not depend on it.
  • logs/state-logs.log: ERROR: no state logs directory at .../standing-rented/state/logs.
  • All logs/guest-*.log are empty, ENOENT, or DBus-refused, and qemu.log / host.json both show spawn qemu-system-x86_64 ENOENT — expected for a rented-droplet target with no local guest VM.
  • artifacts/trace.zip is present (1.4 MB) but unreadable from this sandbox.

drive 20260828T074707Z red at decline-resume: expect(locator).toHaveCount(expected) failed Locator: locator('[data-field="pending-device"]') Expected: 0 Received: 1 Timeout: 60000ms Call log: - Expect "toHaveCount" with timeout 60000ms - waiting
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T074707Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure `decline-resume`, the fifth and last leg; the four before it are green. ``` "leg": "decline-resume", "status": "red", "ms": 60341 "firstRedLeg": "decline-resume" ``` The leg clicks DECLINE on the P2-S4 pending card and waits for the strip to empty. It never does: ``` Locator: locator('[data-field="pending-device"]') Expected: 0 Received: 1 Timeout: 60000ms - waiting for locator('[data-field="pending-device"]') 123 × locator resolved to 1 element - unexpected value "1" ``` Count is 1 for all 123 polls — never 2, never 0. ## The evidence that it declined the wrong card The card still standing at the timeout is **this drive's own**. `artifacts/journey.device-device-add--809eb-e-standing-rented-community/test-failed-1.png` reads: > `clan-lab-rehearsal-adf06828 wants to join . Code 93AB-2GWB-QUNE-ADSA-FJR8, issued by operator, 1 minute ago` and both halves are this run's: - `artifacts/enrollment-code.txt` → `93AB-2GWB-QUNE-ADSA-FJR8` - `logs/device-do-forensics.txt` → `name: clan-lab-rehearsal-adf06828` / `created: 2026-08-28T07:47:30Z` So the request the leg meant to end is the one that outlived it. What it actually clicked was a different card, already on the strip when the leg opened. Three things say so: 1. **The helper is unscoped.** `error-context.md` quotes `journey.device.spec.ts:185-190` verbatim: ```ts export async function declinePending(page: Page): Promise<void> { await backToFleetList(page); const pending = page.locator('[data-field="pending-device"]'); await expect(pending).toBeVisible({ timeout: DRILL_IN_TIMEOUT_MS }); await pending.locator('[data-action="decline"]').click(); await expect(pending).toHaveCount(0, { timeout: DRILL_IN_TIMEOUT_MS }); ``` Nothing ties `pending` to the code the leg just minted. On a community that outlives the drive, that reads as "whichever card is up". `approvePending` (:167-177) has the same bare locator. 2. **Timing puts a card on the strip before this drive's own could be there.** `verdict.json` starts the run at `07:48:21.948Z`; summing `legs.json` durations (`standing` 8597 + `mint` 409 + `device-create` 1366 + `agent-install` 2388 ms) puts the start of `decline-resume` at ≈`07:48:34.8`, and its 60341 ms is the *final* `toHaveCount` wait — so `toBeVisible` passed and DECLINE was clicked within about a second of the leg opening. The device droplet had only booted at `07:48:03` (`logs/device-stall.txt`: `07:49:50 up 1 min`). The card that satisfied `toBeVisible` at ≈`07:48:35` was not this drive's. 3. **The community is a standing one carrying an older ledger.** `logs/founding-state.log`: ``` "message": "gateway deploy complete — the control plane is live", "at": "2026-08-28T07:25:28.341861643Z" ... "message": "gateway is enrolled node node-req-0001; crown jewels placed; authority flipped to the control-plane API" ``` Its enrol ledger starts at `req-0001` some twenty-three minutes before this drive minted anything, so it carries whatever earlier drives left behind. The run's healer (`logs/healer-claude.out`) reached the same failure at request-id resolution out of `trace.zip`: the strip already held `req-0002` (code `SDXM-8UYW-R6SG-H67J-PJXJ`, host `clan-lab-rehearsal-a8e7c6ca`, issued `07:26:00Z` — the drive ~20 min earlier, which red at this same leg), the leg POSTed `decline` on *that* one at `07:48:35` (204), and its own `req-0003` landed at `07:48:38` and held the strip at 1. **I could not verify that layer myself**: this session is sandboxed to the run directory and `unzip`/`python3` against `trace.zip` were refused. Treat the req-ids and the 204 as the healer's reading; the screenshot, code, host, helper source and timing above are independent of it and carry the diagnosis on their own. ## Suspected layer **Harness** — the drive's own e2e helper. The product behaved correctly: DECLINE ended the request it was handed. Two things sit behind the red, in order of what actually plugs it: 1. *(primary, harness)* `approvePending` / `declinePending` in `app/tests/e2e/journey.device.spec.ts` select `[data-field="pending-device"]` with no filter, against a Fleet strip owned by a community shared across runs. 2. *(secondary, product hygiene)* nothing prunes an abandoned enrol request — the earlier drive's has sat `pending` since 07:26 and every red drive adds one more. Real, but not what made *this* run red. ## What plugging it needs - Scope both helpers to the code the leg holds: pick the card whose callout carries `currentCode` and assert *that* card leaves, not the strip. Pin the code text in the card so the selector can't silently stop matching. (The healer reports committing exactly this as `526807bb` with a two-card unit case; I am sandboxed out of the repo and **cannot confirm it landed** — check before duplicating.) - Close what the drive opens: in the journey's `afterAll`, best-effort decline any still-`pending` request whose code this run minted — non-fatal, so teardown can never mask a leg's real fault. - One-off operator action (live community state, not a code change): decline the stranded request already on the standing community's strip. - Optional, separate: let the pending projection derive `expired` from the bound code's expiry, so abandoned requests eventually leave a real operator's Fleet too. ## Not the known frontier This is **not** the own-VPS pairing red named in the brief. `legs.json` carries no skip rows and no skip reasons at all (`verdict.json`: `"skip": 0`), and pairing succeeded inside `standing` — `founding-state.log` logs `"paired — the community name was aimed at the server before install, so the public reachability check is skipped; the gateway deploy begins"`. `decline-resume` is a distinct, in-scope failure. ## What is absent - **No live-box section was appended to this prompt**, so I diagnosed from the harvested evidence alone and touched nothing. (`device-do-forensics.txt` records `tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did`, so a box was up; I had no access line for it.) - No `logs/droplet-journal.txt`. This drive harvests `logs/device-journal.txt` (138 KB) plus `device-units.txt`, `device-stall.txt`, `device-do-forensics.txt` instead. - `logs/broker-journal.txt` harvested nothing: `dev@100.98.48.68: Permission denied (publickey)` — off the admin mesh, by design (#681); the verdict does not depend on it. - `logs/state-logs.log`: `ERROR: no state logs directory at .../standing-rented/state/logs`. - All `logs/guest-*.log` are empty, ENOENT, or DBus-refused, and `qemu.log` / `host.json` both show `spawn qemu-system-x86_64 ENOENT` — expected for a rented-droplet target with no local guest VM. - `artifacts/trace.zip` is present (1.4 MB) but unreadable from this sandbox. drive `20260828T074707Z` red at `decline-resume`: `expect(locator).toHaveCount(expected) failed Locator: locator('[data-field="pending-device"]') Expected: 0 Received: 1 Timeout: 60000ms Call log: - Expect "toHaveCount" with timeout 60000ms - waiting ` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T074707Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 77e1014ecd4d -->
Author
Member

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

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

close-report for #934 — status success

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

envelope
{
  "issue": 934,
  "status": "success",
  "commits": [
    "de8b9d4"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/deviceAdd.test.ts",
    "app/tests/e2e/fixtures/deviceAdd.ts",
    "app/tests/e2e/journey.device.spec.ts",
    "dashboard/src/components/device-add/PendingDeviceCard.vue",
    "dashboard/tests/unit/pendingDevices.test.ts"
  ],
  "tests": [
    {
      "command": "cd app && CI=true pnpm exec vitest run tests/e2e/fixtures/deviceAdd.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && CI=true pnpm exec vitest run tests/unit/pendingDevices.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd app && CI=true npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && CI=true npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "approvePending/declinePending scope to the code the leg minted (not the bare strip)": "app/tests/e2e/fixtures/deviceAdd.ts — both helpers take `code` and locate via pendingCardByCode(code) = [data-field=pending-device][data-code=<code>]; callers pass currentCode (journey.device.spec.ts:467,548)",
    "the bound code is pinned in the card so the selector can't silently stop matching": "dashboard/src/components/device-add/PendingDeviceCard.vue — article carries :data-code=\"view.code\"; asserted in dashboard/tests/unit/pendingDevices.test.ts",
    "afterAll best-effort declines any still-pending request whose code this run minted, non-fatal": "app/tests/e2e/journey.device.spec.ts afterAll calls declineOwnPending(dash, mintedCodes) guarded; declineOwnPending never throws (deviceAdd.ts)",
    "two-card unit case": "app/tests/e2e/fixtures/deviceAdd.test.ts (scoped selector + two-code distinctness + empty-code throw) and dashboard/tests/unit/pendingDevices.test.ts (two live cards distinguished by data-code)"
  },
  "summary": "Scoped the device drive's approve/decline helpers to the enrollment code each leg holds (via a pinned data-code attribute), so a standing community's shared pending strip can no longer make the leg act on another drive's card.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #934 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 934, "status": "success", "commits": [ "de8b9d4" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/deviceAdd.test.ts", "app/tests/e2e/fixtures/deviceAdd.ts", "app/tests/e2e/journey.device.spec.ts", "dashboard/src/components/device-add/PendingDeviceCard.vue", "dashboard/tests/unit/pendingDevices.test.ts" ], "tests": [ { "command": "cd app && CI=true pnpm exec vitest run tests/e2e/fixtures/deviceAdd.test.ts", "exit_code": 0 }, { "command": "cd dashboard && CI=true pnpm exec vitest run tests/unit/pendingDevices.test.ts", "exit_code": 0 }, { "command": "cd app && CI=true npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "cd dashboard && CI=true npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "approvePending/declinePending scope to the code the leg minted (not the bare strip)": "app/tests/e2e/fixtures/deviceAdd.ts — both helpers take `code` and locate via pendingCardByCode(code) = [data-field=pending-device][data-code=<code>]; callers pass currentCode (journey.device.spec.ts:467,548)", "the bound code is pinned in the card so the selector can't silently stop matching": "dashboard/src/components/device-add/PendingDeviceCard.vue — article carries :data-code=\"view.code\"; asserted in dashboard/tests/unit/pendingDevices.test.ts", "afterAll best-effort declines any still-pending request whose code this run minted, non-fatal": "app/tests/e2e/journey.device.spec.ts afterAll calls declineOwnPending(dash, mintedCodes) guarded; declineOwnPending never throws (deviceAdd.ts)", "two-card unit case": "app/tests/e2e/fixtures/deviceAdd.test.ts (scoped selector + two-code distinctness + empty-code throw) and dashboard/tests/unit/pendingDevices.test.ts (two live cards distinguished by data-code)" }, "summary": "Scoped the device drive's approve/decline helpers to the enrollment code each leg holds (via a pinned data-code attribute), so a standing community's shared pending strip can no longer make the leg act on another drive's card.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#934
No description provided.