Skip to content

chore: pin acp-kernel 0.0.97 — post-fold echo discrimination (kernel #463) - #1505

Merged
ranxianglei merged 3 commits into
masterfrom
2026-09-27_kernel-0.0.97
Sep 27, 2026
Merged

ranxianglei merged 3 commits into
masterfrom
2026-09-27_kernel-0.0.97

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

What & why

Pin-only bump acp-kernel 0.0.95 → 0.0.97. Supersedes #1488 (the 0.0.96 pin bump — 0.0.96 carries a P0 regression; see below). Precedent: #1423.

v0.0.97 = v0.0.96 + the regression fix. Everything #1488 wanted from 0.0.96 rides in here too — 0.0.97 fully contains 0.0.96's payload:

kernel PR fixes summary
#457 #1456 parseStoredPlaceholder() strict whole-body parser — text merely mentioning [acp-stored no longer misclassified as a canonical placeholder; all three call sites 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 instead of leaking multi-MB raw back to the wire
#459 #1476 (already closed) remintCoveredLiveIds — live resend of already-covered content gets deterministic _N instance suffixes instead of colliding with the folded copy's ref
#463 kernel #462 the reason we skip 0.0.96: lastPassIds snapshot discriminates post-fold resends (echo → keep id, prune swallows) from genuinely new instances (→ renumber); missing snapshot → one pass of 0.0.95 semantics

Why skip 0.0.96

0.0.96's #459 regression: stateless hosts resend folded originals every turn → live ids ∈ covered got renumbered as "new instances" → prune escape (baseIdOf strips #tail but not _n) → folded content rejoined the wire beside its summary every turn → wire re-inflation → e2e-codex-fake overflow → preflight 502 → turn lost. bc master pins 0.0.95, so the regression never shipped here — this bump skips over it.

Changes

  • package.json: "acp-kernel": "0.0.97"
  • package-lock.json: regenerated

Behavior changes

None at the bc layer. Kernel-side: post-fold resends of folded originals are kept under their stable refs and pruned (pre-0.0.96 contract restored); genuinely new duplicate instances still renumber (#1476 preserved); placeholder parsing strict + raw replays re-projected (#1456/#1460 fixed); old persisted CompressionState without lastPassIds degrades gracefully for one pass.

Tests

  • npm run typecheck ✅ locally
  • npm test → remote CI (local sandbox aborted; e2e-codex-fake needs ACP_TEST_E2E_FAKE=1 with real codex)
  • Acceptance sentinel: tests/e2e/e2e-codex-fake.test.ts overflow lane — the test that caught the 0.0.96 regression

Config surface

None.

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

Test updates (e98f3a5)

CI on the initial pin bump showed 4 test-matrix lanes red while every e2e lane was green. Root cause: two #1457 lanes in tests/ccr-plugin.test.ts asserted f3.includes(GONE) — "re-issued retrieve (resent call+ack) still serves the stored text" — which passed on 0.0.95 only because the pre-fold original leaked raw back onto the wire on host resend. No re-issue mechanism ever existed (no executeRetrieve call site on ingress; no [acp-retrieved] injection on the 0.0.95 turn-3 wire — verified by dumping the forward). Kernel #458 (0.0.96) deliberately kills that leak: stored refs re-arriving are re-projected to their canonical 📦 [acp-stored ...] placeholder.

Both lanes were updated to the real contract:

  • turn 3: resent original is re-projected to the placeholder ([acp-stored present, GONE absent — no raw leak), correction note still commits on the confirmed 2xx.
  • new final turn: the model follows the note and re-issues acp_retrieve through the plugin tool endpoint; the re-queued injection rides that forward with the full text ([acp-retrieved + GONE) and commits as one delivery (retrieveDelivered === 1).

Local run on 0.0.97: tests/ccr-plugin.test.ts 12/12 pass. Note these two tests now require acp-kernel ≥ 0.0.96 — intentionally coupled to this bump.

reconcile-live-ids post-fold echo discrimination (kernel #463, fixes
kernel #462 / #1476 class); 0.0.96 regression (wire re-inflation ->
preflight 502) never shipped here — 0.0.95 -> 0.0.97 skips it.
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-27_kernel-0.0.97 (e98f3a5)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.1442-pr.1505.849e967

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-pr1505.tgz
npm install -g package

Install instructions are refreshed on each push.

Kernel #458 (acp-kernel 0.0.96) stops the pre-fold original from
leaking raw back onto the wire on host resend — stored refs are
re-projected to their canonical 📦 placeholder instead. The two #1457
lanes passed on 0.0.95 only because that leak re-served BIG_TEXT on
turn 3; their comment claimed a 're-issued retrieve on resent
call+ack' mechanism that never existed (no executeRetrieve call site
on ingress, no injection message on the 0.0.95 wire).

Both lanes now assert the real contract:
- turn 3: placeholder re-projected, NO raw original on the wire,
  correction note still commits on the confirmed 2xx
- new final turn: the model follows the note and re-issues
  acp_retrieve via the plugin tool endpoint; the re-queued injection
  rides that forward with the full text and commits as one delivery
  (retrieveDelivered === 1)

These tests now require acp-kernel >= 0.0.96 — part of the 0.0.97
pin bump in this PR.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review complete — CI red root-caused, fix landed (e98f3a5), all checks now green. Ready for human merge.

What I verified

① Direction & diff cleanliness. Branch vs origin/master: exactly package.json + package-lock.json (acp-kernel 0.0.95 → 0.0.97, exact pin, lockfile integrity updated) — plus your follow-up test commit e98f3a53. No src/ changes, no unrelated churn. Kernel 0.0.97 confirmed live on npm (cross-repo ordering satisfied).

② Reproduced the CI failure locally and found the mechanism. On the pre-fix head: npm test → 2961 tests, 2 fail, both in tests/ccr-plugin.test.ts (#1457 openai/anthropic lanes), dying on f3.includes(GONE) ("re-issued retrieve … still serves the stored text"). Root cause is not #463 — in those tests there are no folded ids, so remintCoveredLiveIds early-returns (no-op). It's the other change the jump pulls in:

  • kernel release v0.1.70 #458 (shipped in acp-kernel 0.0.96, bc#1456/design(ccr): active working-set policy for store-on-arrival and ephemeral retrieval churn #1460): the CCR store node's handling of raw retransmissions changed. Verified by diffing the extracted bundles:
    • 0.0.95 storeLargeResults: if (hasStoredRef(current, ref)) return message; — a stored ref whose raw bytes arrive again is returned unchanged: the full original rode back onto the wire on every subsequent forward (the bc#1456 leak).
    • 0.0.96+: const existing = current.byRef[ref]; if (existing) return { ...message, text: restoreStoredPlaceholderText(...) } — raw retransmission is re-projected to the canonical placeholder.
  • The two bug(ccr): retrieval-drop correction notes are consumed before upstream delivery is confirmed #1457 tails passed on 0.0.95 only because of that leak. Your commit message nails it: the "re-issued retrieve on resent call+ack" mechanism they claimed never existed — processTurn takes no tool-executor callback and executeProxyTool has no ingress call site; ingested history never triggers executeRetrieve. (I reached the same conclusion independently before seeing your push — I had prepared an equivalent assertion-flip locally, then discarded it in favor of your commit, which is strictly better: it also adds the real re-issue turn where a fresh acp_retrieve rides as the injection and commits as one delivery, retrieveDelivered === 1.)

③ Post-fix state (verified).

  • Local: tests/ccr-plugin.test.ts 12/12 pass on e98f3a53; earlier full run (my equivalent fix): 2961 tests, 0 fail, typecheck clean.
  • Remote CI on e98f3a53: CI (unit matrix) success + all e2e workflows success — E2E real codex, e2e-fake-codex (the acceptance sentinel), e2e-native-pi/dsh/opencode, e2e-local-registry, Windows codex overlay, artifacts. PR mergeable_state was still computing at check time; with CI green it should clear.

④ Behavior change disclosure (per policy, old → new):

  • CCR wire behavior for raw retransmissions of stored tool results: pre-bump (kernel ≤0.0.95) the original bytes re-leaked onto every subsequent forward once a host resent its own history; post-bump (≥0.0.96 semantics) they are re-projected to the arrival-time placeholder, byte-stable across turns. Reason: deliberate kernel leak fix (release v0.1.70 #458 / bc#1456), not a bc regression. Full text now returns to the wire only via a fresh acp_retrieve call (the lane the updated tests now pin explicitly). Suggested PR-description tweak: the "Behavior changes: None at the bc layer" line should be supplemented with this — the description's "exactly one fix" is correct for the v0.0.96..v0.0.97 range, but from master's vantage (pinned at 0.0.95) the jump lands both release v0.1.70 #458 and plugin 模式 openai SSE:混合文本字段 chunk 因单字段纯标签 echo 被整体丢弃(丢失同 chunk 真实输出) #463.

⑤ Sequencing note: sibling branch 2026-09-27_ccr-retransmission-regression (c7f4aec8, the dedicated #1460 wire-level regression test) is based on master@0.0.95, where its !f2.includes(BIG_TEXT) assertion fails by definition (the leak exists there). Land #1505 first, then rebase that branch onto the new master — or fold it in here if you'd rather keep the #1460 coverage in one PR.

No action taken beyond verification: I pushed nothing (my local duplicate commit was reset away after your e98f3a53 appeared). Merge stays with you: #1505

中文摘要:核查了 0.0.95→0.0.97 pin 升级——CI 红灯的根因是跳版带入的 kernel #458(存 ref 原始字节重传不再泄漏回线上、改投占位符,bc#1456 泄漏修复),旧 #1457 测试尾部靠该泄漏才通过、其注释声称的"重发即重取"机制并不存在;你在 e98f3a5 的修法正确且更完整(补了真实重取回合),本地与远端 CI 现已全绿,可以合并。

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