rehearsal-5 task 10/13: Rented-prefix extraction (behavior-preserving; #720 stays green) #851

Closed
opened 2026-08-25 20:14:47 +00:00 by ben · 2 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 10, carried verbatim below. The plan's Global Constraints apply to every step.

Task 10: Rented-prefix extraction (behavior-preserving; #720 stays green)

Files:

  • Create: app/tests/e2e/fixtures/rentedPrefix.ts
  • Modify: app/tests/e2e/journey.rented.spec.ts (consumes the fixture; leg keys, budgets, assertions byte-identical)
  • Modify: STATUS.md

Interfaces:

  • Consumes: the leg bodies currently inline in journey.rented.spec.ts legs wizard-rent → claim → create → image-boot → PAIR_FRONTIER → point → deploy → activation → founded (lines 416–660) — rent-fails-clean, heartbeat-repoint, release stay spec-local.

  • Produces:

    export interface RentedPrefixState { dropletIP: string; reservedHost: string; reservedSecret: string }
    export async function runRentedPrefix(
      live: LaunchedApp,
      slug: string,
      legRecords: LegRecord[],
      writeLegRecords: (r: LegRecord[]) => void,
    ): Promise<RentedPrefixState>
    

    Same leg keys, same ceilings (CEILING moves into the fixture and is re-exported to the spec), same readState()/foundingAddress secret capture.

  • Step 1: Extract — move the leg bodies verbatim; the spec's describe keeps its own state vars fed from the returned RentedPrefixState.

  • Step 2: Verify behavior-preserving — pnpm --filter app exec playwright test --list journey.rented.spec.ts lists one test; pnpm -r typecheck PASS; git diff shows NO leg-key, budget, or assertion string changed (review the diff for exactly this).

  • Step 3: Commit — git commit -m "rehearsal-5: extract the rented founding prefix into a fixture — journey.rented behavior-preserving (task 10 of #<ticket>)". Watch #720's next drive before building on this — a red here reverts first, asks questions second.


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 10**, carried verbatim below. The plan's Global Constraints apply to every step. --- ### Task 10: Rented-prefix extraction (behavior-preserving; #720 stays green) **Files:** - Create: `app/tests/e2e/fixtures/rentedPrefix.ts` - Modify: `app/tests/e2e/journey.rented.spec.ts` (consumes the fixture; leg keys, budgets, assertions byte-identical) - Modify: `STATUS.md` **Interfaces:** - Consumes: the leg bodies currently inline in `journey.rented.spec.ts` legs `wizard-rent → claim → create → image-boot → PAIR_FRONTIER → point → deploy → activation → founded` (lines 416–660) — `rent-fails-clean`, `heartbeat-repoint`, `release` stay spec-local. - Produces: ```ts export interface RentedPrefixState { dropletIP: string; reservedHost: string; reservedSecret: string } export async function runRentedPrefix( live: LaunchedApp, slug: string, legRecords: LegRecord[], writeLegRecords: (r: LegRecord[]) => void, ): Promise<RentedPrefixState> ``` Same leg keys, same ceilings (`CEILING` moves into the fixture and is re-exported to the spec), same `readState()`/`foundingAddress` secret capture. - [ ] **Step 1: Extract** — move the leg bodies verbatim; the spec's describe keeps its own state vars fed from the returned `RentedPrefixState`. - [ ] **Step 2: Verify behavior-preserving** — `pnpm --filter app exec playwright test --list journey.rented.spec.ts` lists one test; `pnpm -r typecheck` PASS; `git diff` shows NO leg-key, budget, or assertion string changed (review the diff for exactly this). - [ ] **Step 3: Commit** — `git commit -m "rehearsal-5: extract the rented founding prefix into a fixture — journey.rented behavior-preserving (task 10 of #<ticket>)"`. **Watch #720's next drive before building on this** — a red here reverts first, asks questions second. --- ## 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.

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

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

close-report for #851 — status success

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

envelope
{
  "issue": 851,
  "status": "success",
  "commits": [
    "84c34c86a1cfb667578c570071b3b0885e0e76c9"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/rentedPrefix.ts",
    "app/tests/e2e/journey.rented.spec.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "CI=true OC_E2E_RUN_DIR=/tmp/oc-e2e-list OC_E2E_SPEC=journey.rented.spec.ts pnpm --filter app exec playwright test --list",
      "exit_code": 0
    },
    {
      "command": "CI=true npx vitest run tests/e2e/fixtures (app)",
      "exit_code": 0
    },
    {
      "command": "CI=true npx eslint app/tests/e2e/fixtures/rentedPrefix.ts app/tests/e2e/journey.rented.spec.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1 — Extract: move the leg bodies verbatim; the spec's describe keeps its own state vars fed from the returned RentedPrefixState": "app/tests/e2e/fixtures/rentedPrefix.ts exports runRentedPrefix(live, slug, legRecords, writeLegRecords): Promise<RentedPrefixState> running legs wizard-rent→founded verbatim (whitespace-normalized diff of the moved bodies vs origin/main is empty); the spec assigns dropletIP/reservedHost/reservedSecret from the return value (commit 84c34c8).",
    "Interface — CEILING moves into the fixture and is re-exported to the spec; same readState()/foundingAddress secret capture": "CEILING is `export const` in rentedPrefix.ts and imported by the spec (heartbeat-repoint reads CEILING.heartbeatRepoint); digShort re-exported for the same leg; wizard-rent/claim keep the identical foundingAddress(await readState()) capture. CEILING+PAIR_FRONTIER diff vs origin/main is identical modulo the export keyword.",
    "Step 2 — Verify behavior-preserving: playwright --list lists one test; typecheck PASS; git diff shows NO leg-key, budget, or assertion string changed": "playwright --list = 'Total: 1 test in 1 file' (exit 0); tsc reports only the 4 pre-existing .vue-import errors that also exist on origin/main (my two files produce zero errors); leg-key set, CEILING/PAIR_FRONTIER, and assertion/selector token counts are byte-identical old-vs-new; fixture unit suite 113/113 green; eslint clean.",
    "Global constraint — #720 must stay green (behavior-preserving; do not leak the rental on a red)": "Signature unchanged (4 args); the reservation captured so far rides the thrown error (rentedPrefixCaptured) so the spec's afterAll release/offboard fires on a red exactly as the inline wizard-rent capture guaranteed (#671); the original error is rethrown unchanged so leg red messages and verdict.json stay byte-identical."
  },
  "summary": "Extracted the rented founding prefix (wizard-rent→founded) into app/tests/e2e/fixtures/rentedPrefix.ts, behaviour-preserving — leg keys, budgets and assertions byte-identical, one test listed, fixture suite green.",
  "blockers": []
}
**close-report** for #851 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 851, "status": "success", "commits": [ "84c34c86a1cfb667578c570071b3b0885e0e76c9" ], "changed_files": [ "app/tests/e2e/fixtures/rentedPrefix.ts", "app/tests/e2e/journey.rented.spec.ts", "STATUS.md" ], "tests": [ { "command": "CI=true OC_E2E_RUN_DIR=/tmp/oc-e2e-list OC_E2E_SPEC=journey.rented.spec.ts pnpm --filter app exec playwright test --list", "exit_code": 0 }, { "command": "CI=true npx vitest run tests/e2e/fixtures (app)", "exit_code": 0 }, { "command": "CI=true npx eslint app/tests/e2e/fixtures/rentedPrefix.ts app/tests/e2e/journey.rented.spec.ts", "exit_code": 0 } ], "criteria": { "Step 1 — Extract: move the leg bodies verbatim; the spec's describe keeps its own state vars fed from the returned RentedPrefixState": "app/tests/e2e/fixtures/rentedPrefix.ts exports runRentedPrefix(live, slug, legRecords, writeLegRecords): Promise<RentedPrefixState> running legs wizard-rent→founded verbatim (whitespace-normalized diff of the moved bodies vs origin/main is empty); the spec assigns dropletIP/reservedHost/reservedSecret from the return value (commit 84c34c8).", "Interface — CEILING moves into the fixture and is re-exported to the spec; same readState()/foundingAddress secret capture": "CEILING is `export const` in rentedPrefix.ts and imported by the spec (heartbeat-repoint reads CEILING.heartbeatRepoint); digShort re-exported for the same leg; wizard-rent/claim keep the identical foundingAddress(await readState()) capture. CEILING+PAIR_FRONTIER diff vs origin/main is identical modulo the export keyword.", "Step 2 — Verify behavior-preserving: playwright --list lists one test; typecheck PASS; git diff shows NO leg-key, budget, or assertion string changed": "playwright --list = 'Total: 1 test in 1 file' (exit 0); tsc reports only the 4 pre-existing .vue-import errors that also exist on origin/main (my two files produce zero errors); leg-key set, CEILING/PAIR_FRONTIER, and assertion/selector token counts are byte-identical old-vs-new; fixture unit suite 113/113 green; eslint clean.", "Global constraint — #720 must stay green (behavior-preserving; do not leak the rental on a red)": "Signature unchanged (4 args); the reservation captured so far rides the thrown error (rentedPrefixCaptured) so the spec's afterAll release/offboard fires on a red exactly as the inline wizard-rent capture guaranteed (#671); the original error is rethrown unchanged so leg red messages and verdict.json stay byte-identical." }, "summary": "Extracted the rented founding prefix (wizard-rent→founded) into app/tests/e2e/fixtures/rentedPrefix.ts, behaviour-preserving — leg keys, budgets and assertions byte-identical, one test listed, fixture suite green.", "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#851
No description provided.