diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 8c2df43d..5c0266aa 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -5771,6 +5771,22 @@ - 复发自:BUG-367(点选身份与滚动);BUG-366(覆盖完成被当成收敛);BUG-393(出卡即完成) - 修复版本:待发布 +## BUG-395 | staging publish 的 next build 被 holdout 类型和重复 re-export 挡住 + +- 状态:resolved +- 首次发现:2026-08-26 +- 最近更新:2026-08-26 +- 影响面:Gitea `backend-quality-gate.yml` `publish`、`deploy/railway-web.Dockerfile` 的 `RUN npm run build`、`core/index.ts`、`method-followup.ts` +- 用户现象:向 `staging` 推送 `a0ce55f0` 后 quality gate run `2088` validate 通过,publish 在 web 镜像 `next build` 失败。没有 dispatch `Deploy staging`。公网仍为上一成功 SHA `7718317d`。第一次失败是 publish exact-SHA checkout 三次超时;重跑后 checkout 成功,类型检查才暴露。 +- 触发条件:staging push 的 validate 跳过 `npm run build`;publish 才在 Docker 里跑 TypeScript。 +- 根因:(1) `core/index.ts` 对 `decide-next-action.ts` 和 `rectification-decision.ts` 都 `export *`,两者都导出 `offerSessionKinds` / `sessionKindFromNextAction`,触发 TS2308。(2) BUG-394 的 holdout 追问写成 `method_id: "holdout_validation"` 和 `ask_theme: "holdout"`,未加入 `MethodFollowup` 联合类型。 +- 修复:barrel 只具名导出 `decideNextAction` 及其输入类型,session helpers 只从 `rectification-decision.ts` 再导出。`MethodFollowup` 联合类型补上 `holdout_validation` 与 `holdout`。不改 Skill `10.0.11`。 +- 验证:`npx tsc --noEmit` 不得再报 `core/index.ts` TS2308 或 `method-followup.ts` TS2322;`frontend/tests/rectification-decide-next-action.test.ts`。 +- 防复发:`core/index.ts` 不得再 `export *` 两个都导出 session helpers 的模块。holdout 追问的 `method_id` / `ask_theme` 必须在 `MethodFollowup` 联合类型里。改决策 barrel 或 holdout followup 后必须跑 `npx tsc --noEmit` 或等价的 `next build`。staging push 的类型回归仍只在 publish Docker 暴露。 +- 相关记录:BUG-309、BUG-365、BUG-371、BUG-387、BUG-394 +- 复发自:BUG-309(validate 跳过 `next build`,publish 才暴露类型错误);BUG-394 重复导出 session helpers 且 holdout 种类未进联合类型 +- 修复版本:待发布 + ## BUG-396 | Holdout 门槛、用户停止收口与决策入口未钉死 - 状态:resolved