Repository navigation
fix: own development reload connections - #181
Conversation
|
Root independent review is CLEAR at d560b31 (tree 0bab370d65d0aedcde86e426e2ebd1d6a18fa156). Whole working review and final raw committed-file checks cover both changed files; source/test hashes match the independently reviewed native and Linux content, and the lockfile is unchanged. The actual emitted script now owns one EventSource and one pending retry, closes a failed source before replacing it, rejects stale callbacks, and cancels startup/retry resources on unload. The fixture exercises that complete emitted script and checks resources before teardown. Native configured tests and actual Ubuntu CI both passed 68 tests / 978 steps; this is fixture and CI evidence, not a certification of browser TCP timing. All three independent reviewers are CLEAR. Production guards and default/configured development connection behavior remain covered. Final CI and exact-head/closing-set verification are required immediately before the separately issued merge. Root consumer adoption remains a separate decision. |
|
🎉 This PR is included in version 0.17.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Why
Repeated development SSE errors can leave earlier connections open and schedule multiple replacements. The generated reload script now owns one connection and retry timer, closes the failed connection before the existing five-second replacement, and stops pending work when the page unloads. Late callbacks from replaced sources and delayed DOM readiness cannot restart or reload a disposed client.
Verification
dev-client.test.ts: unchanged production passed four compatibility controls and failed ten ownership assertions; the fixed script passed all fourteen with normal sanitizers.deno task checkand exactdeno task test --parallel --reporter=dotpassed (68 tests, 978 steps).deno task test --coveragepassed (68 tests, 978 steps).d560b310de9120141458128e31fedebe2c7fe5f3.Risk
Door: two-way. This development-only script change can be reverted; the existing port, retry delay and reload-message behavior remain. The fixture checks generated-script ownership through controlled EventSource/window/document objects and standard fake time, without certifying native browser event delivery, BFCache behavior or TCP retry timing. No dependency or root consumer change is included.
Closes
Closes #180