Skip to content

chore: pin acp-kernel 0.0.96 — reid (#1476), strict placeholder parser (#1456), raw re-projection (#1460) - #1488

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-09-27_kernel-0.0.96
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-09-27_kernel-0.0.96

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Bumps the pinned acp-kernel from 0.0.95 to 0.0.96 (npm latest, published 2026-09-27T10:46Z), picking up the three kernel fixes that landed since 0.0.95:

What rides in 0.0.96

kernel PR fixes summary
#459 #1476 (already closed at the kernel merge) remintCoveredLiveIds — live resend of already-covered content gets deterministic _N instance suffixes instead of colliding with the folded copy's ref (assignRefs first-wins starved the new instance)
#457 #1456 (kernel-side root cause) parseStoredPlaceholder() strict whole-body parser — ordinary text merely mentioning [acp-stored is no longer misclassified as a canonical placeholder; all three call sites (storeLargeResults, storeCoveredOriginals, absorb candidates) now require the exact two-line canonical shape citing the message's own ref
#458 #1460 (raw-leak half) stored-ref raw bytes re-arriving (fork/recovery replay) are re-projected to the canonical placeholder via frozen store fields (incl. new persisted command) instead of leaking multi-MB raw back to the wire

The two fixes interlock at storeLargeResults: placeholder echo → 457's own-ref gate returns it unchanged; raw replay → falls through to 458's re-projection.

Validation

  • tsconfig.build.json typecheck: 0 errors against the real 0.0.96 npm tarball
  • wire-contract goldens regenerated via node --import tsx scripts/update-wire-contract-goldens.ts: byte-identical (no schema drift — the new kernel exports are not on bili's contract surfaces)
  • local vitest in this environment hangs on unrelated environmental files (same set fails on pristine master), so behavioral validation is delegated to CI — the ccr/ccr-v2/fork-ccr-adoption files run there

Fixes #1456
Refs #1460 (design issue — the working-set half remains open), refs #1476 (closed at kernel merge; this pin delivers the fix to bili users)

@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-27_kernel-0.0.96 (e84a743)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.1413-pr.1488.686862d

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr1488.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到,正在审核这个 acp-kernel 0.0.96 的 pin bump PR。按规范流程走:核对原 issue(#1456/#1460/#1476)、diff 范围、CI 状态与本地预检(typecheck/test/build),稍后给出结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Verdict: HOLD — do not merge. The pin head is red on CI where master is green, and I've root-caused it to a pipeline-contract break in kernel 0.0.96's new reconcile-live-ids node. Full evidence below.

Checks that pass

Checks that fail: CI on head e84a743 is red

Root cause (A/B verified against both published tarballs)
Scenario: 40 alternating messages → fold m00001–m00015 → client resends the FULL original history (what every proxy-mode client does on the next turn) → second processTurn:

0.0.95 0.0.96
turn.messages after resend 27 = acp_summary_b1 at anchor + 26 uncovered raws 40 = all raws survive; covered 15 re-minted h_<root>_1; no summary in list
count_tokens projection (no tool call) 40→26, in-place summary kept 40→40, nothing pruned, no summary anywhere
same, with compress tool_use+tool_result 42→27, tool pair survives as carrier 42→40, tool pair gone

The new node (src/instance-reid.ts, first in buildNodes()) re-mints any LIVE message whose content-hash root is in coveredMessageIds, on the premise that "any live message carrying a covered id is a new instance." That discriminator conflates two situations: (a) a host replaying the very originals it was folded from — proxy mode executes compress server-side, the ephemeral tool call never enters client history, so the next request resends the folded messages verbatim; those resends ARE the originals — and (b) a genuinely new duplicate arriving later (the scenario the fix targets). For (a), pre-0.0.96 behavior was load-bearing: covered ⇒ pruned, replaced by the rendered summary. Now those resends get _N ids, escape prune, and take fresh refs (bare ids still owned by the folded copy). Three distinct regressions follow:

  1. Payload bloat — folded content returns to the wire every turn after a fold; compression is effectively undone.
  2. Summary-carrier loss in BOTH modes — in-place anchor disappears (proxy w/o tool call) AND the compress tool pair vanishes from prepared output (plugin mode); the model loses the compressed context entirely.
  3. Stale ref anchoring — ranges computed from state refs no longer match post-remint live ids → fail-fast 502 loop (the codex e2e failure above).

Where the fix belongs
Kernel side. A host-side compensation (e.g., pruning by cluster-root after processTurn) would mask a unilaterally changed pipeline contract — the same anti-pattern as #933/#1039. Suggested options for the owner: narrow the discriminator (only remint when the live occurrence is NOT the covered original being replayed — position/content-chain identity), or expose a Ports opt-in/out so hosts declare their resend semantics. Either way: ship a 0.0.97, then re-pin here. Sibling consumers that resend full history (billion-context-pi) likely hit the same wall — not independently verified from my side.

I've filed the kernel-side finding as ranxianglei/acp-kernel#461 (来源 marker included) with the minimal repro.

Side note: the #1456 thread promised a host-side follow-up — tighten src/fork-adoption.ts:112 citedPlaceholderRefs() to use parseStoredPlaceholder() — which this PR does not include. Fine to land separately, but don't lose it.

Per policy this is a cross-repo dependency bump — human-gated regardless; I won't merge.

中文摘要:0.0.96 新增的 remintCoveredLiveIds 把「客户端重放已被折叠的原始消息」误判为「新重复消息」,导致折叠后每轮原始内容重回线上(压缩失效)、摘要载体(锚点与 compress tool call)双双丢失、preflight 引用失配触发 502 死循环——master 全绿而本 PR 红(56 个单测 + codex e2e),根因在 kernel 侧,建议先在 acp-kernel 修出 0.0.97(已立 acp-kernel#461)再重新 pin,本 PR 先挂起、不要合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

Superseded by #1505 (pin 0.0.97 = 0.0.96 payload + the kernel #463 fix for the #459 post-fold echo regression that this PR's CI caught). Do not merge this — 0.0.96 pins the regression in. Closing in favor of #1505, which is verified green (CI 13/13; locally: typecheck 0, ccr-plugin 12/12 with the post-#458 resend assertions, wire-contract/cache-ledger/issue1307 31/31, and the e2e-codex-fake overflow sentinel — the test that caught the regression — passes on published npm 0.0.97).

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.

bug(ccr): embedded [acp-stored text is misclassified as a canonical placeholder

1 participant