fix(tests): use isCompressSuccessText in export-cmd setupSession (stale /1 block/ after #376/#377) - #390
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-390Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr390.tgz
pi install ./packageThis comment is automatically updated on each push. |
[bot] 🏷 ## PR review — 已验证,可以合并(请人工合并) Diff 整洁度:单 commit( 谓词正确性: 无覆盖损失:helper 断言从「恰好 1 block」弱化为「≥1 block」,但各子测试独立断言精确数量( 实证验证(干净 worktree,非引用自述):
|
| 条目 | 方案 | 状态 |
|---|---|---|
| #385(首个报告,来源 #375 分析) | — | open |
PR #386(fixes #385):/1 block/ → /blocks: b1=/ |
正则,仍耦合面板措辞且耦合具体块标签 b1= |
open |
PR #388(更早一次尝试,/blocks: b\d+=/) |
— | closed(未合并) |
| #389(再报告,来源 #380 rebase 分析) | — | open |
PR #390(本 PR):改用生产谓词 isCompressSuccessText() |
语义判定,兼容新旧两种面板格式 | open |
#386 我也实测过:同样 10/10 通过——两个 PR 都是有效修复,但改同一行,不能同时合并。差异点:#386 的正则把 fixture 重新绑回面板措辞(下次面板再改版还会漂),#390 用生产谓词彻底解耦,方案更优;issue 层面 #389 与 #385 也是同一问题的两次报告。
建议:合并本 PR(#390),关闭 #386 及 #385 为重复(#389 随本 PR 合并自动关闭);或反向操作,但我不推荐保留措辞耦合版。取舍由你拍板。
一句话中文摘要:审查并实证了本 PR(master 上 7 个 export 子测试因 #376/#377 面板改版而红的修复,改用生产语义谓词而非正则,全量 722/0/3、typecheck 干净,diff 收敛可合并);另查出竞争修复 PR #386 与本 PR 修同一行,建议二选一优先保留本 PR。
1d49203 to
7128bca
Compare
7128bca to
816969e
Compare
Context
Issue #389: 7 subtests in
tests/export-cmd.test.tsfail on master. The shared helpersetupSession()asserted/1 block/against the compress tool result, but since #376/#377 compress returns the span-form panel (blocks: b1=m00002) instead of the legacy count form (1 block).Fix
Replace the regex assertion with the production success predicate
isCompressSuccessText()fromsrc/compress-tool.ts— the same predicate the compress retry loop uses and that compress-retry / compress-loop-breaker / compress-tool tests already assert against. It encodes "completed run that created ≥ 1 block" and accepts BOTH panel forms (legacy count + #376 span), so the fixture no longer couples to panel wording.Verification
2bdc831): 3 pass / 7 fail, error verbatim matches the issue report.tests/export-cmd.test.ts10/10 pass; full suitenpm test→ 722 pass / 0 fail / 3 skip;npm run typecheckclean.Fixes #389