Skip to content

docs(dev): add HMR design#10271

Draft
h-a-n-a wants to merge 1 commit into
mainfrom
07-14-docs_dev_add_hmr_design
Draft

docs(dev): add HMR design#10271
h-a-n-a wants to merge 1 commit into
mainfrom
07-14-docs_dev_add_hmr_design

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Jul 14, 2026

Copy link
Copy Markdown
Member

No description provided.

h-a-n-a commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 5f6144d to d01a05b Compare July 14, 2026 13:52
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch from fb4fd32 to 96e1361 Compare July 14, 2026 13:52
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from d01a05b to 51cff6e Compare July 15, 2026 03:08
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch 2 times, most recently from a7b7ea6 to df875eb Compare July 15, 2026 04:08
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 51cff6e to 6342d8b Compare July 15, 2026 04:08
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch from df875eb to fc95531 Compare July 15, 2026 05:01
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch 2 times, most recently from bbe6ee4 to d439856 Compare July 15, 2026 06:17
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch from fc95531 to 4bb6915 Compare July 15, 2026 06:17
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from d439856 to 5a95b7f Compare July 15, 2026 06:41
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch from 4bb6915 to 14f9582 Compare July 15, 2026 06:41
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 5a95b7f to 15e9fac Compare July 15, 2026 07:13
@h-a-n-a
h-a-n-a force-pushed the 07-07-test_dev_add_hot_api_test_cases branch from 14f9582 to 0fe85ef Compare July 15, 2026 07:13

@hyfdev hyfdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two important guarantees in this design are not implemented safely yet.

ship map. Re-sending a changed module follows from the stamps.

A reconnect resets `shipped[C]` to empty. Lazy chunk sizing also
subtracts the boot-evaluated map (modules the entry chunk evaluated at

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: This is not a safe invariant yet. The hello carries no build ID, so a client evaluating an older output can freeze the latest top_level_evaluated snapshot. Lazy sizing may then omit a factory that this client does not actually hold (or holds at an older version); I reproduced the resulting initModule(dep) with no dep factory. Please document this as an unresolved correctness gap, or bind the snapshot to the served build before presenting this subtraction as safe.

only the server holds module sources. Its output is a prediction,
filtered through the ship map into the patch — the push carries only
`changedIds`, the walk's _inputs_. Both error directions are safe:
over-predict wastes bytes; under-predict is caught by the client's

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: The claim that under-prediction always becomes a clean reload is false today. FbmHMRClient checks hasFactory only for updateSet; an initModule failure during apply reaches the queue's warn-only catch, and lazy-chunk initModule runs outside that recovery path entirely. We have a concrete missing-factory case that leaves the page alive and stale. Please describe these as unresolved failure modes (or add the reload recovery) instead of asserting “never a stale page” and listing every missing factory as a reload fallback below.

@hyfdev hyfdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with the important design gaps noted in the review.

@graphite-app
graphite-app Bot changed the base branch from 07-07-test_dev_add_hot_api_test_cases to graphite-base/10271 July 15, 2026 08:17
@graphite-app
graphite-app Bot force-pushed the 07-14-docs_dev_add_hmr_design branch from 15e9fac to 78ebf17 Compare July 15, 2026 08:28
@graphite-app
graphite-app Bot force-pushed the graphite-base/10271 branch from 0fe85ef to f26ce7a Compare July 15, 2026 08:28
@graphite-app
graphite-app Bot changed the base branch from graphite-base/10271 to main July 15, 2026 08:29
@graphite-app
graphite-app Bot force-pushed the 07-14-docs_dev_add_hmr_design branch from 78ebf17 to 38184eb Compare July 15, 2026 08:29
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 29ce07d
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a57c331d570190008447193
😎 Deploy Preview https://deploy-preview-10271--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 38184eb to d86b2c2 Compare July 15, 2026 10:02
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from d86b2c2 to 28254ba Compare July 15, 2026 15:03
@h-a-n-a
h-a-n-a changed the base branch from main to graphite-base/10271 July 15, 2026 15:03
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 28254ba to 118cba4 Compare July 15, 2026 15:04
@h-a-n-a
h-a-n-a changed the base branch from graphite-base/10271 to 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server July 15, 2026 15:04
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 118cba4 to 24a5389 Compare July 15, 2026 15:32
@h-a-n-a
h-a-n-a force-pushed the 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server branch 2 times, most recently from 8a37a87 to 5c7244e Compare July 15, 2026 15:55
@h-a-n-a
h-a-n-a force-pushed the 07-14-docs_dev_add_hmr_design branch from 24a5389 to c7a5c77 Compare July 15, 2026 15:55
@graphite-app
graphite-app Bot changed the base branch from 07-15-refactor_unify_vite_in_vite-test_and_test-dev-server to graphite-base/10271 July 15, 2026 17:22
@graphite-app
graphite-app Bot force-pushed the graphite-base/10271 branch from 5c7244e to 0b44bbc Compare July 15, 2026 17:27
@graphite-app
graphite-app Bot force-pushed the 07-14-docs_dev_add_hmr_design branch from c7a5c77 to 484b7e4 Compare July 15, 2026 17:27
@graphite-app
graphite-app Bot changed the base branch from graphite-base/10271 to main July 15, 2026 17:28
@graphite-app
graphite-app Bot force-pushed the 07-14-docs_dev_add_hmr_design branch from 484b7e4 to 29ce07d Compare July 15, 2026 17:28
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