## 任务 - G2:`predict`/`goal-predict` 默认 7 天窗 vs 需 ≥14 天 → 文档默认调用结构性不可达。 - G3:`view.anomaly` 23 个 kind 只覆盖 1 个。 - G4:`view.combined` 的 `window` 无白名单(`99d` 静默生效,未知值静默回退 30d)。 ## 验收 - 三处按口径修正并有单测(含 23 kind 参数化用例)。 ## 进度:100% 认领:FeatherHunter(本 session 首动作为认领)。 方案(最小,一次收敛,确保 108-110 可用): - G2:仅 `predict`/`goal-predict` 两键默认窗 7d→14d(`defaultRange` 加 `defDays` 参数,缺省仍 7d,其余键不动)。 - G3:render 层实测 23/23 全可用(仅 `weight_divergence` 缺体脂/围度样本时合法 missing-data,属缺失阻断铁律生效),故落点为覆盖率:新增 23 kind 参数化单测(render+dispatch 双层)。 - G4:`series.resolveWindow` 加白名单 `COMBINED_WINDOWS`(Nd 仅 7/15/30/60/90/180/365+具名/中文别名/custom),`99d` 与未知值抛 FetchError→上层 bad-input(exit 2)。 变更文件+commit 清单: - `packages/skill-calorie/src/cli/cmd_read.ts`(f672268,G2) - `packages/skill-calorie/src/analysis/series.ts`(fe89681,G4) - `packages/skill-calorie/test/g2g4-103.test.mjs`(faa552f,新增 3 用例:默认窗可达+23kind 参数化+白名单) 验收证据: - 新单测 3/3 通过;skill-calorie 全量 177/177 通过;`pnpm build` exit 0。 - CLI 端到端:`predict`/`goal-predict` 缺省调用 exit 0(forecastValue 75.2/targetKg 68);`combined` 配 `99d`/`bogus` exit 2(明示 window 非法+可选表);`7d` exit 0;`anomaly` diet_over exit 0。 ## 下一步 验收已过,关闭本票。108-110 的 #103 侧阻塞解除(仍需 #100 关闭才放行)。
Activity
docs(87): 返修 F3/F5/F6/F7/F8——动态段如实记账+可执行补丁/changeset 改口径/证据改符号锚/变异脚本不…
FeatherHunter commentedon Sep 9, 2026
resolution: G2 默认窗 7d->14d(仅 predict/goal-predict 两键);G3 render 层 23/23 验证无代码缺陷并补参数化单测;G4 window 白名单拒收 99d/未知值(exit 2 明示)。新单测 3/3、calorie 全量 177/177、pnpm build exit 0,CLI 端到端证据齐备。关闭本票。
FeatherHunter commentedon Sep 9, 2026
close: 验收通过(见票面 ## 进度:100% 与 resolution 评论)。108-110 的 #103 侧阻塞解除。
fix(103): G2 predict/goal-predict 默认窗 7d->14d,缺省调用可达 (#103)
fix(103): G4 combined window 白名单,拒收99d与未知值 (#103)
test(103): G2默认窗可达+G3 23kind参数化+G4白名单单测 (#103)