fix(ci): 出生时间旅程合同改读 (app)/page.tsx(BUG-939)

This commit is contained in:
jesse-ux
2026-09-18 10:18:57 +08:00
parent 5a1dcbd2a1
commit 39a0d7a980
4 changed files with 84 additions and 17 deletions
+17 -1
View File
@@ -12193,7 +12193,7 @@
- 修复:四条按「原值 / 新值 / 原因」改写,分别断 layout 与 homepage 注册两端,不得删测试。
- 验证:上述四文件;全量 `npm test` 相对 `cc1a8980` 少这 4 条红。
- 防复发:见 BUG-927。
- 相关记录:BUG-927、BUG-745
- 相关记录:BUG-927、BUG-745、BUG-939
- 复发自:无
- 修复版本:待发布
@@ -12285,3 +12285,19 @@
- 相关记录:BUG-214、BUG-268、BUG-282、BUG-937
- 复发自:无
- 修复版本:`8b11ae7d`
## BUG-939 | 出生时间旅程合同仍读已搬走的 `app/page.tsx`,staging 门禁全红
- 状态:resolved
- 首次发现:2026-09-18
- 最近更新:2026-09-18
- 影响面:`tests/test_birth_time_journey_contract.py` `_home_surface`;Gitea `backend-quality-gate` `validate`;staging 无法发布 `e4e73f56` 之后的提交
- 用户现象:staging 门禁从会话列表单起连续失败,最新一次 [run 2763](https://git.copse.top/root/Jyotisha/actions/runs/2763) 停在 Python 快速门。线上仍停在上次绿灯 `dc2f2a16`。
- 触发条件:push 到 `staging` 且命中门禁路径。pytest 跑 `test_web_onboarding_uses_the_deterministic_free_journey`。
- 根因:`e4e73f56` 把首页从 `frontend/src/app/page.tsx` 搬进 `(app)` 路由组。BUG-933/934 改了前端四条合同和两条 Python 入口合同,漏了这条已列入 `CORE_PYTEST_TARGETS` 的文件。`_home_surface()` 对缺失文件 `if path.exists()` 静默跳过,于是断言变成「拼盘里找不到 `<BirthTimeRectification`」,而组件仍在 `frontend/src/app/(app)/page.tsx`。
- 修复:首页表面改为必读 `(app)/page.tsx`,hooks 仍可选。新增路径锁:`PAGE.parts` 必须以 `(app)/page.tsx` 结尾,旧路径不得存在。
- 验证:`pytest tests/test_birth_time_journey_contract.py tests/test_session_management_entrypoints.py tests/test_supabase_user_data_contract.py tests/test_daily_and_rectification_entrypoints.py` 25 passed。未改产品代码。
- 防复发:扫首页源码的 Python 合同必须必读 `(app)/page.tsx`,不得对首页文件 `exists()` 跳过。外壳再搬家时,`CORE_PYTEST_TARGETS` 里所有 `_home_surface` 都要一起改。
- 相关记录:BUG-927、BUG-933、BUG-934
- 复发自:BUG-933
- 修复版本:待发布