Repository navigation
fix(ccr): pin acp-kernel 0.0.97 — stored-ref raw retransmission no longer leaks onto the wire (#1460 Step 0) - #1525
ranxianglei wants to merge 3 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1640-pr.1525.c936ed1This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1525.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review started. Plan: pull the branch, verify the four commits against the description, regression-audit the existing behaviors the kernel-pin bump touches (both compression modes), validate the new wire test actually has teeth (RED on 0.0.95 / GREEN on 0.0.97), run typecheck + build + full suite locally, and check CI (incl. the auto-triggered e2e run). Will report findings here. Note: this is a cross-repo pin bump → stays human-merge per §7.4 regardless of review outcome. |
f8ce9e3 to
811171b
Compare
[bot] 🏷 Review complete — mergeable. I rebased the branch onto current master and re-verified everything locally; details below. What I did to the branch (verified with git):
① Direction (#1460 Step 0): sound. The root cause of the raw-retransmission leak lived in acp-kernel ( ② Regression audit — existing behaviors touched:
③/④ Code + test validity: the test has teeth — I re-ran it against kernel 0.0.95 locally: fails with exactly ⑤ Diff cleanliness: clean after rebase (see above). Hot-file contention check across all open PRs: none touch Pre-flight / CI on rebased head Old-head CI (f8ce9e3) was also fully green (13/13 incl. e2e), which already exercised this exact store.ts change + kernel 0.0.97. Verdict: 可合并 — please merge when convenient (merge stays human-only). 中文摘要:修复了 CCR 存储引用在客户端重发原始字节时泄漏回上游线的问题(内核侧已由 #458/0.0.97 修复并经 #1505 合入),本 PR 补上了专门的线级回归测试(含占位符字节稳定性断言,已验证在 0.0.95 上 RED)和 adoption 路径占位符重建缺 command 导致字节漂移的小修;分支已 rebase 到当前 master(pin 提交因 #1505 已合入而剔除),本地与 CI 全绿,可以合并。 |
[bot] 🏷 Follow-up: the manually dispatched |
|
Stale: pins acp-kernel 0.0.97 while master is on 0.0.98 — rebasing would regenerate the lockfile noise. If the underlying fix landed another way, suggest closing; otherwise happy to rebase onto current master. |
The new #1460 raw-retransmission test left its CCR-armed session in the file-global SessionStore (closeRig only closes sockets), which broke the downstream route-scoped test's global session-count assertion. - drop the test's own session in finally (dropSessionForGc) - scope the route-scoped arming assertion to its own plugin-lane conversation: it checks THIS config does not arm the plugin lane, not that sessions armed by other tests under other configs are absent
…adoption adoptContentStore rebuilt stored placeholders without the arrival-time command, so adopted placeholders could differ byte-for-byte from the primary store path's output and the saved-bytes stat diverged from reality. Pass entry.command through (kernel API added in 0.0.96).
811171b to
ccc346e
Compare
[bot] 🏷 Rebased onto current master — done and verified. One clarification first: the PR no longer pins anything. Since yesterday's review rebase, the Why not close: I re-checked current master before rebasing — both remaining changes are still live and absent there: What I did (all verified with git/CI):
Note: the PR title still says "pin acp-kernel 0.0.97" — I left it as provenance of where the work came from, with the final scope fully documented in the body. Happy to rename it to something like 中文摘要:分支已再次 rebase 到当前 master(v0.1.172 / 内核 0.0.98,新 head ccc346e)并全量验证通过(3241 测试 0 失败);该 PR 实际不含任何 pin/lockfile 改动(pin 提交此前已因 #1505 先行合入而剔除),剩余两项改动(#1460 线级回归测试 + adoption 占位符字节漂移修复)在当前 master 上仍然缺失且有效,故不建议关闭,等待合并即可。 |
[bot] 🏷 CI confirmation: all 13 checks are green on rebased head |
Part of #1460 (Step 0 — stored-ref rematerialization correctness). Does NOT close #1460: it is the umbrella design issue, Steps 1–4 remain.
What
Four commits:
test(ccr)— wire-level regression intests/ccr-plugin.test.ts: turn 1 stores an oversized tool result → outbound carries the[acp-stored …]placeholder, not the raw text; turn 2 re-sends the client's own history containing the RAW result again (what every plain proxy-mode client does) → asserts the raw text never re-enters the wire and the historical position keeps the byte-identical placeholder. RED on acp-kernel 0.0.95, GREEN on 0.0.97.test(ccr)— isolate that test from the file-global SessionStore (drop its session infinally; scope the route-scoped arming assertion to its own conversation) so it can't pollute neighboring tests' global-session assertions.fix(ccr)— pinacp-kernel0.0.95 → 0.0.97 (exact).fix(ccr)— incidental small fix insrc/store.ts:adoptContentStorenow passes the arrival-timecommandthrough tobuildStoredPlaceholder, so placeholders rebuilt on adoption are byte-identical to the primary store path's output and the saved-bytes stat matches reality (kernel API added in 0.0.96).Why
#1460 Step 0 established that when a client re-sends the raw bytes of an already-stored tool result, the old kernel let the raw text back onto the upstream wire (
hasStoredRefshort-circuit returned the message untouched) — and if the same request also carried anacp_retrieveinjection, one request could hold two full copies. Fixed upstream by acp-kernel#458 (re-project into the canonical placeholder at re-arrival); released as 0.0.97 together with the #1476 follow-up fix (lastPassIds discriminator, acp-kernel#463). Note: 0.0.96's first attempt at that follow-up (naive reconcile-live-ids) regressed full-history-resending hosts — 55 failures in this repo's suite — which is why this pin lands on 0.0.97, not 0.0.96.Behavior changes (disclosure)
src/store.tsadoption path: saved-bytes accounting now reflects the actual placeholder bytes (stat-only; wire bytes unchanged).Pre-flight
npm run typecheck— cleannpm run build— OKnpm test— 2884 tests, 2872 pass, 0 fail, 12 skip (the new wire test is green on the pinned 0.0.97; suite was 55-fail on 0.0.96 and red-on-the-new-test on 0.0.95)CI's e2e workflow auto-triggers on this diff (acp-kernel pin bump is a pipeline change per
.github/workflows/ci-e2e.yml).Addendum — review rebase (2026-09-28): The branch was 126 commits behind master at review time. It has been rebased onto
86e0b684(current master) and force-pushed:fix(ccr): bump acp-kernel 0.0.95 -> 0.0.97) is dropped: master already pins 0.0.97 (landed via chore: pin acp-kernel 0.0.97 — post-fold echo discrimination (kernel #463) #1505), so the pin commit became an empty no-op on rebase. This PR no longer touchespackage.json/package-lock.json. The kernel behavior changes it described (release v0.1.70 #458 re-projection, plugin 模式 openai/anthropic wire 出站不 strip 模型 emit 的 <acp> 渲染标签(responses wire 有、openai/anthropic 无)— 泄漏到客户端 TUI #457 whole-body parser, fix(#457): strip model-emitted render tags from plugin-mode openai/anthropic wires #459+plugin 模式 openai SSE:混合文本字段 chunk 因单字段纯标签 echo 被整体丢弃(丢失同 chunk 真实输出) #463 reconcile-live-ids) are already in master's tree and were audited under chore: pin acp-kernel 0.0.97 — post-fold echo discrimination (kernel #463) #1505; the disclosure above remains accurate as a description of what the pin pulled in.src/store.tscommand passthrough (3 linear commits, original authorship preserved).raw original leaked back onto the turn-2 wire (#1460); on 0.0.97 green. Also reproduced that WITHOUT the isolation commit, the new test breaks the route-scoped test's global session-count assertion on current master — so both test commits remain necessary.Addendum 2 — rebase onto v0.1.172 master (2026-09-30): master moved past
86e0b684(kernel pin advanced 0.0.97 → 0.0.98 via subsequent releases). The branch was rebased again onto current masterc0e9e65f(release v0.1.172) and force-pushed: new headccc346e4. No conflicts; still exactly 3 linear commits touching onlysrc/store.ts(+1) andtests/ccr-plugin.test.ts(+41/−2) — no manifest or lockfile changes at any point, so there is no lockfile noise in this PR's diff (the kernel pin itself was never part of the final diff; it arrived via #1505). Verified on the new head against kernel 0.0.98 (StoredPlaceholderInput.commandAPI confirmed intact in 0.0.98 typings): typecheck clean, build OK, full suite 3241 tests, 3229 pass, 0 fail, 12 skip. Both remaining changes were re-confirmed absent on current master before rebasing (adoption placeholder still built withoutcommand; no standalone #1460 wire test), so nothing here became redundant.