Skip to content

CI 恒红之一:pnpm gate:selftest:html 期望值过期(memo 键 11≠10) #309

Closed

Description

@FeatherHunter

现象pnpm gate:selftest:html(CI 第 43 步,tooling/test/skill-html-snapshot.test.mjs)恒红:断言 memo key 片段数 11≠10。- 起因:提交 1fca032(#220,09-12)把 memo 的键长到 11,但 tooling/ 侧的期望值没跟着改。- 与本次暴露它的票无关:在开工基线 1396d67 的干净检出上复现同一红。## 为什么以前没被发现CI 一直是「早步骤一红,其后全跳」:#295 之前 help:examples:check 先红,其后 5 步(含这道门)在 CI 里一律 skipped,所以这道恒红被掩盖着。#295 返修期把 CI 改成「七道门各带 if: always()、已知恒红项挪末位、无 continue-on-error」后,真 CI 15 步全部真跑、0 skipped——这道红才第一次现形。## 影响- CI 无法变绿(门本身是好的,是期望值过期)。- 它掩盖不了别的门了(这是进步),但会让「CI 绿」这个信号长期不可用。## 验收判据pnpm gate:selftest:html 在 master 上 exit 0;修法=让 tooling/ 的期望值与 memo 真实键数一致(要么跟着长到 11,要么改成从素材算出来的对账,不许把断言放宽成「不检查」)。## 证据docs/skills/skill-calorie/t295-返修证据.md(#295 返修期 CI 实测与本地复现)。

进度:100%

改了什么:tooling/test/skill-html-snapshot.test.mjs:103 的 EXPECT_KEYS.memo 10 → 11,另加 4 行注释写明这个数从哪来、怎么复算。期望值仍是写死的清单,断言强度不动(没有改成「从素材算」的同类推导——那会与文件里的 compare() 自校验循环,反而松掉鉴别力)。

关闭依据(逐条判据)

  1. 先自己复算正本,不抄旧值:受跟踪快照 tooling/skill-html.snapshot.json 的 artifacts 里 memo/frag/* 实测 11 条(memo.batch/create/detail/help.lookup/remind/remove/search/stats/sync/update/wish),且 artifactCount 186 = 5*(4+6+1) + (16+8+21+8+11) + (16+8+21+8+6) + 4*2 与 11 自洽;另外四对(bill 16/16、chef 8/8、home 21/21、schedule 8/8)逐条复算后未变。⇒ 事实是 11,10 是 memo 第 11 键(memo.wish,1fca032/[wayfinder] 备忘录HELP真标准:明确交付help文件+用现成通用模板 #220)落地前的过期值:门没错,是期望值没跟。
  2. pnpm gate:selftest:html(直调同口径)exit 0。
  3. 连带面 pnpm snapshot:html:check exit 0,且 changed=0——改期望值没有牵动快照。

实测输出摘录(落点窗口日志 .scratch/t308-312/logs/land-20260913-234136.txt)

ℹ tests 10
ℹ pass 10
ℹ fail 0
ℹ skipped 0
RESULT: ticket=96 runId=21a7095f-bae0-4654-a991-212fa5fa0f6b waitedMs=0 exit=0
RESULT: artifacts=186 changed=0 added=0 removed=0 base-* fingerprint=ef7cc02969e37e4bfc0eb35751b8dc1c

落点:commit 4295867(单文件,+5/−1),已推送 origin/master。

CI 真跑(run 34766518187,head aa7fd61):三平台六条腿的 Run pnpm gate:selftest:html 全部 completed/success,逐腿 ℹ pass 10 / ℹ fail 0 / ℹ skipped 0。改前同一道门在 windows 腿是 pass 9 / fail 1(AssertionError: memo key 片段数),在 ubuntu 腿同样是 pass 9 / fail 1(.scratch/t308-312/_log-ubuntu24.txt/_log-build_test__windows_latest__24_x_.txt 逐字留档)。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions