Skip to content

fix(utoopack): refresh client dev artifacts on 0.2 rebuilds - #152

Merged
xusd320 merged 1 commit into
xusd320/maintenance-0.2from
zoomdong/fix-02-client-hmr-html
Oct 30, 2026
Merged

xusd320 merged 1 commit into
xusd320/maintenance-0.2from
zoomdong/fix-02-client-hmr-html

Conversation

@fireairforce

@fireairforce fireairforce commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Adding a newly imported client component can change Utoopack's chunk filenames while ev dev keeps serving HTML generated from the initial asset list. Both a fresh browser page and a reload then execute the old chunk until the development server restarts.

Refresh the 0.2 adapter's development HTML and manifests when client stats change. Publication uses validated, stable stats, runs in the same queue as accepted HTML plan updates, and retains the previous output during incomplete writes. The directory watcher survives atomic replacement, scans after attachment, and drains on close. This targets xusd320/maintenance-0.2; the related main-line work is #108.

Validation:

  • Confirmed the new HTML/manifest regression fails before the fix and passes afterward. The Utoopack adapter suite passes all 43 tests, including incomplete startup/rebuild stats, atomic replacement, accepted-plan preservation, and shutdown.
  • npm run check-types, npm run lint, npm test, and git diff --check pass.
  • With the compiled adapter, published evjs 0.2.17, and @utoo/pack@1.4.32, a real Chromium test adds a new component import, confirms the root chunk filename changes and served HTML matches the latest stats, then verifies fresh navigation and reload both render the new content in the same development process without restarting.

Repeated native/browser comparison:

Check Published 0.2.17 adapter This PR
Independent development starts with compiler caches cleared 20 20
Valid chunk-renaming triggers 20/20 20/20
Stale HTML throughout the two-second observation window 20/20 0/20
Fresh Chromium context renders old content 20/20 0/20
Reload renders old content 20/20 0/20

The same CLI/framework 0.2.17, Utoopack 1.4.32, dependencies, initial source, and dependency-graph mutation were used in both arms. File hashes confirmed identical inputs and unchanged dependency trees; only the loaded adapter differed. Each trigger required a renamed root chunk already available over HTTP with the new component before the two-second HTML observation began. All attempts were valid and readable, with no setup failures, browser errors, process restarts, or cleanup failures.

Additional continuous-edit validation used three separate PR-version development sessions with five successive dependency-graph additions in each: all 15 updated HTML, fresh navigation, and reload correctly without restarting. These correlated edits are reported separately from the 20 independent starts. Existing open tabs applied live HMR in both arms; the reproduced control failure was stale entry HTML on fresh loads and reloads. These are observed rates for this forced chunk-renaming scenario, not an estimate of failures across arbitrary projects.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T04:16:20.535421Z ec62f23 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@xusd320
xusd320 merged commit 910a794 into xusd320/maintenance-0.2 Oct 30, 2026
@xusd320
xusd320 deleted the zoomdong/fix-02-client-hmr-html branch October 30, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants