phase-5 standing leg reds at once: runRentedPrefix starts at S4a but the device journey calls it on an app still at Welcome #884

Closed
opened 2026-08-27 03:26:06 +00:00 by ben · 3 comments
Owner

Failure

First phase-5 device drive, 20260826T220705Z on elitebook-03: RED at the first leg, 32 seconds end to end, 0 green / 2 red.

standing     red   page.click: Timeout 30000ms exceeded.
                   waiting for locator('[data-action="option:rented"]')
wizard-rent  red   (same)

artifacts/legs/wizard-rent.png shows why: the app is sitting on the Welcome screen — "Create a community / Join with a code". It never entered the founding wizard at all, so the S4 Access options never rendered and option:rented could not exist.

Root cause — the extracted prefix has an undeclared precondition

runRentedPrefix (app/tests/e2e/fixtures/rentedPrefix.ts:191) opens at "Leg 2: wizard-rent" and immediately calls s4aRent(live), whose first act is page.click('[data-action="option:rented"]'). It therefore requires the app to already stand on S4 Access. Nothing in its name, signature or doc comment says so.

journey.rented.spec.ts satisfies that silently, because it walks the whole wizard before ever reaching the prefix:

live = await bootToWelcome();
await welcomeToS1(live);  await s1ToS2(live);
await s2WithSlug(rentfailSlugForDrive);  await s3BrandKit(live);
// leg 1: rent-fails-clean → resetToAccessWithSlug(slug)  ← lands S4 Access
const prefix = await runRentedPrefix(live, slug, legRecords, writeLegRecords);   // leg 2+

journey.device.spec.ts:298 calls it cold, on an app launched moments earlier at journey.device.spec.ts:278 and still on Welcome:

const refound = process.env.OC_STANDING_REFOUND === '1';
if (refound) {
  const prefix = await runRentedPrefix(live, slug, legRecords, writeLegRecords);  // ← no wizard walk first

So #851's extraction was genuinely behaviour-preserving for its original caller, which kept its own leg 1 — but the contract that leg 1 was satisfying never travelled with the extracted function, and #852's new caller could not see it. The re-found branch has never run before today: every phase-4 drive entered the prefix through journey.rented.spec.ts.

Note both legs record the same error: standing wraps the prefix, so the prefix's wizard-rent failure surfaces twice. That is the recorded-legs design working (ruling 7), not a second defect.

Fix — make the precondition impossible to get wrong

Preferred: runRentedPrefix owns its own entry. Give it the wizard walk (welcomeToS1 → s1ToS2 → s2WithSlug(slug) → s3BrandKit → s3aIdentity) behind a flag or a small enterFrom parameter, so a caller that already stands on S4 Access passes 'access' and a cold caller passes 'welcome'. The device journey then cannot construct the broken call.

Minimum: assert the precondition and fail loud (ADR 0100) — the prefix checks [data-status="access"] is visible before its first click and throws a message naming what the caller must do, instead of decaying into a bare 30s locator timeout that reads like a UI regression. This is the same discipline #875 just applied to chatsvc.login (a front-door 200 is not the service's answer) and #802's fixture fix applied to the Fleet row.

Both are cheap; do the first, and the second falls out of it.

Note on the standing community

test-results/standing-rented/ does not exist yet, so the carrier correctly set OC_STANDING_REFOUND=1 — the re-found branch is the right branch. Nothing is stale; this is simply the first time it has ever executed. No droplet was rented (the drive died before wizard-rent could reach the broker), so there is no leaked reservation from this run.

Acceptance

  • The device drive's standing leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting.
  • A caller that enters runRentedPrefix on the wrong screen gets a named, loud failure rather than a locator timeout.
  • journey.rented.spec.ts keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged).

Evidence

test-results/drive-device/20260826T220705Z/ on elitebook-03 — artifacts/verdict.json, artifacts/legs.json, artifacts/legs/wizard-rent.png (the Welcome screen), report/.

Filed by the watch under ADR 0174 — the drive's own reporter could not file it (cap/limit), so #854 was flipped ready-for-human at 22:08Z. Veto anytime.

## Failure First phase-5 device drive, `20260826T220705Z` on `elitebook-03`: **RED at the first leg, 32 seconds end to end**, 0 green / 2 red. ``` standing red page.click: Timeout 30000ms exceeded. waiting for locator('[data-action="option:rented"]') wizard-rent red (same) ``` `artifacts/legs/wizard-rent.png` shows why: **the app is sitting on the Welcome screen** — "Create a community / Join with a code". It never entered the founding wizard at all, so the S4 Access options never rendered and `option:rented` could not exist. ## Root cause — the extracted prefix has an undeclared precondition `runRentedPrefix` (`app/tests/e2e/fixtures/rentedPrefix.ts:191`) opens at **"Leg 2: wizard-rent"** and immediately calls `s4aRent(live)`, whose first act is `page.click('[data-action="option:rented"]')`. It therefore **requires the app to already stand on S4 Access**. Nothing in its name, signature or doc comment says so. `journey.rented.spec.ts` satisfies that silently, because it walks the whole wizard before ever reaching the prefix: ```ts live = await bootToWelcome(); await welcomeToS1(live); await s1ToS2(live); await s2WithSlug(rentfailSlugForDrive); await s3BrandKit(live); // leg 1: rent-fails-clean → resetToAccessWithSlug(slug) ← lands S4 Access const prefix = await runRentedPrefix(live, slug, legRecords, writeLegRecords); // leg 2+ ``` `journey.device.spec.ts:298` calls it **cold**, on an app launched moments earlier at `journey.device.spec.ts:278` and still on Welcome: ```ts const refound = process.env.OC_STANDING_REFOUND === '1'; if (refound) { const prefix = await runRentedPrefix(live, slug, legRecords, writeLegRecords); // ← no wizard walk first ``` So #851's extraction was genuinely behaviour-preserving **for its original caller**, which kept its own leg 1 — but the contract that leg 1 was satisfying never travelled with the extracted function, and #852's new caller could not see it. The re-found branch has never run before today: every phase-4 drive entered the prefix through `journey.rented.spec.ts`. Note both legs record the same error: `standing` wraps the prefix, so the prefix's `wizard-rent` failure surfaces twice. That is the recorded-legs design working (ruling 7), not a second defect. ## Fix — make the precondition impossible to get wrong Preferred: **`runRentedPrefix` owns its own entry.** Give it the wizard walk (`welcomeToS1` → `s1ToS2` → `s2WithSlug(slug)` → `s3BrandKit` → `s3aIdentity`) behind a flag or a small `enterFrom` parameter, so a caller that already stands on S4 Access passes `'access'` and a cold caller passes `'welcome'`. The device journey then cannot construct the broken call. Minimum: **assert the precondition and fail loud** (ADR 0100) — the prefix checks `[data-status="access"]` is visible before its first click and throws a message naming what the caller must do, instead of decaying into a bare 30s locator timeout that reads like a UI regression. This is the same discipline #875 just applied to `chatsvc.login` (a front-door 200 is not the service's answer) and #802's fixture fix applied to the Fleet row. Both are cheap; do the first, and the second falls out of it. ## Note on the standing community `test-results/standing-rented/` does not exist yet, so the carrier correctly set `OC_STANDING_REFOUND=1` — the re-found branch is the right branch. Nothing is stale; this is simply the first time it has ever executed. No droplet was rented (the drive died before `wizard-rent` could reach the broker), so there is no leaked reservation from this run. ## Acceptance - The device drive's `standing` leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting. - A caller that enters `runRentedPrefix` on the wrong screen gets a named, loud failure rather than a locator timeout. - `journey.rented.spec.ts` keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged). ## Evidence `test-results/drive-device/20260826T220705Z/` on `elitebook-03` — `artifacts/verdict.json`, `artifacts/legs.json`, `artifacts/legs/wizard-rent.png` (the Welcome screen), `report/`. *Filed by the watch under ADR 0174 — the drive's own reporter could not file it (`cap/limit`), so #854 was flipped `ready-for-human` at 22:08Z. Veto anytime.*

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

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

close-report for #884 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit f979d57 is not reachable from origin/main (not landed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/rentedPrefix.test.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/rentedPrefix.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/wizard.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/journey.device.spec.ts' is not in the diff of the claimed commits
envelope
{
  "issue": 884,
  "status": "success",
  "commits": [
    "f979d57"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/rentedPrefix.test.ts",
    "app/tests/e2e/fixtures/rentedPrefix.ts",
    "app/tests/e2e/fixtures/wizard.ts",
    "app/tests/e2e/journey.device.spec.ts"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/e2e/fixtures/rentedPrefix.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/e2e/fixtures/",
      "exit_code": 0
    },
    {
      "command": "OC_E2E_SPEC=journey.device.spec.ts npx playwright test --config playwright.config.ts --list",
      "exit_code": 0
    },
    {
      "command": "OC_E2E_SPEC=journey.rented.spec.ts npx playwright test --config playwright.config.ts --list",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The device drive's standing leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting": "journey.device.spec.ts now calls runRentedPrefix(..., 'welcome'); the 'welcome' branch in rentedPrefix.ts walks welcomeToS1 -> s1ToS2 -> s2WithSlug -> s3BrandKit (lands S4 Access via s3aIdentity) before the wizard-rent leg's first option:rented click",
    "A caller that enters runRentedPrefix on the wrong screen gets a named, loud failure rather than a locator timeout": "the 'access' branch asserts live.page.locator('[data-status=\"access\"]') visible with a named message before the first rent click (ADR 0100); prefixNeedsWizardWalk throws loud on an unknown enterFrom — both proven offline in rentedPrefix.test.ts",
    "journey.rented.spec.ts keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged)": "the rented spec caller is untouched; enterFrom defaults to 'access' and the spec already stands on S4 Access (resetToAccessWithSlug) so the added assertion passes silently; playwright --list still shows one test; leg keys/CEILING/PAIR_FRONTIER unchanged"
  },
  "summary": "runRentedPrefix now owns its wizard entry via an enterFrom param so the phase-5 device journey's cold re-found call walks to S4 Access instead of red-ing at a bare option:rented timeout.",
  "blockers": []
}
**close-report** for #884 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit f979d57 is not reachable from origin/main (not landed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/rentedPrefix.test.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/rentedPrefix.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/wizard.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/journey.device.spec.ts' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 884, "status": "success", "commits": [ "f979d57" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/rentedPrefix.test.ts", "app/tests/e2e/fixtures/rentedPrefix.ts", "app/tests/e2e/fixtures/wizard.ts", "app/tests/e2e/journey.device.spec.ts" ], "tests": [ { "command": "npx vitest run tests/e2e/fixtures/rentedPrefix.test.ts", "exit_code": 0 }, { "command": "npx vitest run tests/e2e/fixtures/", "exit_code": 0 }, { "command": "OC_E2E_SPEC=journey.device.spec.ts npx playwright test --config playwright.config.ts --list", "exit_code": 0 }, { "command": "OC_E2E_SPEC=journey.rented.spec.ts npx playwright test --config playwright.config.ts --list", "exit_code": 0 } ], "criteria": { "The device drive's standing leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting": "journey.device.spec.ts now calls runRentedPrefix(..., 'welcome'); the 'welcome' branch in rentedPrefix.ts walks welcomeToS1 -> s1ToS2 -> s2WithSlug -> s3BrandKit (lands S4 Access via s3aIdentity) before the wizard-rent leg's first option:rented click", "A caller that enters runRentedPrefix on the wrong screen gets a named, loud failure rather than a locator timeout": "the 'access' branch asserts live.page.locator('[data-status=\"access\"]') visible with a named message before the first rent click (ADR 0100); prefixNeedsWizardWalk throws loud on an unknown enterFrom — both proven offline in rentedPrefix.test.ts", "journey.rented.spec.ts keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged)": "the rented spec caller is untouched; enterFrom defaults to 'access' and the spec already stands on S4 Access (resetToAccessWithSlug) so the added assertion passes silently; playwright --list still shows one test; leg keys/CEILING/PAIR_FRONTIER unchanged" }, "summary": "runRentedPrefix now owns its wizard entry via an enterFrom param so the phase-5 device journey's cold re-found call walks to S4 Access instead of red-ing at a bare option:rented timeout.", "blockers": [] } ``` </details>

close-report for #884 — status success

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

envelope
{
  "issue": 884,
  "status": "success",
  "commits": [
    "f979d57cecaf9521283c21cc92dfdd5716cf0113"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/rentedPrefix.test.ts",
    "app/tests/e2e/fixtures/rentedPrefix.ts",
    "app/tests/e2e/fixtures/wizard.ts",
    "app/tests/e2e/journey.device.spec.ts"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/e2e/fixtures/rentedPrefix.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/e2e/fixtures/",
      "exit_code": 0
    },
    {
      "command": "OC_E2E_SPEC=journey.device.spec.ts npx playwright test --config playwright.config.ts --list",
      "exit_code": 0
    },
    {
      "command": "OC_E2E_SPEC=journey.rented.spec.ts npx playwright test --config playwright.config.ts --list",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The device drive's standing leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting": "journey.device.spec.ts now calls runRentedPrefix(..., 'welcome'); the 'welcome' branch in rentedPrefix.ts walks welcomeToS1 -> s1ToS2 -> s2WithSlug -> s3BrandKit (lands S4 Access via s3aIdentity) before the wizard-rent leg's first option:rented click",
    "A caller that enters runRentedPrefix on the wrong screen gets a named, loud failure rather than a locator timeout": "the 'access' branch asserts live.page.locator('[data-status=\"access\"]') visible with a named message before the first rent click (ADR 0100); prefixNeedsWizardWalk throws loud on an unknown enterFrom — both proven offline in rentedPrefix.test.ts",
    "journey.rented.spec.ts keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged)": "the rented spec caller is untouched; enterFrom defaults to 'access' and the spec already stands on S4 Access (resetToAccessWithSlug) so the added assertion passes silently; playwright --list still shows one test; leg keys/CEILING/PAIR_FRONTIER unchanged"
  },
  "summary": "runRentedPrefix now owns its wizard entry via an enterFrom param so the phase-5 device journey's cold re-found call walks to S4 Access instead of red-ing at a bare option:rented timeout.",
  "blockers": []
}
**close-report** for #884 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 884, "status": "success", "commits": [ "f979d57cecaf9521283c21cc92dfdd5716cf0113" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/rentedPrefix.test.ts", "app/tests/e2e/fixtures/rentedPrefix.ts", "app/tests/e2e/fixtures/wizard.ts", "app/tests/e2e/journey.device.spec.ts" ], "tests": [ { "command": "npx vitest run tests/e2e/fixtures/rentedPrefix.test.ts", "exit_code": 0 }, { "command": "npx vitest run tests/e2e/fixtures/", "exit_code": 0 }, { "command": "OC_E2E_SPEC=journey.device.spec.ts npx playwright test --config playwright.config.ts --list", "exit_code": 0 }, { "command": "OC_E2E_SPEC=journey.rented.spec.ts npx playwright test --config playwright.config.ts --list", "exit_code": 0 } ], "criteria": { "The device drive's standing leg re-founds the standing community from a cold app launch, walking the wizard to S4 Access before renting": "journey.device.spec.ts now calls runRentedPrefix(..., 'welcome'); the 'welcome' branch in rentedPrefix.ts walks welcomeToS1 -> s1ToS2 -> s2WithSlug -> s3BrandKit (lands S4 Access via s3aIdentity) before the wizard-rent leg's first option:rented click", "A caller that enters runRentedPrefix on the wrong screen gets a named, loud failure rather than a locator timeout": "the 'access' branch asserts live.page.locator('[data-status=\"access\"]') visible with a named message before the first rent click (ADR 0100); prefixNeedsWizardWalk throws loud on an unknown enterFrom — both proven offline in rentedPrefix.test.ts", "journey.rented.spec.ts keeps its current behaviour byte-for-byte (its leg keys, budgets and assertions unchanged)": "the rented spec caller is untouched; enterFrom defaults to 'access' and the spec already stands on S4 Access (resetToAccessWithSlug) so the added assertion passes silently; playwright --list still shows one test; leg keys/CEILING/PAIR_FRONTIER unchanged" }, "summary": "runRentedPrefix now owns its wizard entry via an enterFrom param so the phase-5 device journey's cold re-found call walks to S4 Access instead of red-ing at a bare option:rented timeout.", "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#884
No description provided.