boardx / boardx/boardx-dev-template
e2e-full 根因:next dev 的 static-paths-worker 读不到 vendor-chunks(第8分钟起雪崩;不得靠后门进生产包解决)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## 背景
拆自 #665 / #666。**#666 只做了止血**(timeout 90min + 撞上限也告警 + 可手动触发),**根因原样存在** —— e2e-full 仍然会红。
## 根因(已实测锁定,非推测)
`next dev` 会为动态路由起 **`static-paths-worker` 子进程**(独立的 jest-worker)去探静态路径。该 worker 与主进程的 chunk 视图不一致,会 `require` 到尚未 emit 的 `.next/server/vendor-chunks/*.js`。
报错的 require stack 直接点名:
```
- .next/server/webpack-runtime.js
- .next/server/app/api/ai-store/items/[id]/subscribe/route.js
- next/dist/server/dev/static-paths-worker.js ← 只在 dev 存在
- next/dist/compiled/jest-worker/processChild.js
```
**实测时间线**(run 29455608272):
| 时刻 | 事件 |
|---|---|
| 22:30:54 | 首个用例 |
| — | **前 60 个用例:60 个全 ✓** |
| 22:39:03 | **第 8 分钟**,首次 `Cannot find module './vendor-chunks/pg@8.12.0.js'`(单次运行 **1541 次**) |
| — | 此后碰 DB 的路由全 500 → 返回 HTML 错误页 → 测试拿到 `
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Next 14.2.5's dev static-paths-worker behavior and the e2e-full workflow, using run 29455608272 as the reproducible reference. Review the listed route modules and e2e/helpers/canvas.ts, while preserving the hard constraint that test backdoors must not enter the production bundle. Done means scheduled e2e-full runs no longer fail from the vendor-chunks cascade and remaining failures reflect real product issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100