the device drive's gateway evidence harvest resolves the rent-operator key under the run dir, which on a standing-home drive never holds it #933

Closed
opened 2026-08-28 07:36:23 +00:00 by matou-build-agent · 2 comments

Failure

On drive 20260828T071107Z (target device) all four gateway-side evidence files landed with nothing but a permission-denied line, on a box the same harvest proved was up:

  • logs/gateway-journal.txt: root@168.144.175.167: Permission denied (publickey,keyboard-interactive) + note: gateway evidence gather failed (gateway unreachable?)
  • logs/gateway-stall.txt, logs/gateway-units.txt: the same denial and their own note: … harvest failed markers
  • logs/gateway-caddy.txt: 137 bytes, same shape

Meanwhile logs/gateway-do-forensics.txt records tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did, 0% ping loss, and the droplet idss-gateway-rehearsal-c-24fa (id 595821419) active, created 07:12:33Z by this very drive — artifacts/standing-founded.json shows it re-founded ("ip": "168.144.175.167"). The drive's own founding legs (enroll-copy, enroll-activate, deploy, activation) are all green in artifacts/legs.json, so the app half reached that box over SSH throughout. Only the harvest half was locked out.

This is exactly the blindness class #894 and #926 exist to close, and it is not the red this drive died on — the drive red at decline-resume for an unrelated UI-navigation reason (healed at c67a6925). It is a separate defect that survives that heal.

Evidence

oc_droplet_evidence resolves the per-run identity the rented box trusts at scripts/lib/rehearsal-droplet.sh:447:

local identity="$run_dir/state/rent-operator/id_ed25519"

and oc_device_evidence hands it the DRIVE run dir for the gateway box (scripts/lib/rehearsal-droplet.sh:1353):

OC_E2E_DROPLET_IP="$gw_ip" oc_droplet_evidence "$run_dir" gateway

But a device drive launches the app on the STANDING home, not the per-run state dir (ADR 0208; journey.device.spec.ts:276 — launchApp({ stateDir: standingStateDir() })), so the broker mints the rent-operator key into the standing home. Checked on the executor just now:

/home/swarm/swarm/Matou/idss/test-results/standing-rented/state/rent-operator/id_ed25519   # exists, 412 bytes, minted 07:12 by this drive
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T071107Z/state/rent-operator/  # No such file or directory

The run's own logs corroborate that the standing home is the app's state dir: logs/state-logs.log reads no state logs directory at /home/swarm/swarm/Matou/idss/test-results/standing-rented/state/logs, and logs/clan-config-snapshot.log reads source: /home/swarm/swarm/Matou/idss/test-results/standing-rented/state/clan-config. The run dir's state/ holds only the harvested clan-config-snapshot/.

Honest caveat on scope. artifacts/verdict.json records this drive ran at 9ea7e9e8, i.e. one commit BEFORE #926 (6b3a3261) landed — so this run's denial is not by itself proof that #926 fails. The proof is the path check above: #926's identity expression cannot resolve on the device drive no matter which commit runs it, because the key is never written under $run_dir. The next drive carries #926 and will still harvest four empty gateway files.

Suspected layer

The rehearsal harness's evidence layer — scripts/lib/rehearsal-droplet.sh, the identity resolution at :447 and the gateway call site at :1353. Not the app, not the product, not the box.

oc_rented_certs_worker (scripts/lib/rehearsal-droplet.sh:996) uses the same $run_dir/state/rent-operator/id_ed25519 expression, but it runs on the RENTED drive, whose run dir IS the app's state dir — so it is correct there. Only the device path's gateway dial has the two dirs diverge, which is why #926 reads correct and still misses.

What plugging it needs

Make the identity a resolved input rather than a $run_dir-derived guess, so the caller that knows which state home the app ran on supplies it. Two shapes worth weighing (a design call for whoever picks it up):

  1. Give oc_droplet_evidence a third argument — an identity directory — defaulting to $run_dir/state so the rented and create-trap callers stay byte-for-byte unchanged, and have oc_device_evidence pass the standing home (${REHEARSAL_STANDING_DIR:-$root/test-results/standing-rented}/state, per scripts/lib/rehearsal-standing-lib.sh:39) for its gateway dial.
  2. Have the identity resolution fall back to the standing home when the run-dir key is absent — smaller, but couples the shared harvester to the standing fixture.

Either way the device dial should keep its current ambient-key behaviour (the member droplet is clan-lab-created and trusts the executor's own key — logs/device-journal.txt harvested 141 KB fine this run), and the host-key policy must stay untouched (ADR 0126).

Targeted check: bash scripts/tests/device-evidence-order-test.sh (which already asserts the gateway/device harvest split and the note: … unreachable markers) plus bash scripts/tests/droplet-evidence-order-test.sh for the unchanged default path. A new case should pin that the gateway dial offers an identity resolved from the STANDING home while the default/rented path still resolves under the run dir — the assertion that fails today.

drive 20260828T071107Z red at decline-resume: expect(locator).toBeVisible() failed Locator: locator('[data-field="pending-device"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6000
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T071107Z 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 `20260828T071107Z` (target `device`) all four gateway-side evidence files landed with nothing but a permission-denied line, on a box the same harvest proved was up: - `logs/gateway-journal.txt`: `root@168.144.175.167: Permission denied (publickey,keyboard-interactive)` + `note: gateway evidence gather failed (gateway unreachable?)` - `logs/gateway-stall.txt`, `logs/gateway-units.txt`: the same denial and their own `note: … harvest failed` markers - `logs/gateway-caddy.txt`: 137 bytes, same shape Meanwhile `logs/gateway-do-forensics.txt` records `tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did`, 0% ping loss, and the droplet `idss-gateway-rehearsal-c-24fa` (id 595821419) `active`, created 07:12:33Z **by this very drive** — `artifacts/standing-founded.json` shows it re-founded (`"ip": "168.144.175.167"`). The drive's own founding legs (`enroll-copy`, `enroll-activate`, `deploy`, `activation`) are all green in `artifacts/legs.json`, so the app half reached that box over SSH throughout. Only the harvest half was locked out. This is exactly the blindness class #894 and #926 exist to close, and it is not the red this drive died on — the drive red at `decline-resume` for an unrelated UI-navigation reason (healed at `c67a6925`). It is a separate defect that survives that heal. ## Evidence `oc_droplet_evidence` resolves the per-run identity the rented box trusts at `scripts/lib/rehearsal-droplet.sh:447`: ```sh local identity="$run_dir/state/rent-operator/id_ed25519" ``` and `oc_device_evidence` hands it the DRIVE run dir for the gateway box (`scripts/lib/rehearsal-droplet.sh:1353`): ```sh OC_E2E_DROPLET_IP="$gw_ip" oc_droplet_evidence "$run_dir" gateway ``` But a device drive launches the app on the STANDING home, not the per-run state dir (ADR 0208; `journey.device.spec.ts:276` — `launchApp({ stateDir: standingStateDir() })`), so the broker mints the rent-operator key into the standing home. Checked on the executor just now: ``` /home/swarm/swarm/Matou/idss/test-results/standing-rented/state/rent-operator/id_ed25519 # exists, 412 bytes, minted 07:12 by this drive /home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T071107Z/state/rent-operator/ # No such file or directory ``` The run's own logs corroborate that the standing home is the app's state dir: `logs/state-logs.log` reads `no state logs directory at /home/swarm/swarm/Matou/idss/test-results/standing-rented/state/logs`, and `logs/clan-config-snapshot.log` reads `source: /home/swarm/swarm/Matou/idss/test-results/standing-rented/state/clan-config`. The run dir's `state/` holds only the harvested `clan-config-snapshot/`. **Honest caveat on scope.** `artifacts/verdict.json` records this drive ran at `9ea7e9e8`, i.e. one commit BEFORE #926 (`6b3a3261`) landed — so this run's denial is not by itself proof that #926 fails. The proof is the path check above: #926's identity expression cannot resolve on the device drive no matter which commit runs it, because the key is never written under `$run_dir`. The next drive carries #926 and will still harvest four empty gateway files. ## Suspected layer The rehearsal harness's evidence layer — `scripts/lib/rehearsal-droplet.sh`, the identity resolution at :447 and the gateway call site at :1353. Not the app, not the product, not the box. `oc_rented_certs_worker` (`scripts/lib/rehearsal-droplet.sh:996`) uses the same `$run_dir/state/rent-operator/id_ed25519` expression, but it runs on the RENTED drive, whose run dir IS the app's state dir — so it is correct there. Only the device path's gateway dial has the two dirs diverge, which is why #926 reads correct and still misses. ## What plugging it needs Make the identity a resolved input rather than a `$run_dir`-derived guess, so the caller that knows which state home the app ran on supplies it. Two shapes worth weighing (a design call for whoever picks it up): 1. Give `oc_droplet_evidence` a third argument — an identity directory — defaulting to `$run_dir/state` so the rented and create-trap callers stay byte-for-byte unchanged, and have `oc_device_evidence` pass the standing home (`${REHEARSAL_STANDING_DIR:-$root/test-results/standing-rented}/state`, per `scripts/lib/rehearsal-standing-lib.sh:39`) for its gateway dial. 2. Have the identity resolution fall back to the standing home when the run-dir key is absent — smaller, but couples the shared harvester to the standing fixture. Either way the device dial should keep its current ambient-key behaviour (the member droplet is clan-lab-created and trusts the executor's own key — `logs/device-journal.txt` harvested 141 KB fine this run), and the host-key policy must stay untouched (ADR 0126). **Targeted check:** `bash scripts/tests/device-evidence-order-test.sh` (which already asserts the gateway/device harvest split and the `note: … unreachable` markers) plus `bash scripts/tests/droplet-evidence-order-test.sh` for the unchanged default path. A new case should pin that the gateway dial offers an identity resolved from the STANDING home while the default/rented path still resolves under the run dir — the assertion that fails today. drive `20260828T071107Z` red at `decline-resume`: `expect(locator).toBeVisible() failed Locator: locator('[data-field="pending-device"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 6000` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T071107Z` 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=13122
(automated multi-host claim — lowest live claim id works this ticket)

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

close-report for #933 — status success

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

envelope
{
  "issue": 933,
  "status": "success",
  "commits": [
    "87ce3343b7325ab1db71eb6cbf35b2004608208d"
  ],
  "changed_files": [
    "scripts/lib/rehearsal-droplet.sh",
    "scripts/tests/device-evidence-order-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/device-evidence-order-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/droplet-evidence-order-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "gateway dial offers an identity resolved from the STANDING home": "scripts/lib/rehearsal-droplet.sh oc_device_evidence passes $standing_dir/state to oc_droplet_evidence's new 3rd arg; device-evidence-order-test.sh case 5b asserts -i <standing>/state/rent-operator/id_ed25519 and fails on the pre-fix run-dir resolution (red->green verified)",
    "default/rented path still resolves under the run dir": "identity_dir defaults to $run_dir/state; droplet-evidence-order-test.sh (5 checks) and device-evidence-order-test.sh case 5 pass unchanged",
    "device dial keeps ambient-key behaviour": "device-evidence-order-test.sh case 5c asserts the device dial adds no -i",
    "host-key policy untouched (ADR 0126)": "no StrictHostKeyChecking/known_hosts changes in the diff"
  },
  "summary": "Threaded a standing-home identity dir into oc_droplet_evidence's device gateway dial so the broker-minted rent-operator key resolves where the app actually wrote it.",
  "blockers": []
}
**close-report** for #933 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 933, "status": "success", "commits": [ "87ce3343b7325ab1db71eb6cbf35b2004608208d" ], "changed_files": [ "scripts/lib/rehearsal-droplet.sh", "scripts/tests/device-evidence-order-test.sh" ], "tests": [ { "command": "bash scripts/tests/device-evidence-order-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/droplet-evidence-order-test.sh", "exit_code": 0 } ], "criteria": { "gateway dial offers an identity resolved from the STANDING home": "scripts/lib/rehearsal-droplet.sh oc_device_evidence passes $standing_dir/state to oc_droplet_evidence's new 3rd arg; device-evidence-order-test.sh case 5b asserts -i <standing>/state/rent-operator/id_ed25519 and fails on the pre-fix run-dir resolution (red->green verified)", "default/rented path still resolves under the run dir": "identity_dir defaults to $run_dir/state; droplet-evidence-order-test.sh (5 checks) and device-evidence-order-test.sh case 5 pass unchanged", "device dial keeps ambient-key behaviour": "device-evidence-order-test.sh case 5c asserts the device dial adds no -i", "host-key policy untouched (ADR 0126)": "no StrictHostKeyChecking/known_hosts changes in the diff" }, "summary": "Threaded a standing-home identity dir into oc_droplet_evidence's device gateway dial so the broker-minted rent-operator key resolves where the app actually wrote it.", "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#933
No description provided.