Skip to content

chore(#387): pin acp-kernel 0.0.64 - #384

Merged
ranxianglei merged 2 commits into
masterfrom
2026-09-12_compress-block-spans
Sep 12, 2026
Merged

chore(#387): pin acp-kernel 0.0.64#384
ranxianglei merged 2 commits into
masterfrom
2026-09-12_compress-block-spans

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Version bump only: acp-kernel 0.0.63 → 0.0.64 (+ lockfile), 2 files / 5 lines.

History: this PR originally implemented #376 locally (compress result blocks: line via the kernel's new formatCreatedBlocks). While it was open, #377 — opened a day earlier, merged 8 minutes before this PR was created — landed the same feature with a richer local implementation (blockSpanLabel with * hole markers + Tn suffixes). The overlap caused the merge conflict reported on #375. This branch has been rebuilt on current master keeping only what #377 did not ship: the kernel pin bump, which activates the nudge-side half of the #375 fix:

  • Active blocks (N): b1=m00001–m00009 · … line in gentle/emergency nudges (exact block → ref-span ledger);
  • · N user msgs count on compressible ranges.

Verified against published 0.0.64: typecheck clean, build OK. Full suite needs #386 first (master currently carries 7 pre-existing export-cmd failures unrelated to this bump — verified failing identically on 0.0.63); with #386 applied the suite is fully green (725 tests, 0 fail).

Fixes #387

@ranxianglei

Copy link
Copy Markdown
Owner Author

解决冲突

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

📦 Built Extension Artifact

Branch: 2026-09-12_compress-block-spans (7fbd066)

Option A — Install from npm PR tag (recommended)

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

Each push to this PR publishes a new version under the pr-384 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-pr384.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

[bot] 🏷 冲突已解决,分支已 rebase 到当前 master(2bdc831,含 #377/#379/#363)并 force-push,新 head a955eeb。GitHub 现在显示 mergeable: true(状态 blocked = 仅等 CI,非冲突)。

冲突的本质(不只是文本重叠):master 上的 #377适配器端 blockSpanLabel() 把块跨度内联进括号((~Z reclaimed, blocks: b3=m00044–m00097*, …),带 * 内部排除标记和 (Tn) 层级标记);本 PR 用内核端 formatCreatedBlocks() 输出独立第二行。两者直接合并会在结果里把块列两遍。

解决方式(按 #376 floor 5 的原定路线:acp-kernel 落地后以内核为跨度唯一来源,本 PR 方案胜出):

  • 面板保持 PR 描述的两行形态:第一行纯计数 N blocks,第二行 blocks: bN=mXXXXX–mYYYYY(来自内核,span 取块存储的 startRef/endRef,fallback effectiveMessageIds;block-boundary spec 不会误渲染成 span)。
  • 删除已被取代的 src/compress-tool.tsblockSpanLabel()(变死代码)及其 6 个单测和 makeBlock/makeState 辅助函数。
  • 保留 compressPanelBlocks() 的双格式兼容解析(纯计数 + 历史内联格式)——旧 tool result 仍存在于 index/floor-stale 回放的 transcript 里,不能丢;并补了一条当前生产两行形态的断言。
  • feat: report new block ids and actual ref spans in compress result panel (#376) #377 的多 range e2e 与 partial-run 测试改为断言第二行格式(多块逐个列出、partial run 只列新建块),语义不变。

#377 的行为差异(内核格式化器的固有取舍,提请注意):不再有 * 内部排除标记和 (Tn) 层级标记;单消息跨度渲染为 bN=mXXXXX–mXXXXX

本地验证(rebase 后,针对已发布的 acp-kernel 0.0.64,已确认其在 npm 上存在,满足"内核先发"规则):

查重说明:本 PR 与已合并的 #377 同属 #376,但非重复——#377 是过渡性的适配器端实现,本 PR 是按原计划用内核 formatCreatedBlocks 取代它,故保持打开。

CI:pr-validation 已过,test matrix(ubuntu/windows × 22/24 + e2e)运行中,全绿后即可合并。


中文摘要:解决了本分支与 master(#377)在 compress 结果面板上的冲突——两边各实现了一遍块跨度输出,直接合并会重复列块;已按本 PR 的内核方案统一为第二行 blocks: 格式,删除被取代的适配器端 blockSpanLabel 死代码、保留旧格式解析回放兼容,本地 typecheck + 720 测试(3 skip)+ build 全绿,冲突已消除,待 CI 通过即可合并。

Enables the nudge-side half of the #375 fix: active block map
('Active blocks (N): b1=m00001–m00009 · …') and per-range user-msg
counts in efficiency/emergency nudges. Nudge text is rendered by the
kernel (renderNudgeText), so no adapter code changes are needed.
The compress-result block spans (#376) already shipped via #377.
@ranxianglei ranxianglei changed the title feat(#376): compress result reports each new block's ref span chore(#387): pin acp-kernel 0.0.64 Sep 12, 2026
@ranxianglei
ranxianglei force-pushed the 2026-09-12_compress-block-spans branch from a955eeb to b91d5c7 Compare September 12, 2026 06:53
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 跟进:我上一条回复后,本 PR 的 head 被替换了——处理 #387 的会话在 06:53Z 把分支重建为 pin-only(b91d5c7,父提交即当前 master),并改写了标题/body(新 body 里自述了这段历史)。方向与你在 #387 里定的 scope 一致(#376#377 覆盖,剩余工作 = 0.0.64 pin、零代码改动),所以我没有回推我之前的冲突解决版本。以下是我对新 head 的独立验证结果:

CI 失败已查证,与 pin 无关。 4 个 test job 挂掉的原因完全一致:tests/export-cmd.test.ts:89setupSession 辅助函数断言 compress 结果含 /1 block/(旧计数格式);#377 的内联格式((~1.8K reclaimed, blocks: b1=m00002))里没有这个子串,所以 7 个 export-cmd 测试全挂。这正是 #387 OP 里预告的「master 既有 7 个 export-cmd 失败」,#386 修的就是它。e2e / docker / build-artifact / pr-validation 均绿。

一个值得注意的细节:我之前的冲突解决 head a955eeb(内核 formatCreatedBlocks 两行格式)CI 是全绿的,包括这 7 个测试——因为它的第二行方案让第一行保留了纯计数 (~…reclaimed, 1 block),恰好满足旧断言。也就是说:如果将来想恢复内核格式化器路线,#386 的断言需要写成对两种格式都宽容(例如直接走 compressPanelBlocks() 解析而不是字符串匹配)。

当前状态与建议合并顺序:

  1. 先合 test(#385): match new compress panel format in export-cmd helper #386(修 export-cmd 断言,master 现有失败清零);
  2. 重跑本 PR(CI 应转绿);
  3. 合入本 PR(closes 升级 acp-kernel 0.0.63 → 0.0.64(启用 nudge 精确账本:活跃块地图 + 范围用户消息数) #387,nudge 侧精确账本生效)。

另外:两个 daemon 会话共用同一 bot 身份、在同一分支上静默互相覆盖这件事本身是个流程隐患(本次内容上无害,但不可复现安全),已单独提了流程 issue:ranxianglei/ework-daemon#2

我之前的冲突解决版本仍保留在本地(SHA a955eeb,CI 全绿),若你想恢复内核格式化器路线,说一声我就重推。


中文摘要:查证了新 head b91d5c7 的 4 个 CI 失败全部来自 master 既有的 7 个 export-cmd 断言(旧 /1 block/ 计数格式被 #377 内联格式打破),与 0.0.64 pin 本身无关;按 #387 的最新 scope 未回滚,建议先合 #386 再重跑合并本 PR,另就跨会话同分支覆盖问题提了流程 issue(ework-daemon#2)。

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.

升级 acp-kernel 0.0.63 → 0.0.64(启用 nudge 精确账本:活跃块地图 + 范围用户消息数)

1 participant