[GH-ISSUE #5928] Eight e2e files hand-write the UI store persist payload and would drift silently on a rename #3276

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Eight e2e files hand-write the UI store's localStorage persist payload — the literal
marinara-engine-ui key, the version number, and whichever state flags each test
needs (e2e/core-flows.e2e.ts alone does it at five sites; the others:
client-runtime-diagnostics, game-verb-only-turn, generation-recovery,
illustration-arrival, illustrator-manual-cadence, issue-sweep-chat,
issue-sweep-settings). The store's actual contract lives in useUIStore's persist
config in the client. If a key or flag renames on one side only, nothing fails loudly:
the missing field falls back to its default and the test silently exercises a
different configuration than it claims — a wheel-nav test with gameMiddleMouseNav
quietly off, for example, would pass or fail for the wrong reason.

The smallest honest fix is one shared e2e helper (or exported persist constants the
client and the tests both import) that owns the storage key, the version, and a typed
seed function, with the eight files migrated onto it in one mechanical pass. Worth
deciding at the same time: whether the helper should assert at seed time that every
flag it writes exists in the store's current persist shape, which is what would turn a
future rename into a loud failure instead of a silent default.

Originally created by @kolacheee on GitHub (Sep 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5928 Originally assigned to: @SpicyMarinara on GitHub. Eight e2e files hand-write the UI store's localStorage persist payload — the literal `marinara-engine-ui` key, the `version` number, and whichever `state` flags each test needs (`e2e/core-flows.e2e.ts` alone does it at five sites; the others: `client-runtime-diagnostics`, `game-verb-only-turn`, `generation-recovery`, `illustration-arrival`, `illustrator-manual-cadence`, `issue-sweep-chat`, `issue-sweep-settings`). The store's actual contract lives in `useUIStore`'s persist config in the client. If a key or flag renames on one side only, nothing fails loudly: the missing field falls back to its default and the test silently exercises a different configuration than it claims — a wheel-nav test with `gameMiddleMouseNav` quietly off, for example, would pass or fail for the wrong reason. The smallest honest fix is one shared e2e helper (or exported persist constants the client and the tests both import) that owns the storage key, the version, and a typed seed function, with the eight files migrated onto it in one mechanical pass. Worth deciding at the same time: whether the helper should assert at seed time that every flag it writes exists in the store's current persist shape, which is what would turn a future rename into a loud failure instead of a silent default.
bsakaguchi 2026-10-21 06:01:36 +07:00
Author
Owner

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

Owner: @SpicyMarinara; Codex is taking this in draft issue-sweep PR #5929. Existing issue-linked branches and open/draft PRs were checked before starting. I will verify the reported behavior against current staging and keep the fix and regression proof focused.

<!-- gh-comment-id:5573740025 --> @SpicyMarinara commented on GitHub (Sep 7, 2026): Owner: @SpicyMarinara; Codex is taking this in draft issue-sweep PR #5929. Existing issue-linked branches and open/draft PRs were checked before starting. I will verify the reported behavior against current staging and keep the fix and regression proof focused.
Author
Owner

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

Fixed in #5929, merged into staging as 4f67630e6. Current fixtures share the typed persistence contract; explicit migration tests retain their legacy payloads. Full regression matrix passed.

<!-- gh-comment-id:5574823327 --> @SpicyMarinara commented on GitHub (Sep 7, 2026): Fixed in #5929, merged into staging as 4f67630e6. Current fixtures share the typed persistence contract; explicit migration tests retain their legacy payloads. Full regression matrix passed.
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#3276
No description provided.