e2e: provision-nextcloud.live.spec.ts rides every drive via testMatch '**/*.spec.ts' — shared state dir breaks it and it clobbers the first spec's evidence #376

Closed
opened 2026-08-09 21:11:59 +00:00 by ben · 1 comment
Owner

Found by the #183 rehearsal ratchet's Task-3 gate re-drive
(2026-08-09, run 20260809T205457Z), the first live drive after the T-arc
merge landed app/tests/e2e/provision-nextcloud.live.spec.ts (#359/#360
arc, T6).

app/playwright.config.ts matches **/*.spec.ts, so the drive now runs
BOTH live specs serially in one run directory and one --user-data-dir:

  1. The second spec's runFoundingPrefix boots the app expecting
    [data-status="welcome"] and times out — the state dir already holds the
    community the FIRST spec founded. It can never pass in this composition.
  2. Its afterAll evidence harvest then OVERWRITES the first spec's
    artifacts/journey.json with {"rows": null, "fault": null} — the
    first drive's leg-level verdict is destroyed (run 20260809T205457Z
    shows exactly this; the leg verdict survived only in error-context.md).
  3. fixtures/foundingPrefix.ts duplicates the wizard steps that
    fixtures/wizard.ts (commit 162b956, rehearsal plan Task 3) now owns —
    two copies of the same screen-driving code will drift.

Shape: each live drive is ONE spec per invocation — make the config's
testMatch an explicit selection (the rehearsal plan's Task 5 already makes
it target-keyed for private-path vs journey.droplet; the provision drive
needs its own named selection, e.g. an OC_E2E_SPEC env the smoke script
sets), and converge foundingPrefix.ts onto fixtures/wizard.ts so the
wizard steps live once.

Acceptance:

  • Given a default drive, when it runs, then exactly
    private-path.live.spec.ts executes
  • Given the provision drive's own invocation, when it runs, then exactly
    provision-nextcloud.live.spec.ts executes with a fresh state dir
  • Given any drive, when a spec's afterAll runs, then it can never
    overwrite another spec's artifacts
  • foundingPrefix.ts's wizard steps are imports from wizard.ts
Found by the #183 rehearsal ratchet's Task-3 gate re-drive (2026-08-09, run `20260809T205457Z`), the first live drive after the T-arc merge landed `app/tests/e2e/provision-nextcloud.live.spec.ts` (#359/#360 arc, T6). `app/playwright.config.ts` matches `**/*.spec.ts`, so the drive now runs BOTH live specs serially in one run directory and one `--user-data-dir`: 1. The second spec's `runFoundingPrefix` boots the app expecting `[data-status="welcome"]` and times out — the state dir already holds the community the FIRST spec founded. It can never pass in this composition. 2. Its `afterAll` evidence harvest then OVERWRITES the first spec's `artifacts/journey.json` with `{"rows": null, "fault": null}` — the first drive's leg-level verdict is destroyed (run `20260809T205457Z` shows exactly this; the leg verdict survived only in error-context.md). 3. `fixtures/foundingPrefix.ts` duplicates the wizard steps that `fixtures/wizard.ts` (commit 162b956, rehearsal plan Task 3) now owns — two copies of the same screen-driving code will drift. Shape: each live drive is ONE spec per invocation — make the config's `testMatch` an explicit selection (the rehearsal plan's Task 5 already makes it target-keyed for `private-path` vs `journey.droplet`; the provision drive needs its own named selection, e.g. an `OC_E2E_SPEC` env the smoke script sets), and converge `foundingPrefix.ts` onto `fixtures/wizard.ts` so the wizard steps live once. Acceptance: - [ ] Given a default drive, when it runs, then exactly `private-path.live.spec.ts` executes - [ ] Given the provision drive's own invocation, when it runs, then exactly `provision-nextcloud.live.spec.ts` executes with a fresh state dir - [ ] Given any drive, when a spec's afterAll runs, then it can never overwrite another spec's artifacts - [ ] `foundingPrefix.ts`'s wizard steps are imports from `wizard.ts`
Author
Owner

Fixed on main (commit 37feacd).

Root cause: app/playwright.config.ts matched **/*.spec.ts, so a drive ran BOTH live specs serially in one run dir / one --user-data-dir — the second booted onto the community the first founded (times out at [data-status="welcome"]) and its afterAll clobbered the first spec's artifacts/journey.json.

Fix — one spec per invocation:

  • playwright.config.ts testMatch now reads OC_E2E_SPEC (default private-path.live.spec.ts), never a glob. Two specs can no longer land in one run, so no afterAll can overwrite another spec's artifacts (AC3, structural).
  • scripts/smoke-private-path.sh --drive founding|nextcloud sets OC_E2E_SPEC (default founding); the all option is gone. Default drive runs exactly private-path.live.spec.ts (AC1); the provision drive runs its own invocation with a fresh run/state dir (AC2).
  • fixtures/foundingPrefix.ts now imports the wizard's screen-driving steps (welcomeToS1→s3BrandKit, reviewAndCreate) and LOGO_FIXTURE_PNG/E2E_GREETING from fixtures/wizard.ts — the duplicated bodies live once (AC4). boot-to-welcome + S4-private stay inline (launch is spec-owned for afterAll evidence; S4-private is founding-specific).
  • docs/operator-app/build-and-run.md usage drops |all.

Evidence: playwright test --list shows exactly private-path by default and exactly provision-nextcloud under OC_E2E_SPEC; tsc --noEmit adds no new errors; bash -n clean.

Fixed on main (commit 37feacd). **Root cause**: `app/playwright.config.ts` matched `**/*.spec.ts`, so a drive ran BOTH live specs serially in one run dir / one `--user-data-dir` — the second booted onto the community the first founded (times out at `[data-status="welcome"]`) and its afterAll clobbered the first spec's `artifacts/journey.json`. **Fix — one spec per invocation:** - `playwright.config.ts` `testMatch` now reads `OC_E2E_SPEC` (default `private-path.live.spec.ts`), never a glob. Two specs can no longer land in one run, so no afterAll can overwrite another spec's artifacts (AC3, structural). - `scripts/smoke-private-path.sh` `--drive founding|nextcloud` sets `OC_E2E_SPEC` (default `founding`); the `all` option is gone. Default drive runs exactly `private-path.live.spec.ts` (AC1); the provision drive runs its own invocation with a fresh run/state dir (AC2). - `fixtures/foundingPrefix.ts` now imports the wizard's screen-driving steps (`welcomeToS1`→`s3BrandKit`, `reviewAndCreate`) and `LOGO_FIXTURE_PNG`/`E2E_GREETING` from `fixtures/wizard.ts` — the duplicated bodies live once (AC4). boot-to-welcome + S4-private stay inline (launch is spec-owned for afterAll evidence; S4-private is founding-specific). - `docs/operator-app/build-and-run.md` usage drops `|all`. **Evidence**: `playwright test --list` shows exactly `private-path` by default and exactly `provision-nextcloud` under `OC_E2E_SPEC`; `tsc --noEmit` adds no new errors; `bash -n` clean.
ben closed this issue 2026-08-09 21:42:59 +00:00
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.

Dependencies

No dependencies set.

Reference
Matou/idss#376
No description provided.