Skip to content

卡路里旧版口径对照与 P1×6 复核 #68

Closed

Description

@FeatherHunter

Question

与旧版逐字段对照还剩哪些差异?复核 docs/calorie-parity-39.md 的结论与遗留项:

产物:差异清单 + 每项处置建议(补 / 不补 + 理由)。

进度:100%

关闭后回写(2026-09-11):本票为已交付并关闭(收口记录见本票关闭评论),原正文进度标记误留在 0%。回写依据:《卡路里·本体图(1/3)parity 极致重做》(#63) 收口调查——逐票核对 19 张「正文进度与关闭状态不符」的票,结论均为非误关。

Activity

  1. self-assigned this
    on Sep 8, 2026
  2. FeatherHunter commented on Sep 8, 2026

    @FeatherHunter
    OwnerAuthor

    #68 旧版口径对照与 P1×6 复核 —— 结论

    报告全文:D:\ilife\.scratch\research\t68-parity-gaps.md(只读复核,未改任何既有文件;未运行旧 Python、未碰真实 DB,仅对老家备份复制件做只读 SELECT)

    一、P1×6 复核状态:全部未复核(本次为首次逐条复核)

    全库评论检索:intensity 0 命中、极限 0 命中、P1 仅 #39/#14/#48(#48 的「P1→P4」是优先级)。#40 评论(2026-09-06T12:51:09Z)与 #41 评论(2026-09-06T16:00:35Z)均为合流/CI 收尾,零 P1 字样;#39(11:48:51Z)只写「P1×6 注明出处」;#14 finale(16:38:53Z)写「P1/P2 注记」。#39 承诺的「#40/#41 验收时复核」从未执行。

    P1 项 状态
    1 intensity '极限'→NULL 未复核(评论零命中)
    2 餐别窗口/加餐 未复核
    3 GIF/弃 base64 未复核
    4 复盘 9 词并入场景 10 / legacy 22 未复核
    5 goal 11 mode(expiring/predict/vs_actual) 未复核,但实质已补(#41 落地,代码可证)
    6 实为 §4 DB intensity 项(与 P1-1 重复) 未复核

    注:#39 票面与 §8 称「P1×6」,报告表内仅 5 行,第 6 项是 §4 的 DB intensity 项,属重复计数。

    二、intensity 判定:口径不补(老新同构,非差异)

    • 新版映射 CASE intensity WHEN 低/中/高 THEN easy/normal/hard ELSE NULL(src/schema.ts:247-251、src/migrate/migrate.ts:132-137、:316-324);老家 scripts/db.py:396-406 逐字同构,即 '极限' 在老口径下同样早已是 NULL。
    • 真实数据(老家备份复制件只读):exercise_log 8297 行,intensity = NULL 8277 / 中 12 / 高 6 / 极限 2,这 2 行的 difficulty 在老库也是 NULL → 无信息因移植而新增丢失。
    • 读路径静默不出 intensity(src/fetch/exercise.ts:167、:263),render/*.ts 零 difficulty。
    • 真正的新缺口:写路径无值域校验(src/cli/write.ts:191 可写任意串),老家是 choices=['easy','normal','hard'](scripts/exercise_tracker.py:791、:811)。
    • 出处订正:报告引的 db.py:258-268 在老家中已漂移为 food_log 钠糖纤维迁移,正确出处为 db.py:396-406(+ references/database_schema.md:112 的 4 档值域)。

    三、「词层与路由层已全覆盖」仍成立(已复现)

    当前树实测 436 条目 / 434 唯一词 / 重复仅「记身材照」×3;10 场景 9-70-58-39-32-25-4-13-10-176、CATEGORIES 13 全部逐项复现;老家 _triggers.py 只读计数得同样 436/434 与同分布。node --test test/calorie-triggers.test.mjs 7/7 pass。两处注记:报告 :41 的「单引号 436 行去重 412 + 双引号 22」拆分无法复现(实测单引号 436、双引号 0,但总数结论正确);getSummary 分类合计 181≠436(SoT 保真,勿改)。

    四、top 建议

    1. 补:写路径 difficulty 值域校验(对齐老家 choices)——真缺口。
    2. 补:迁移审计计数(丢了多少行 intensity 非低中高)——可观测性。
    3. 补:订正 P1-1 出处行号 + 「P1×6」计数(文档)。
    4. 不补:intensity 口径本身、餐别窗口、GIF/base64、legacy 22、P2 项、out-of-scope 项(理由见报告 §5)。
    5. 顺手:packages/skill-calorie/test/cmd-read-t11.test.mjs:185 的 >= 436 收紧为 ===。

    进度:100%

    下一步:按报告 §5 差异清单把「写路径 difficulty 值域校验 + 迁移审计计数」毕业为 #63 下的本体票;文档类订正(出处行号、P1×6 计数)随下次 docs 收编一并落。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:research

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions