fix(doctor): read speaker labels from harvested text at Step 1.5 - #193
Open
titanwings wants to merge 1 commit into
Open
titanwings wants to merge 1 commit into
titanwings wants to merge 1 commit into
Conversation
corpusShape now counts speakers from knowledge/text prefixes so doctor --require-shape works after Collect, before Derive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
doctor --require-shape是 SKILL.md Step 1.5 的门禁。它应该在 Collect 之后、Derive 之前拦住「会议流水蒸不出一个人」的材料。旧实现从
evidence/derived/voice.json读说话人。那份文件要到retrospect才有。按文档顺序跑时 speakers 是 0,C-SPAN 语料被当成「没有说话人标注」并判 PASS。门禁在该出现的位置是空的。数据形状如下。
doctor --require-shape --jsonshape[0].verdict为 FAIL,speakers 18,attributed 85,reasons 含「只有 3% 的单元能归到某个说话人」--require-shapedoctor --jsonshape[0].verdict仍为 FAIL,ok为 truedoctor --require-shape --jsondoctor --jsonScope
只改
corpusShape。从knowledge/text/*.md的锚点行读解析层写出的[k00NN] <at> <speaker>:前缀,统计单元数、可归属比例、最活跃者占比。evidence/derived/voice.json存在时只交叉核对,不一致则 warning,verdict 仍以 text 为准。不改
deliveredAnchors。阈值不变。可引用单元小于 20、多人材料可归属小于 40%、最活跃者小于 20% 判 FAIL。reasons 原文不变。tests/doctor-coverage.test.mjs三条形状测试改为 harvest 之后直接 doctor。不再手写 voice.json 夹具。tests/gates/baseline/audit-tests.txt只删这一行。doctor --require-shaperun after Collect and before Derive fails the C-SPAN floor corpus该行对应
tests/audit/retrospect-doctor.test.mjs的 T43。T44、T45 保持绿。基线数据行从 17 减到 16。Blast Radius
harvest 之后立刻跑 doctor 才会从 PASS 变成 FAIL。这是要修的行为。retrospect 之后的 C-SPAN 路径仍是 FAIL,reasons 原文不变,speakers 仍是 18,attributed 仍是 85。
面试语料同一顺序仍是 PASS。acceptance-us-house 仍出现
FAIL · units=2744 speakers=18 attributed=85。栈停在 dot-skill-test,dot-skill 保留。
Verification
T43 由红转绿。T44、T45 保持绿。基线从 17 行减到 16 行。
改前,Node v22.14.0,HEAD 8784cac:
T43 失败原文:
改后,Node v22.14.0,HEAD d05717b:
改后,Node v20.20.2:
node scripts/run-gates.mjs --without playwright在 Node v20.20.2 与 Node v22.14.0 都是 8/8 gates passed。npm test是 # tests 403、# 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。
node bin/distilly.mjs实测。us-house harvest 后不跑 retrospect,doctor --require-shape --json退出 1,verdict FAIL,speakers 18,attributed 85。synthetic-interview 同一顺序退出 0,verdict PASS,speakers 2,top_speaker 林工。新用例在 base 上失败,在 head 上通过。base 是 Node v22.14.0,旧
corpusShape加新测试。the corpus shape check passes on a corpus that can carry a person失败:the corpus shape check catches a multi-speaker corpus nobody can be cut out of失败:head 上
node --test tests/doctor-coverage.test.mjs是 # tests 9、# fail 0。Rollback
回退 d05717b。已 harvest 的 text 不用迁移。栈停在 dot-skill-test,dot-skill 保留。