Skip to content

fix(blind-test): resolve relative --out before spawning distilly - #194

Open
titanwings wants to merge 1 commit into
atomic/pr-3-doctor-shapefrom
atomic/pr-8-blind-test
Open

titanwings wants to merge 1 commit into
atomic/pr-3-doctor-shapefrom
atomic/pr-8-blind-test

Conversation

@titanwings

Copy link
Copy Markdown
Owner

Why

HANDOFF §8 与盲测 RUNBOOK 用相对路径 prepare --a split/A.srt --out run。脚本把 --base-dir work 传给子进程,同时把 cwd 也设成 run/work。相对路径被再解析一次,账本写到 run/work/run/work,随后 retrospect 找不到 knowledge/index.json,prepare 退出 1。T23 就是这条红。

数据形状如下。

输入 调用 字面期望
在 mktemp -d 里 cd,split-corpus --out split --ratio 0.7,再 prepare --a split/A.srt --person lin-gong --out run node scripts/blind-test.mjs prepare … 退出 0,run/profile.html 存在
同上,审计夹具 --person blind-sample-01 --baseline T23 退出 0,run/profile.html 存在
绝对 --out T24 仍退出 0,空评分表 FAIL
split-corpus --ratio 0.7 T22 仍是 28/10 cues

效果数字不是代码。本拍不跑三模型盲测 Lane 7 与 Lane 8。第一组数字由后续 swarm 按 RUNBOOK 的模型约束写到 store 的 media/distilly-atomic-pr/pr-8-blind/。

Scope

scripts/blind-test.mjs 对 --out、--a、--view、--scores 做一次 path.resolve(process.cwd(), …)。harvest、retrospect、view check、view render 拿到的 --base-dir 与文件路径都是绝对路径。

tests/blind-test.test.mjs 加一条相对 --out 用例,覆盖 prepare、finalize、control、score。

docs/v2/BLIND-TEST-RUNBOOK.md 写明三角色必须是三个不同模型,都不是 deepseek-flash。裁判是 claude-sonnet-5-thinking-medium。核对者是 gpt-5.6-sol-medium。蒸馏者不得是这两个。第一组数字的落地路径写进 RUNBOOK。

tests/gates/baseline/audit-tests.txt 只删这一行。

  • R56 blind-test prepare works with the relative --out the handoff (§8) and the blind-test README use

该行对应 tests/audit/effect-hosts.test.mjs 的 T23。T22、T24 保持绿。基线数据行从 16 减到 15。不删 R08、R21、R23、R28、R48、R58。

不改 src/derive/retrospect.mjs。不把 PR-6 合并进来。父提交已含 PR-2 的回指校验。

Blast Radius

绝对路径路径仍然走 T24,行为不变。相对路径从崩变成能写出 profile.html。acceptance 18/18 不变。栈停在 dot-skill-test,dot-skill 保留。

Verification

T23 由红转绿。T22、T24 保持绿。基线从 16 行减到 15 行。

改前,Node v22.14.0,HEAD d05717b:

PASS audit-tests  (7.2s, exit 1)
     ratchet failing 16, baseline 16

T23 失败原文(同一 HEAD 上直接跑 HANDOFF 命令,退出 1):

Error: distilly retrospect --person blind-sample-01 --json failed (2): {
  "error": {
    "code": "retrospect/missing-input",
    "message": "/tmp/tmp.KC8Q2LI0YV/run/work/skills/*/blind-sample-01 has no knowledge/index.json"
  }
}

新用例 accepts the relative --out and --a the handoff (§8) uses 在同一 HEAD 上失败:

Error: distilly retrospect --person lin-gong --json failed (2): {
  "error": {
    "code": "retrospect/missing-input",
    "message": "/tmp/blind-rel-xgYUB6/run/work/skills/*/lin-gong has no knowledge/index.json"
  }
}

1 !== 0

改后,Node v22.14.0,HEAD 2b8b22f:

PASS audit-tests  (7.5s, exit 1)
     ratchet failing 15, baseline 15

改后,Node v20.20.2:

PASS audit-tests  (10.3s, exit 1)
     ratchet failing 15, baseline 15

node scripts/run-gates.mjs --without playwright 在 Node v20.20.2 与 Node v22.14.0 都是 8/8 gates passed。npm test 是 # tests 404、# fail 0。

DISTILLY_PLAYWRIGHT_ROOT=/tmp/pw-root node scripts/run-gates.mjs --requires playwright 在 Node v22.14.0 上是 3/3 gates passed。三份语料都是 验收结果:18/18 通过。us-house 含 FAIL · units=2744 speakers=18 attributed=85。

You see,Node v22.14.0。mktemp -d 里 cd 后按 HANDOFF §8 跑相对路径。split-corpus --out split --ratio 0.7 退出 0。prepare --a split/A.srt --person lin-gong --out run 退出 0。run/profile.html 53715 字节。

新用例在 head 上 node --test tests/blind-test.test.mjs tests/audit/effect-hosts.test.mjs 是 # tests 13、# fail 0。三条 R56 都 ok。

本拍不跑 Lane 7 与 Lane 8,正文不贴效果命中率。

Rollback

git revert 2b8b22fde9bd41fe9e6ab5d854efd2e91b2da4d8。基线那一行会回来,相对 --out 再次退出 1。

HANDOFF §8 uses --out run and --a split/A.srt. Those relatives were
re-resolved against the harvest/retrospect cwd, so the ledger landed
off-tree and prepare exited 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants