rehearsal-5 task 9/13: Executor renewal + reaper wall re-rule + device carrier #850

Closed
opened 2026-08-25 20:14:45 +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 9, carried verbatim below. The plan's Global Constraints apply to every step.

Task 9: Executor renewal + reaper wall re-rule + device carrier

Files:

  • Modify: scripts/rehearsal-executor.sh (each tick: [ -d "$OC_STANDING_DIR" ] && oc_standing_renew)
  • Modify: scripts/rental-reap.sh (wall destroys only lease-less boxes; a future idss-rental-expires-* tag governs alone), scripts/tests/rental-reap-test.sh
  • Modify: broker/internal/broker/rentals.go (+ test): Renew re-tags the provider droplet's idss-rental-expires-<epoch> (verify first — #723 may already do it; the test pins it either way)
  • Modify: scripts/lib/rehearsal-droplet.sh — oc_device_create / oc_device_teardown (clone the oc_droplet_create shape at :346: clan-lab create --purpose rehearsal --fresh --ttl 6 --size s-2vcpu-4gb, exports OC_E2E_DEVICE_IP, bounded SSH wait; teardown deletes by id and never touches the standing gateway)
  • Modify: STATUS.md

Interfaces:

  • Consumes: Task 8's oc_standing_renew; rental-reap.sh constants (RENTAL_TAG, EXPIRES_PREFIX, WALL_HOURS, DRIVE_NAME_PREFIX); clan-lab's create/reap contract (device droplets stay clan-lab-reapable — GOTCHAS #48's split does not grow).

  • Produces: OC_E2E_DEVICE_IP exported for the journey; the standing gateway survives as long as the executor renews (lease tags keep advancing) and lapses honestly when it stops; drive-wall behavior for lease-less drive boxes unchanged (pin with a regression case in the reap test).

  • Step 1: Extend the reap offline test (failing): a box with a future expires tag older than the wall SURVIVES; a lease-less idss-gateway-rehearsal-* box older than the wall is destroyed (today's behavior, kept); a lapsed lease is destroyed (kept).

  • Step 2: Run bash scripts/tests/rental-reap-test.sh → FAIL; implement; → PASS.

  • Step 3: Broker renew re-tag — read rentals.go/#723's landing; write the failing test TestRenew_AdvancesProviderExpiresTag against the fake provider (grow Provider with Retag(ctx, id string, tags []string) error if absent); implement; cd broker && go test ./... → PASS.

  • Step 4: oc_device_create/teardown + executor tick line; bash -n both; extend scripts/tests/rehearsal-rented-target-test.sh's pattern with a device-carrier offline test (fake clan-lab).

  • Step 5: Commit — git commit -m "rehearsal-5: standing lease renewal + wall re-rule + device droplet carrier (ADR 0207/0209) (task 9 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 9**, carried verbatim below. The plan's Global Constraints apply to every step. --- ### Task 9: Executor renewal + reaper wall re-rule + device carrier **Files:** - Modify: `scripts/rehearsal-executor.sh` (each tick: `[ -d "$OC_STANDING_DIR" ] && oc_standing_renew`) - Modify: `scripts/rental-reap.sh` (wall destroys only lease-less boxes; a future `idss-rental-expires-*` tag governs alone), `scripts/tests/rental-reap-test.sh` - Modify: `broker/internal/broker/rentals.go` (+ test): `Renew` re-tags the provider droplet's `idss-rental-expires-<epoch>` (verify first — #723 may already do it; the test pins it either way) - Modify: `scripts/lib/rehearsal-droplet.sh` — `oc_device_create` / `oc_device_teardown` (clone the `oc_droplet_create` shape at `:346`: `clan-lab create --purpose rehearsal --fresh --ttl 6 --size s-2vcpu-4gb`, exports `OC_E2E_DEVICE_IP`, bounded SSH wait; teardown deletes by id and never touches the standing gateway) - Modify: `STATUS.md` **Interfaces:** - Consumes: Task 8's `oc_standing_renew`; `rental-reap.sh` constants (`RENTAL_TAG`, `EXPIRES_PREFIX`, `WALL_HOURS`, `DRIVE_NAME_PREFIX`); clan-lab's create/reap contract (device droplets stay clan-lab-reapable — GOTCHAS #48's split does not grow). - Produces: `OC_E2E_DEVICE_IP` exported for the journey; the standing gateway survives as long as the executor renews (lease tags keep advancing) and lapses honestly when it stops; drive-wall behavior for lease-less drive boxes unchanged (pin with a regression case in the reap test). - [ ] **Step 1: Extend the reap offline test** (failing): a box with a future expires tag older than the wall SURVIVES; a lease-less `idss-gateway-rehearsal-*` box older than the wall is destroyed (today's behavior, kept); a lapsed lease is destroyed (kept). - [ ] **Step 2: Run** `bash scripts/tests/rental-reap-test.sh` → FAIL; **implement**; → PASS. - [ ] **Step 3: Broker renew re-tag** — read `rentals.go`/#723's landing; write the failing test `TestRenew_AdvancesProviderExpiresTag` against the fake provider (grow `Provider` with `Retag(ctx, id string, tags []string) error` if absent); implement; `cd broker && go test ./...` → PASS. - [ ] **Step 4: `oc_device_create`/teardown** + executor tick line; `bash -n` both; extend `scripts/tests/rehearsal-rented-target-test.sh`'s pattern with a device-carrier offline test (fake clan-lab). - [ ] **Step 5: Commit** — `git commit -m "rehearsal-5: standing lease renewal + wall re-rule + device droplet carrier (ADR 0207/0209) (task 9 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=10098
(automated multi-host claim — lowest live claim id works this ticket)

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

close-report for #850 — status success

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

envelope
{
  "issue": 850,
  "status": "success",
  "commits": [
    "bfd7b76"
  ],
  "changed_files": [
    "scripts/rehearsal-executor.sh",
    "scripts/rental-reap.sh",
    "scripts/tests/rental-reap-test.sh",
    "broker/internal/broker/rentals_expiry_test.go",
    "scripts/lib/rehearsal-droplet.sh",
    "scripts/tests/rehearsal-rented-target-test.sh",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/rental-reap-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-rented-target-test.sh",
      "exit_code": 0
    },
    {
      "command": "cd broker && go test ./...",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/rehearsal-executor.sh scripts/lib/rehearsal-droplet.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1: reap test grows the leased-but-old-survives case (failing), lease-less-past-wall destroyed kept, lapsed-lease destroyed kept": "scripts/tests/rental-reap-test.sh test 4b (leased-but-old drive box SURVIVES) added; tests 1 (lapsed lease destroyed) and 3 (lease-less past-wall destroyed) unchanged; proven red on old rental-reap.sh via git stash, green after",
    "Step 2: rental-reap-test.sh FAIL then PASS after implementing the wall re-rule": "rental-reap.sh drive-box branch re-ruled to lease-less backstop (ADR 0210 ruling 7); rental-reap-test.sh 14/14 passed (commit bfd7b76)",
    "Step 3: broker Renew re-tags provider expires tag; TestRenew_AdvancesProviderExpiresTag pins it": "Renew already re-tags (#723, rentals.go:367); TestRenew_AdvancesProviderExpiresTag added in rentals_expiry_test.go asserts the added epoch > removed epoch == ledger deadline; go test ./... green",
    "Step 4: oc_device_create/teardown + executor tick line; bash -n both; device-carrier offline test (fake clan-lab)": "oc_device_create/oc_device_teardown appended to rehearsal-droplet.sh (clan-lab --fresh --ttl 6 --size s-2vcpu-4gb, exports OC_E2E_DEVICE_IP, bounded SSH wait, teardown by name via clan-lab guardrail); executor tick line [ -d $OC_STANDING_DIR ] && oc_standing_renew added; bash -n both green; rehearsal-rented-target-test.sh grows tests 22-24 (device carrier), 24 checks passed",
    "Global: Go gofmt/vet/test green": "pre-push gate ran gofmt + go build/vet/test + golangci-lint on root and broker (via GATE_GO_CMD, the sanctioned override) — all green; push landed f2f123d..bfd7b76",
    "Global: STATUS.md updated same commit": "STATUS.md #850 marked LANDED in the phase-5 arc tracker in commit bfd7b76"
  },
  "summary": "Standing lease renewed each executor tick, the reaper wall re-ruled to a lease-less backstop (ADR 0210 ruling 7), broker Renew's advancing expires-tag pinned, and a clan-lab-reapable member-device carrier added.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #850 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 850, "status": "success", "commits": [ "bfd7b76" ], "changed_files": [ "scripts/rehearsal-executor.sh", "scripts/rental-reap.sh", "scripts/tests/rental-reap-test.sh", "broker/internal/broker/rentals_expiry_test.go", "scripts/lib/rehearsal-droplet.sh", "scripts/tests/rehearsal-rented-target-test.sh", "STATUS.md" ], "tests": [ { "command": "bash scripts/tests/rental-reap-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-rented-target-test.sh", "exit_code": 0 }, { "command": "cd broker && go test ./...", "exit_code": 0 }, { "command": "bash -n scripts/rehearsal-executor.sh scripts/lib/rehearsal-droplet.sh", "exit_code": 0 } ], "criteria": { "Step 1: reap test grows the leased-but-old-survives case (failing), lease-less-past-wall destroyed kept, lapsed-lease destroyed kept": "scripts/tests/rental-reap-test.sh test 4b (leased-but-old drive box SURVIVES) added; tests 1 (lapsed lease destroyed) and 3 (lease-less past-wall destroyed) unchanged; proven red on old rental-reap.sh via git stash, green after", "Step 2: rental-reap-test.sh FAIL then PASS after implementing the wall re-rule": "rental-reap.sh drive-box branch re-ruled to lease-less backstop (ADR 0210 ruling 7); rental-reap-test.sh 14/14 passed (commit bfd7b76)", "Step 3: broker Renew re-tags provider expires tag; TestRenew_AdvancesProviderExpiresTag pins it": "Renew already re-tags (#723, rentals.go:367); TestRenew_AdvancesProviderExpiresTag added in rentals_expiry_test.go asserts the added epoch > removed epoch == ledger deadline; go test ./... green", "Step 4: oc_device_create/teardown + executor tick line; bash -n both; device-carrier offline test (fake clan-lab)": "oc_device_create/oc_device_teardown appended to rehearsal-droplet.sh (clan-lab --fresh --ttl 6 --size s-2vcpu-4gb, exports OC_E2E_DEVICE_IP, bounded SSH wait, teardown by name via clan-lab guardrail); executor tick line [ -d $OC_STANDING_DIR ] && oc_standing_renew added; bash -n both green; rehearsal-rented-target-test.sh grows tests 22-24 (device carrier), 24 checks passed", "Global: Go gofmt/vet/test green": "pre-push gate ran gofmt + go build/vet/test + golangci-lint on root and broker (via GATE_GO_CMD, the sanctioned override) — all green; push landed f2f123d..bfd7b76", "Global: STATUS.md updated same commit": "STATUS.md #850 marked LANDED in the phase-5 arc tracker in commit bfd7b76" }, "summary": "Standing lease renewed each executor tick, the reaper wall re-ruled to a lease-less backstop (ADR 0210 ruling 7), broker Renew's advancing expires-tag pinned, and a clan-lab-reapable member-device carrier added.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#850
No description provided.