rehearsal-5 task 12/13: Executor target --target device + standing preflight wiring #853

Closed
opened 2026-08-25 20:14:52 +00:00 by ben · 3 comments
Owner

Part of the #183 phase-5 rehearsal arc (device-add + Nextcloud-on-device on a standing rented community).

  • Spec: docs/superpowers/specs/2026-08-25-183-phase-5-device-nextcloud-rehearsal-design.md
  • Plan: docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md — this ticket is Task 12, carried verbatim below. The plan's Global Constraints apply to every step.

Task 12: Executor target --target device + standing preflight wiring

Files:

  • Modify: scripts/smoke-private-path.sh (accept device in the target case + uses_droplet_machinery; device preflight: oc_standing_staleness decides re-found (export OC_STANDING_REFOUND=1 for the spec) — stale → oc_standing_teardown first; oc_device_create before playwright; after the drive: on a re-found drive read $run_dir/artifacts/standing-founded.json ({slug, host, ip, sha}, written by the spec's standing leg) → oc_standing_facts_write, then oc_device_teardown; NEVER oc_droplet_create, NEVER release the standing box on red)
  • Modify: scripts/rehearsal-cycle.sh (.env.example documents REHEARSAL_DRIVE_TARGET=device + REHEARSAL_STANDING_DIR)
  • Create: scripts/tests/rehearsal-device-target-test.sh (offline: arg parsing accepts device; stale verdict tears down + re-arms; red path tears down the DEVICE only; fake doctl/curl/git)
  • Modify: docs/GOTCHAS.md (append: the standing gateway is governed by its lease alone — never hand-tag it idss-rental-hold; a wedged standing slug is recycled via oc_standing_teardown, never force-released)
  • Modify: docs/operator-app/rehearsal-drive.md (a "standing community" section: home, staleness, renewal, recycle ritual)
  • Modify: STATUS.md

Interfaces:

  • Consumes: Task 8's lib; Task 9's carrier; Task 11's spec (journey.device.spec.ts — the drive_spec="journey.$target.spec.ts" derivation makes the name free); run dir test-results/drive-device/<stamp>/.

  • Produces: REHEARSAL_DRIVE_TARGET=device drives the phase-5 journey end to end from a cron tick.

  • Step 1: Write the failing offline test → run → FAIL.

  • Step 2: Implement the script edits.

  • Step 3: Run the new test + the WHOLE scripts/tests/*.sh suite → PASS (no regression for droplet/selfhosted/rented).

  • Step 4: Commit — git commit -m "rehearsal-5: executor target device — standing preflight, device carrier lifecycle (task 12 of #<ticket>)".


Global Constraints (from the plan)

  • Nothing fabricated (ADR 0100): every landed fact is read from the box; a
    failure is a named error, never a masked success. No sandbox-green claim (#377).
  • The wipe consent is given at the machine (ADR 0024) and shown-not-re-asked
    at P4-S3x; the takeover runs at provisioning's first deploy, never at join.
  • One placement deploy = device closure + gateway route in one config-repo
    commit, then two single-node clan.Deploy calls, device first (ruling: a
    route to a dead service is the honest failure, a service with no route is
    invisible).
  • Standing community: home test-results/standing-rented/; staleness gate =
    oc_bootstrap_staleness pattern over agent/ go.mod go.sum internal/; the
    reaper stays honest — renewal, not exemption (idss-rental-hold is for
    humans, the executor never sets it).
  • Do not destabilize live drives: #720 (rented confirm loop, elitebook) and
    #721/#722 (workstation) keep running; the prefix extraction (Task 10) is
    behavior-preserving and #720 must stay green across it. Never touch the
    executors' env files from a ticket.
  • Tracker gotcha: labels via POST/DELETE /issues/<n>/labels, never in an
    issue PATCH. "closes #NNN" in commit messages auto-closes — say "task N of
    #NNN" instead.
  • ADR numbers: 0207/0208/0209 assumed — re-check git ls-tree origin/main docs/adr/
    at mint (IDIP + observability swarm lanes are minting concurrently).
  • STATUS.md updated in the same commit as any project-state change;
    git pull --rebase immediately before a STATUS commit (shared checkout).
  • Go: gofmt, go vet ./..., go test ./... green; TS: pnpm -r typecheck +
    unit suites green, pre-land.
Part of the **#183 phase-5 rehearsal arc** (device-add + Nextcloud-on-device on a standing rented community). - Spec: `docs/superpowers/specs/2026-08-25-183-phase-5-device-nextcloud-rehearsal-design.md` - Plan: `docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md` — this ticket is **Task 12**, carried verbatim below. The plan's Global Constraints apply to every step. --- ### Task 12: Executor target `--target device` + standing preflight wiring **Files:** - Modify: `scripts/smoke-private-path.sh` (accept `device` in the target case + `uses_droplet_machinery`; device preflight: `oc_standing_staleness` decides re-found (export `OC_STANDING_REFOUND=1` for the spec) — stale → `oc_standing_teardown` first; `oc_device_create` before playwright; after the drive: on a re-found drive read `$run_dir/artifacts/standing-founded.json` (`{slug, host, ip, sha}`, written by the spec's `standing` leg) → `oc_standing_facts_write`, then `oc_device_teardown`; NEVER `oc_droplet_create`, NEVER release the standing box on red) - Modify: `scripts/rehearsal-cycle.sh` (`.env.example` documents `REHEARSAL_DRIVE_TARGET=device` + `REHEARSAL_STANDING_DIR`) - Create: `scripts/tests/rehearsal-device-target-test.sh` (offline: arg parsing accepts `device`; stale verdict tears down + re-arms; red path tears down the DEVICE only; fake doctl/curl/git) - Modify: `docs/GOTCHAS.md` (append: the standing gateway is governed by its lease alone — never hand-tag it `idss-rental-hold`; a wedged standing slug is recycled via `oc_standing_teardown`, never force-released) - Modify: `docs/operator-app/rehearsal-drive.md` (a "standing community" section: home, staleness, renewal, recycle ritual) - Modify: `STATUS.md` **Interfaces:** - Consumes: Task 8's lib; Task 9's carrier; Task 11's spec (`journey.device.spec.ts` — the `drive_spec="journey.$target.spec.ts"` derivation makes the name free); run dir `test-results/drive-device/<stamp>/`. - Produces: `REHEARSAL_DRIVE_TARGET=device` drives the phase-5 journey end to end from a cron tick. - [ ] **Step 1: Write the failing offline test** → run → FAIL. - [ ] **Step 2: Implement** the script edits. - [ ] **Step 3: Run** the new test + the WHOLE `scripts/tests/*.sh` suite → PASS (no regression for `droplet`/`selfhosted`/`rented`). - [ ] **Step 4: Commit** — `git commit -m "rehearsal-5: executor target device — standing preflight, device carrier lifecycle (task 12 of #<ticket>)"`. --- ## Global Constraints (from the plan) - **Nothing fabricated (ADR 0100):** every landed fact is read from the box; a failure is a named error, never a masked success. No sandbox-green claim (#377). - **The wipe consent is given at the machine (ADR 0024)** and shown-not-re-asked at P4-S3x; the takeover runs at provisioning's first deploy, never at join. - **One placement deploy = device closure + gateway route** in one config-repo commit, then two single-node `clan.Deploy` calls, device first (ruling: a route to a dead service is the honest failure, a service with no route is invisible). - **Standing community:** home `test-results/standing-rented/`; staleness gate = `oc_bootstrap_staleness` pattern over `agent/ go.mod go.sum internal/`; the reaper stays honest — renewal, not exemption (`idss-rental-hold` is for humans, the executor never sets it). - **Do not destabilize live drives:** #720 (rented confirm loop, elitebook) and #721/#722 (workstation) keep running; the prefix extraction (Task 10) is behavior-preserving and #720 must stay green across it. Never touch the executors' env files from a ticket. - **Tracker gotcha:** labels via `POST/DELETE /issues/<n>/labels`, never in an issue PATCH. "closes #NNN" in commit messages auto-closes — say "task N of #NNN" instead. - **ADR numbers:** 0207/0208/0209 assumed — re-check `git ls-tree origin/main docs/adr/` at mint (IDIP + observability swarm lanes are minting concurrently). - **STATUS.md** updated in the same commit as any project-state change; `git pull --rebase` immediately before a STATUS commit (shared checkout). - Go: `gofmt`, `go vet ./...`, `go test ./...` green; TS: `pnpm -r typecheck` + unit suites green, pre-land.

ADR numbers ruled at mint — read 0207 → 0208, 0208 → 0209, 0209 → 0210

Task 1 (#842) has landed the phase-5 design tier. This ticket's body carries the
plan's assumed ADR numbers; they shifted by one at mint, exactly as the
Global Constraints line in your body told you to re-check.

assumed ruled ADR
0207 0208 the standing rehearsal community — staleness-gated re-found
0208 0209 device-add's landing goes live — mesh fact, fleet admission, /get
0209 0210 files on a member device — composition, OIDC split, mesh route

Why: docs/adr/0207-design-keri-stack-version-pins.md (#771, the concurrent
IDIP lane) had taken 0207 on origin/main before this arc minted.

Use the ruled numbers in your commit messages and code comments. The plan
(docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md)
is updated and records the mapping; commit 70a3bce6.

Ruled by agent under ADR 0174 — veto anytime.

## ADR numbers ruled at mint — read 0207 → 0208, 0208 → 0209, 0209 → 0210 Task 1 (#842) has landed the phase-5 design tier. This ticket's body carries the plan's **assumed** ADR numbers; they shifted by one at mint, exactly as the Global Constraints line in your body told you to re-check. | assumed | **ruled** | ADR | |---|---|---| | 0207 | **0208** | the standing rehearsal community — staleness-gated re-found | | 0208 | **0209** | device-add's landing goes live — mesh fact, fleet admission, `/get` | | 0209 | **0210** | files on a member device — composition, OIDC split, mesh route | Why: `docs/adr/0207-design-keri-stack-version-pins.md` (#771, the concurrent IDIP lane) had taken 0207 on `origin/main` before this arc minted. Use the **ruled** numbers in your commit messages and code comments. The plan (`docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md`) is updated and records the mapping; commit `70a3bce6`. Ruled by agent under ADR 0174 — veto anytime.

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

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

close-report for #853 — status success

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

envelope
{
  "issue": 853,
  "status": "success",
  "commits": [
    "7ac90c37e4323efbed254f0e49027a9671bb8dcd"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "docs/operator-app/rehearsal-drive.md",
    "scripts/rehearsal-cycle.sh",
    "scripts/smoke-private-path.sh",
    "scripts/tests/rehearsal-device-target-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/rehearsal-device-target-test.sh",
      "exit_code": 0
    },
    {
      "command": "for t in scripts/tests/*.sh; do bash $t; done",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/smoke-private-path.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/rehearsal-cycle.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: failing offline test written then run": "scripts/tests/rehearsal-device-target-test.sh (11 checks: arg parse accepts device, stale/absent verdict re-founds + re-arms, red path tears down the DEVICE only, smoke wiring)",
    "Step 2: implement the script edits": "smoke-private-path.sh: device in target case + uses_droplet_machinery, sources rehearsal-standing-lib.sh, oc_standing_staleness preflight → OC_STANDING_REFOUND, deferred oc_standing_teardown past dry-run gate, oc_device_create (never oc_droplet_create), post-drive standing-founded.json → oc_standing_facts_write + oc_device_teardown; rehearsal-cycle.sh documents REHEARSAL_DRIVE_TARGET=device + REHEARSAL_STANDING_DIR",
    "Step 3: new test + whole scripts/tests suite green, no droplet/selfhosted/rented regression": "all 23 scripts/tests/*.sh PASS including rehearsal-rented-target-test.sh and rehearsal-standing-test.sh",
    "GOTCHAS append (lease-alone rule)": "docs/GOTCHAS.md #89 — never hand-tag idss-rental-hold, never force-release; recycle via oc_standing_teardown",
    "rehearsal-drive.md standing-community section": "docs/operator-app/rehearsal-drive.md — home, staleness, renewal, recycle ritual",
    "STATUS.md updated": "header line reflects #853 task 12/13 landed"
  },
  "summary": "Executor --target device wires the phase-5 standing-community preflight (staleness → adopt/re-found) and the member-device carrier lifecycle so REHEARSAL_DRIVE_TARGET=device drives journey.device.spec.ts end to end from a cron tick, never releasing the standing gateway.",
  "blockers": []
}
**close-report** for #853 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 853, "status": "success", "commits": [ "7ac90c37e4323efbed254f0e49027a9671bb8dcd" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "docs/operator-app/rehearsal-drive.md", "scripts/rehearsal-cycle.sh", "scripts/smoke-private-path.sh", "scripts/tests/rehearsal-device-target-test.sh" ], "tests": [ { "command": "bash scripts/tests/rehearsal-device-target-test.sh", "exit_code": 0 }, { "command": "for t in scripts/tests/*.sh; do bash $t; done", "exit_code": 0 }, { "command": "bash -n scripts/smoke-private-path.sh", "exit_code": 0 }, { "command": "bash -n scripts/rehearsal-cycle.sh", "exit_code": 0 } ], "criteria": { "Step 1: failing offline test written then run": "scripts/tests/rehearsal-device-target-test.sh (11 checks: arg parse accepts device, stale/absent verdict re-founds + re-arms, red path tears down the DEVICE only, smoke wiring)", "Step 2: implement the script edits": "smoke-private-path.sh: device in target case + uses_droplet_machinery, sources rehearsal-standing-lib.sh, oc_standing_staleness preflight → OC_STANDING_REFOUND, deferred oc_standing_teardown past dry-run gate, oc_device_create (never oc_droplet_create), post-drive standing-founded.json → oc_standing_facts_write + oc_device_teardown; rehearsal-cycle.sh documents REHEARSAL_DRIVE_TARGET=device + REHEARSAL_STANDING_DIR", "Step 3: new test + whole scripts/tests suite green, no droplet/selfhosted/rented regression": "all 23 scripts/tests/*.sh PASS including rehearsal-rented-target-test.sh and rehearsal-standing-test.sh", "GOTCHAS append (lease-alone rule)": "docs/GOTCHAS.md #89 — never hand-tag idss-rental-hold, never force-release; recycle via oc_standing_teardown", "rehearsal-drive.md standing-community section": "docs/operator-app/rehearsal-drive.md — home, staleness, renewal, recycle ritual", "STATUS.md updated": "header line reflects #853 task 12/13 landed" }, "summary": "Executor --target device wires the phase-5 standing-community preflight (staleness → adopt/re-found) and the member-device carrier lifecycle so REHEARSAL_DRIVE_TARGET=device drives journey.device.spec.ts end to end from a cron tick, never releasing the standing gateway.", "blockers": [] } ``` </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#853
No description provided.