Repository navigation
Open
Labels
area:ownershipWhich side (Node or Vite) loads a module; double instances, aliases, mocks reaching Node codearea:performanceSpeed, memory and per-file costpriority:mediumReal friction with a workaround
Milestone
Description
The native engine's default ownership model for 0.16 is chosen by a fixed comparison against 0.15.0: the bug museum's ownership class, then timed runs on four open-source React Native apps.
Configurations
| Name | Build | Options |
|---|---|---|
| base | 0.15.0 from npm | none |
| A-on | candidate | experimental: { ownershipModel: 'resolution' } (nodeMocks implied) |
| B-on | candidate | experimental: { ownershipModel: 'resolver', nodeMocks: true } |
The candidate is one packed build of main at a recorded commit, taken after #705, #718, #801 and #809 have merged in that order. Both candidates use the same build and differ only in options.
Runs
- R1, museum (untimed). The ownership class from the candidate commit's museum, against 0.15.0 and against the candidate under A-on and B-on.
- R2, baseline noise (timed). 0.15.0 only: four apps, per-file and hot, cold and warm, three rounds. The spread of every timing is recorded before R3 starts.
- R3, comparison (timed). base, A-on and B-on interleaved in each round, each configuration with its own copy of each app.
Timed runs need AC power and an otherwise idle machine.
Acceptance criteria
- The pass criteria are fixed before any data is collected and do not change afterwards.
- The candidate commit is recorded, and
git log v0.15.0..<commit>lists fix(native): a workspace library a React Native workspace package imports undeclared is one module #705, fix(native): an installed React Native package the run does not declare is Node's #718, feat(native): Node serves React and its renderers as one copy #801 and feat(native): the guard's end-of-run summary groups by installed package and lists every file under diagnostics #809. - R1: every ownership exhibit's verdict is recorded for each configuration. No exhibit that passes on 0.15.0 fails under the chosen configuration.
- R2: every timing whose spread is above 10% of its median is re-measured before R3.
- R3: base medians are compared with R2's. A session that drifted by more than R2's noise is reported as drifted and not used.
- Raw output and SHAs are kept for every run, unflattering ones included.
- A closing comment gives the deciding counts and timings and the recommended default.
For the default-flip PR (not this issue)
- vi.mock does not reach a Node-owned package's own import of the mocked module #322:
tests-native/vitest.node-mocks.config.mtsruns on the default settings instead of forcingexperimental.nodeMocks, with an opt-out leg. Theown-vi-mock-node-consumerexhibit is then marked as landed. - The hot runtime's compiled-
.mjsre-export gate (Hot runtime on Node 22: a compiled ES build that re-exports a CommonJS sibling fails to link #847, fix(hot): a compiled ES index's require() of a CommonJS sibling links on Node 22 #850) needs a leg without the ownership flag, or a subpath entry. Under the ownership models a bare import reaches the package'srequirebuild (Document: under the ownership models a dual package's import loads its require build #838).
Metadata
Metadata
Assignees
Labels
area:ownershipWhich side (Node or Vite) loads a module; double instances, aliases, mocks reaching Node codearea:performanceSpeed, memory and per-file costpriority:mediumReal friction with a workaround
Activity
danfry1 commentedon Nov 15, 2026
Timed comparison of 0.15.0 against both candidate configurations, at 827f123: the default stays off for 0.16 on this evidence.
nodeMockson, because a root__mocks__/mock reaches Node's require as an unsettled async factory. That is tracked in nodeMocks: a root __mocks__ manual mock reaches Node's require as an unsettled async factory #896. Both candidates also cut failing tests in the other apps (for example 124 to 46 in the largest).Next: fix #896, then repeat the comparison with the same noise baseline.