Skip to content

test(export-cmd): assert new compress panel block-span format (issue #385) - #388

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-09-12_fix-export-cmd-test-format
Closed

test(export-cmd): assert new compress panel block-span format (issue #385)#388
ranxianglei wants to merge 1 commit into
masterfrom
2026-09-12_fix-export-cmd-test-format

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Problem

Master test suite red: node --import tsx --test tests/export-cmd.test.ts → 7 fails, all error: 'compress created a block'.

Root cause

Merge-order interaction between two PRs:

  1. feat: add /acp-export command (session handoff export) #272 (acp-export command) landed first; its setupSession helper at tests/export-cmd.test.ts:89 asserted the old panel format /1 block/ (… (~N reclaimed, 1 block)).
  2. feat: report new block ids and actual ref spans in compress result panel (#376) #377 changed the panel line to … blocks: b1=mXXXXX–mYYYYY (blockSpanLabel, src/compress-tool.ts:499) and updated four test files — but missed tests/export-cmd.test.ts.
  3. The feat: report new block ids and actual ref spans in compress result panel (#376) #377 branch was based on pre-feat: add /acp-export command (session handoff export) #272-merge master, so its CI never ran this file; after both merges master went red.

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 as tests/decompress-cmd.test.ts:85 which 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 typecheck clean; npm run build success

Fixes #385

…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.
@github-actions

Copy link
Copy Markdown

📦 Built Extension Artifact

Branch: 2026-09-12_fix-export-cmd-test-format (8e78c1c)

Option A — Install from npm PR tag (recommended)

pi install npm:billion-context-pi@pr-388

Each push to this PR publishes a new version under the pr-388 npm tag.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pi-pr388.tgz
pi install ./package

This comment is automatically updated on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

[bot] 🏷 Closing as duplicate of #386.

Both PRs fix the same line (tests/export-cmd.test.ts:89, /1 block/ → new panel format) for issue #385. #386 was opened first (06:52Z) and uses the exact regex suggested in the issue body (/blocks: b1=/), so it takes precedence over this later PR (opened 06:58Z by an earlier bot session on #385 that didn't detect the existing PR — duplicate screening miss on our side).

#386 is verified green locally: tests/export-cmd.test.ts 10/10, full suite 725 tests / 722 pass / 0 fail / 3 pre-existing skips, typecheck + build clean. Please merge #386 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

master 测试红:export-cmd.test.ts 仍断言旧版 compress 结果格式(/1 block/),#377 改格式时漏更新

1 participant