[GH-ISSUE #6304] [Issue]: Mobile WebKit intermittently stalls reloading wizard defaults with canceled module imports #3518

Closed
opened 2026-10-21 06:03:53 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolacheee on GitHub (Sep 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6304

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Suspected intermittent mobile WebKit reload race in e2e/issue-sweep-defaults.e2e.ts:164: “roleplay wizard defaults save, survive reload, and reset without profiles (dark)”. Reloading immediately after closing setup cancels pending Chat Settings module imports, leaves the old page showing the app recovery boundary, and times out. This produces both a failed shard and a failed aggregate check.

Expected behavior

The reload completes and the test verifies saved defaults and reset behavior without an import-error recovery screen.

Actual behavior

On PR #6302 at 0de3b240c4260d4d7ac3b24df995823f938628c2, the initial save completes, but page.reload() at line 256 hangs for the remaining approximately 43.5 seconds of the 60-second test budget. The trace shows pending /src/features/chat-settings/... and related module requests canceled at reload, followed by TypeError: Importing a module script failed in the lazy component under ChatCommonOverlays. The subsequent cleanup request fails because the request context is already closed; that cleanup error masks the primary navigation timeout in the job summary.

104 tests passed, one failed, and two were skipped in this shard. This test passed on the previous PR run (23.5 seconds), on current staging (29.1 seconds), and its light-theme counterpart passed in the failing run (28.7 seconds). The test, ChatSetupWizard, ChatCommonOverlays, and ChatSettingsDrawer are unchanged by this PR. This supports a reload/import timing flake; a same-commit rerun has been requested, but its outcome is not yet known. No claim is made that real-device or production behavior has been reproduced.

Steps to reproduce

  1. Use the PR commit above with the existing mobile WebKit CI setup.
  2. Run pnpm exec playwright test --project=mobile-webkit --shard=4/4 --workers=1 under the usual CI environment. The failure is intermittent; a deterministic reproducer is not established.
  3. Inspect the named defaults test around closing setup and immediately reloading. For a focused investigation, run pnpm exec playwright test e2e/issue-sweep-defaults.e2e.ts --project=mobile-webkit --grep 'roleplay wizard defaults save.*dark' --repeat-each=10 --workers=1 (suggested investigation command, not reported as executed).

Environment

  • Marinara Engine version: PR #6302 commit 0de3b240c4260d4d7ac3b24df995823f938628c2.
  • Install type: source, GitHub Actions regression runner with the Vite development server.
  • OS + version: Linux GitHub-hosted runner; see linked job setup for exact image.
  • Browser or app shell: Playwright mobile-webkit, iPhone 15 Pro emulation.

Logs, screenshots, or video

Trace sequence: settings child-module requests start around monotonic time 466205–466214 ms; reload starts around 466224 ms; those requests report Load request cancelled; the recovery boundary logs the import failure around 466333 ms; reload expires at the overall test timeout.

Additional context

This differs from #6303 (component fixtures relying on retained resource timings) and the closed #6269 (closing Chat Settings in a dice-turn test). Investigate the wizard-to-settings handoff and navigation timing before choosing between a fixture synchronization fix and a runtime fix. Preserve the save/reload/reset assertions; increasing the timeout alone would not address the import failure. Preserve the original failure when cleanup runs after test teardown.

Reported by @kolacheee / Codex during PR #6302 CI triage. No separate implementation has started. Failed checks were rerun without changing the commit.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Sep 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6304 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Suspected intermittent mobile WebKit reload race in `e2e/issue-sweep-defaults.e2e.ts:164`: “roleplay wizard defaults save, survive reload, and reset without profiles (dark)”. Reloading immediately after closing setup cancels pending Chat Settings module imports, leaves the old page showing the app recovery boundary, and times out. This produces both a failed shard and a failed aggregate check. ## Expected behavior The reload completes and the test verifies saved defaults and reset behavior without an import-error recovery screen. ## Actual behavior On PR #6302 at `0de3b240c4260d4d7ac3b24df995823f938628c2`, the initial save completes, but `page.reload()` at line 256 hangs for the remaining approximately 43.5 seconds of the 60-second test budget. The trace shows pending `/src/features/chat-settings/...` and related module requests canceled at reload, followed by `TypeError: Importing a module script failed` in the lazy component under `ChatCommonOverlays`. The subsequent cleanup request fails because the request context is already closed; that cleanup error masks the primary navigation timeout in the job summary. 104 tests passed, one failed, and two were skipped in this shard. This test passed on the previous PR run (23.5 seconds), on current staging (29.1 seconds), and its light-theme counterpart passed in the failing run (28.7 seconds). The test, `ChatSetupWizard`, `ChatCommonOverlays`, and `ChatSettingsDrawer` are unchanged by this PR. This supports a reload/import timing flake; a same-commit rerun has been requested, but its outcome is not yet known. No claim is made that real-device or production behavior has been reproduced. ## Steps to reproduce 1. Use the PR commit above with the existing mobile WebKit CI setup. 2. Run `pnpm exec playwright test --project=mobile-webkit --shard=4/4 --workers=1` under the usual CI environment. The failure is intermittent; a deterministic reproducer is not established. 3. Inspect the named defaults test around closing setup and immediately reloading. For a focused investigation, run `pnpm exec playwright test e2e/issue-sweep-defaults.e2e.ts --project=mobile-webkit --grep 'roleplay wizard defaults save.*dark' --repeat-each=10 --workers=1` (suggested investigation command, not reported as executed). ## Environment - Marinara Engine version: PR #6302 commit `0de3b240c4260d4d7ac3b24df995823f938628c2`. - Install type: source, GitHub Actions regression runner with the Vite development server. - OS + version: Linux GitHub-hosted runner; see linked job setup for exact image. - Browser or app shell: Playwright `mobile-webkit`, iPhone 15 Pro emulation. ## Logs, screenshots, or video - [Failing shard and downloadable trace/screenshot/video artifact](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/35281171826/job/105403249555). Artifact: `playwright-mobile-webkit-shard-4-failure`, ID `10523441567`; retained for seven days. - [Aggregate check reporting the same shard failure](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/35281171826/job/105409610606). - [Previous branch run: this exact test passed](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/35274110721/job/105380902152). - [Current staging: this exact test passed](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/35275434262/job/105384861379). Trace sequence: settings child-module requests start around monotonic time 466205–466214 ms; reload starts around 466224 ms; those requests report `Load request cancelled`; the recovery boundary logs the import failure around 466333 ms; reload expires at the overall test timeout. ## Additional context This differs from #6303 (component fixtures relying on retained resource timings) and the closed #6269 (closing Chat Settings in a dice-turn test). Investigate the wizard-to-settings handoff and navigation timing before choosing between a fixture synchronization fix and a runtime fix. Preserve the save/reload/reset assertions; increasing the timeout alone would not address the import failure. Preserve the original failure when cleanup runs after test teardown. Reported by @kolacheee / Codex during PR #6302 CI triage. No separate implementation has started. Failed checks were rerun without changing the commit. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:03:53 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Implementation owner: Codex working for @SpicyMarinara in the September 18 issue sweep. No open or draft PR is linked to this issue. I am tracing the existing implementation and will link the draft PR here; fixes will reuse the existing paths and include focused regression evidence.

<!-- gh-comment-id:5727504283 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Implementation owner: Codex working for @SpicyMarinara in the September 18 issue sweep. No open or draft PR is linked to this issue. I am tracing the existing implementation and will link the draft PR here; fixes will reuse the existing paths and include focused regression evidence.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 18, 2026):

Implemented and merged into staging in #6310 (be8ac7334d). All 41 checks passed on the final reviewed commit. Available on staging; this does not claim a stable release.

<!-- gh-comment-id:5728747719 --> @SpicyMarinara commented on GitHub (Sep 18, 2026): Implemented and merged into staging in #6310 (be8ac7334dd8ce309f25da8446a0fa68de67aae0). All 41 checks passed on the final reviewed commit. Available on staging; this does not claim a stable release.
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
Pasta-Devs/Marinara-Engine#3518
No description provided.