Add repeated-restart resilience e2e test (issue #90 guard)#111
Merged
Conversation
Guards the #90 restart fixes: click Restart 20 times with unchanged source and assert the Blazor circuit stays alive (no #blazor-error-ui) and the WebGL context is re-established each run. 20 restarts exceeds Chrome's ~16 live-context cap, so a regression of the UseReferenceDevice leak fix would trip context loss and fail here. Each iteration nulls window._canvasContextType and waits for the running game to re-set it (DoCompileAndRun writes it at the end of every run) — a deterministic, app-code-free per-restart completion signal. Shared boot/click/wait helpers extracted from the existing smoke test so both tests share one WASM boot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signposts how to author Playwright .NET e2e tests for the WASM app: the publish→in-process-Kestrel→headless-Chromium harness, SwiftShader GL args, the observable JS/DOM signals a test can synchronize on, and the null-and-wait per-run sync pattern. Born from the #90 restart test; the next consumer is the #95 sample-switch guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Close the gap where noticing reusable knowledge that warrants a new skill fell to the user: after finishing work, proactively suggest a new/updated skill — but only high-confidence cases, since skill lines cost tokens on every load. Err toward not proposing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three related additions on top of the Phase-1 e2e harness (PR #110 / issue #97):
RepeatedRestart_UnchangedSource_StaysAliveAndKeepsWebGl.e2e-testingskill — signposts how to author these tests (born from Apos.Shapes should use KNI effect XNBs #1).1. The test
Boots the published WASM app under headless Chromium + SwiftShader, runs the default sample, then clicks Restart 20 times with unchanged source, asserting after each that the Blazor circuit is alive (
#blazor-error-uihidden) and the WebGL context is re-established (window._canvasContextTypecomes back set).Why meaningful: each Restart rebuilds the whole
Game/GraphicsDevice; 20 iterations exceeds Chrome's ~16 live-context cap, so a regression of theUseReferenceDeviceleak fix would trip context loss around run ~16 and fail here. Also exercises the per-run cleanup path (RunAllCleanups,Window.Currentdelegate reset) that #90 hardened.Sync without app changes:
LaunchGameFromTypeAsyncwriteswindow._canvasContextTypeat the end of every successful run. The test nulls it before each click and waits for the app to re-set it — a deterministic per-restart completion signal. This is why #90 needs no app hook (unlike the upcoming #95 sample-switch guard, which will add a debug input hook).Extracted shared
BootAsync/ClickRunAsync/WaitForWebGlContextAsync/AssertNoBlazorErrorAsynchelpers so both tests share one WASM boot. No CI edit —dotnet testauto-discovers the new test.2.
e2e-testingskill.claude/skills/e2e-testing/SKILL.md— the reusable "20%": the publish→in-process-Kestrel→headless-Chromium flow, SwiftShader args, the observable JS/DOM signal catalogue and what each proves, the null-and-wait pattern, and the "reserve app-code hooks for input assertions (#95)" boundary. Verified against source.3. CLAUDE.md skill-suggestion guidance
Adds a rule to proactively suggest a new/updated skill when reusable subsystem knowledge is re-derived — but only high-confidence cases, since every skill line costs tokens on every load. Errs toward not proposing.
Verification
Both e2e tests pass locally (~21s total, incl. the 20-restart loop) against SwiftShader software GL.
Regression guard for #90 (already closed) — does not re-close it.
🤖 Generated with Claude Code