Repository navigation
[URGENT] fix(dev): qualify Turbopack runtime boundaries (phase 5) - #12258
diegosouzapw merged 1 commit into
Conversation
|
The two failed unit shards are inherited release contract drift from #12247, not failures in this PR's Turbopack/runtime-boundary files. Exact failures:
#12247 correctly changed provider-level cooldowns to require The test-only alignment is isolated in #12259 to preserve this Phase 5 PR's bundler-only scope. The corrected turn-pin tests plus the new provider-window suites pass 38/38 locally. Once #12259 merges, this PR should be rebased/refreshed and the two inherited shards rerun. |
5848e0e to
1f69462
Compare
1f69462 to
5e02833
Compare
|
Validated in local merge-train on 192.168.0.113 — train of #12258 #12262 #12166 #12281 #11259 #11950 merged clean onto
|
Co-authored-by: backryun <backryun@daonlab.local>
Summary
Completes the implementation side of Phase 5 for #12074 by fixing the two exact runtime boundaries reproduced on the post-Phase-4b release head:
tiktokenexternal so Node selects its CommonJS loader instead of Turbopack bundling the ESMtiktoken_bg.wasmimport;tiktoken_bg.wasmin standalone output tracing;Reflect.apply, preventing Turbopack from rewriting the dynamic request into its in-bundle resolver.This does not add warning ignores or mix provider/dependency/catalog work into the phase.
Reproduction and result
Qualification was repeated from an empty Next cache and isolated SQLite directory on release head
2e17161eawithOMNIROUTE_USE_TURBOPACK=1.Before this patch:
better-sqlite3andnode:sqlitefailed withCannot find module as expression is too dynamic, forcing thesql.jsfallback;/api/providersreturned 500 becausetiktoken_bg.wasmwas missing during module evaluation;After this patch:
createRequireparse failure, critical-dependency flood, orMaxListenersExceededWarning;/dashboard/providers/api/health/ping/api/providers/api/settings/api/v1/modelsThree real provider-page source edits/restoration returned 200 in 59 ms / 61 ms / 77 ms. RSS moved from 4,805,408 KiB after the first HMR graph activation to 4,822,272 KiB after the third cycle (+16,864 KiB), rather than showing the previous runaway pattern.
After the representative routes and three HMR cycles:
All temporary source probes were restored. The isolated DBs and approximately 4.6 GiB of before/after generated caches were deleted after measurement.
Automated validation
npm run typecheck:coregit diff --check, pre-commit documentation sync and quality gatesI also started the full
npm run test:unitcommand. It did not complete: the pre-existingwarmupScheduler/circuitBreakerFactory*group remained pending for more than five minutes and blocked the remaining runner queue, so I interrupted it rather than claiming a full-suite pass. The changed DB/config tests and both non-overlapping focused/Vitest suites above are green.Scope
next.config.mjssrc/lib/db/adapters/runtimeRequire.tstests/unit/turbopack-runtime-boundaries-12074.test.ts