Skip to content
This repository was archived by the owner on Oct 11, 2026. It is now read-only.

fix: own development reload connections - #181

Merged
KyleJune merged 1 commit into
mainfrom
codex/180-reload-client-ownership
Oct 3, 2026
Merged

KyleJune merged 1 commit into
mainfrom
codex/180-reload-client-ownership

Conversation

@KyleJune

@KyleJune KyleJune commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

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

  • Actual emitted-script dev-client.test.ts: unchanged production passed four compatibility controls and failed ten ownership assertions; the fixed script passed all fourteen with normal sanitizers.
  • Windows: full deno task check and exact deno task test --parallel --reporter=dot passed (68 tests, 978 steps).
  • Separate frozen Ubuntu checkout: full check and actual CI deno task test --coverage passed (68 tests, 978 steps).
  • Independent source, test/resource and whole-change working and final pinned reviews clear at 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

@KyleJune

KyleJune commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

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.

@KyleJune
KyleJune merged commit d772bd2 into main Oct 3, 2026
11 checks passed
@KyleJune
KyleJune deleted the codex/180-reload-client-ownership branch October 3, 2026 09:15
KyleJune pushed a commit that referenced this pull request Oct 3, 2026
## [0.17.9](0.17.8...0.17.9) (2026-10-03)

### Bug Fixes

* own development reload connections ([#181](#181)) ([d772bd2](d772bd2)), closes [#180](#180)
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.17.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: own reload-client connections and retries

1 participant