Skip to content

test(export): assert post-#377 compress panel format — fix master-red (#391) - #392

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

test(export): assert post-#377 compress panel format — fix master-red (#391)#392
ranxianglei wants to merge 1 commit into
masterfrom
2026-09-12_fix-export-cmd-panel-assert

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Fixes #391

One-line fix: tests/export-cmd.test.ts:89 still asserted the pre-#377 panel /1 block/; #377 changed the format to blocks: b1=m00002 but its branch predated #272's merge, so neither PR's CI saw the other's tests. Master went red on merge; PR #380's CI failure is inherited from this.

Verified: 10/10 export-cmd + full suite green on this branch.

…es master-red cross-PR regression (#391)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📦 Built Extension Artifact

Branch: 2026-09-12_fix-export-cmd-panel-assert (00b3ff8)

Option A — Install from npm PR tag (recommended)

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

Each push to this PR publishes a new version under the pr-392 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-pr392.tgz
pi install ./package

This comment is automatically updated on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Reviewed PR #392 end-to-end before recommending merge.

Verification (复现/查证)

Layer judgment (定位层次)
Root cause is correctly identified, not a symptom. #272 added the /acp-export test asserting the old panel /1 block/; #377 changed the live panel to blocks: b1=m00002. Confirmed in source: src/compress-tool.ts:498-501 builds …, blocks: <label>), and blockSpanLabel (:206-232) renders a single-message block covering m00002 as b1=m00002. Because #377 branched off pre-#272-merge, neither PR's CI saw the other's change → cross-PR regression surfaced only on merge. The fix updates the stale assertion to the real output; it does not mask any functional bug.

Solution validity (方案评估)
Correct and minimal. I grepped all of tests/* for other stale assertions on the old live-output format — none found. The remaining "… 1 block)" literals (view-recount.test.ts:104, compress-tool.test.ts:359, state-rebuild.test.ts:60) are intentional fixtures feeding the backward-compatible parser (compressPanelBlocks deliberately accepts both the legacy N blocks and the #376 blocks: span form), not stale assertions. So this single line is the complete fix — no sibling instances to chase.

Diff cleanliness: one line, exactly scoped to the described change. No unrelated files, no whitespace churn.

PR references its issue (Fixes #391) — trace requirement satisfied. Not merging (human-only); mergeable_state=blocked is the normal pre-merge state pending approval/CI.

中文摘要:修复了 #272/#377 交叉回归——master 上 export-cmd.test.ts:89 仍断言已被 #377 废弃的面板格式 /1 block/(实测 master 7/10 红),现已改为实际输出 /blocks: b1=m00002/;核验确认这是唯一的过期断言(其余 "1 block" 字样均为兼容解析器的测试夹具,非过期断言),改后全量 722 绿且 typecheck 通过,可以合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

已被 #393 取代(同一行字面量修复已随 #393 合并进 master,本 PR 变冗余且与 master 冲突)。建议关闭本 PR;若要消除格式耦合复发风险,合并 #390(把字面量正则换成生产谓词 isCompressSuccessText,已 rebase 到 master、9/9 CI 绿)。#391#393 因果链完整,无需其他动作。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Verified the supersession before acting, then closed #392.

Verification

Action taken

On #390 (the robust variant)

  • Confirmed it's rebased onto the current master tip bcd2770 and swaps the literal regex for the production predicate: assert.ok(isCompressSuccessText(text), …) (imports isCompressSuccessText from src/compress-tool.ts). That decouples the test from the exact panel string — the right long-term guard against this class of cross-PR format regression.
  • Ran its tests/export-cmd.test.ts locally: 10/10 green.
  • I did not merge it — PR merges are human-only here. It's open and ready; your call whether to land it in place of the literal assertion that test(export): assert post-#377 panel format in setupSession #393 introduced.

中文摘要:核实后确认 #393 已把同一行修复合入 master(现 tip bcd2770,line 89 已是 /blocks: b1=m00002/,且 #392#393 逐字节相同、完全冗余),已按你的要求关闭 #392(未合并、可重开);补一句——试合并显示它对当前 master 是干净 no-op 而非硬冲突,但结论一致。#390 已 rebase 到最新 master、改用生产谓词 isCompressSuccessText(本地 export-cmd 10/10 绿),更抗格式回归,是否合并由你拍板(我按规则不代合并)。

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.

master red: export-cmd.test.ts asserts pre-#377 panel format ("1 block") — cross-PR regression between #272 and #377

1 participant