test(export-cmd): assert new compress panel block-span format (issue #385) - #388
test(export-cmd): assert new compress panel block-span format (issue #385)#388ranxianglei wants to merge 1 commit into
Conversation
…385) #377 changed the compress result panel from '… (~N reclaimed, 1 block)' to '… blocks: b1=mXXXXX–mYYYYY' (blockSpanLabel) and updated four test files but missed tests/export-cmd.test.ts, whose setupSession helper still asserted /1 block/. The branch was based on pre-#377 master so its CI never ran this file; after both merges master went red (7 fails). Match the sibling convention (decompress-cmd.test.ts / integration.test.ts): /blocks: b\d+=/. The helper compresses only m00002 so the span detail does not affect the match.
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-388Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr388.tgz
pi install ./packageThis comment is automatically updated on each push. |
|
[bot] 🏷 Closing as duplicate of #386. Both PRs fix the same line ( #386 is verified green locally: |
Problem
Master test suite red:
node --import tsx --test tests/export-cmd.test.ts→ 7 fails, allerror: 'compress created a block'.Root cause
Merge-order interaction between two PRs:
setupSessionhelper attests/export-cmd.test.ts:89asserted the old panel format/1 block/(… (~N reclaimed, 1 block)).… blocks: b1=mXXXXX–mYYYYY(blockSpanLabel, src/compress-tool.ts:499) and updated four test files — but missedtests/export-cmd.test.ts.Verified on master (2bdc831): reproduced all 7 failures before the change.
Fix
One line in
tests/export-cmd.test.ts:89: assert the new format using the sibling convention from #377 (/blocks: b\d+=/, same astests/decompress-cmd.test.ts:85which carries the identical assertion message). The helper compresses only m00002 so span detail does not affect the match.Remaining
/1 block/strings in other tests are intentional legacy-parsing coverage (old panel lines replayed from session logs) and were left untouched.Verification
node --import tsx --test tests/export-cmd.test.ts→ 10 pass / 0 fail (was 3 pass / 7 fail)npm test→ 725 tests, 722 pass, 0 fail, 3 skipped (pre-existing skips)npm run typecheckclean;npm run buildsuccessFixes #385