test(code-splitting): cover circular strict init order#10298
Closed
hyfdev wants to merge 0 commit into
Closed
Conversation
Member
Author
How to use the Graphite Merge QueueAdd 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. |
hyfdev
force-pushed
the
codex/issue-10265-circular-init-order-test
branch
from
July 15, 2026 13:10
d3f714e to
ed01f28
Compare
hyfdev
force-pushed
the
codex/issue-10265-circular-init-order-test
branch
from
July 15, 2026 13:42
ed01f28 to
4bf7b5d
Compare
hyfdev
force-pushed
the
codex/issue-10265-circular-init-order-test
branch
from
July 15, 2026 14:14
4bf7b5d to
9a79349
Compare
hyfdev
marked this pull request as ready for review
July 16, 2026 02:16
IWANABETHATGUY
approved these changes
Jul 17, 2026
graphite-app
Bot
changed the base branch from
codex/vite-chunk-execution-order-plan
to
graphite-base/10298
July 17, 2026 08:41
Member
Author
Merge activity
|
graphite-app Bot
pushed a commit
that referenced
this pull request
Jul 17, 2026
## Summary - Add the circular ESM initialization graph reported in #10265, whose legacy init-call transfer failure is addressed by #10270. - Exercise both strict modes: `strictExecutionOrder: true` by itself (wrap-all), and strict execution order with `experimental.onDemandWrapping: true`. - Execute the generated entry in both cells and assert that the circular `init_a` / `init_b` path completes without calling an uninitialized wrapper. ## What this proves The failure addressed by #10270 comes from the legacy `ensure_lazy_module_initialization_order()` transfer moving an `init_*()` call before a later wrapper assignment. With #10104's new strict implementation, that function is still called but returns before running the transfer logic; the wrap-all or on-demand execution-order analysis owns scheduling instead. The exact circular graph executes successfully in both cells, demonstrating that this failure mode is absent from both new strict paths. Current `main` at `03e1e3422` also passes both strict configurations through the old implementation, so this is path-specific regression coverage rather than a `main`-fails / parent-passes claim. ## Scope This conclusion is limited to strict execution order, in wrap-all and on-demand modes. Default and non-strict output still use the legacy transfer logic and are outside this test. Refs #10265 and #10270. ## Validation - `CARGO_TARGET_DIR=/tmp/codex-rolldown-pr10104-target just t-run crates/rolldown/tests/rolldown/issues/10265/_config.json` (twice; snapshot-stable) - Both strict cells also pass on `main` at `03e1e3422`, with different generated layouts - `just lint-node` - `just lint-repo` - `git diff --check`
graphite-app
Bot
force-pushed
the
codex/issue-10265-circular-init-order-test
branch
from
July 17, 2026 08:56
9a79349 to
5a00f1f
Compare
graphite-app
Bot
changed the base branch from
graphite-base/10298
to
codex/vite-chunk-execution-order-plan
July 17, 2026 08:57
hyfdev
force-pushed
the
codex/issue-10265-circular-init-order-test
branch
from
July 17, 2026 09:52
5a00f1f to
0e1e8aa
Compare
✅ Deploy Preview for rolldown-rs canceled.
|
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.

Summary
onDemandWrappingemits circular init_* calls before initialization #10265, whose legacy init-call transfer failure is addressed by fix: skip init-call transfer for circular wrapper deps #10270.strictExecutionOrder: trueby itself (wrap-all), and strict execution order withexperimental.onDemandWrapping: true.init_a/init_bpath completes without calling an uninitialized wrapper.What this proves
The failure addressed by #10270 comes from the legacy
ensure_lazy_module_initialization_order()transfer moving aninit_*()call before a later wrapper assignment. With #10104's new strict implementation, that function is still called but returns before running the transfer logic; the wrap-all or on-demand execution-order analysis owns scheduling instead.The exact circular graph executes successfully in both cells, demonstrating that this failure mode is absent from both new strict paths. Current
mainat03e1e3422also passes both strict configurations through the old implementation, so this is path-specific regression coverage rather than amain-fails / parent-passes claim.Scope
This conclusion is limited to strict execution order, in wrap-all and on-demand modes. Default and non-strict output still use the legacy transfer logic and are outside this test.
Refs #10265 and #10270.
Validation
CARGO_TARGET_DIR=/tmp/codex-rolldown-pr10104-target just t-run crates/rolldown/tests/rolldown/issues/10265/_config.json(twice; snapshot-stable)mainat03e1e3422, with different generated layoutsjust lint-nodejust lint-repogit diff --check