Repository navigation
fix: normalize Responses side-request compaction handoffs - #1822
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1802-pr.1822.bc8efa1This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1822.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewing this PR now (not redoing the work — verifying the rebase per #1763's original review). Initial structural check ✅:
Continuing: code review vs the previously-approved #1765 fix, CI status, and local validation (typecheck + wire-contract + codex-compact-e2e + full suite). Full structured conclusion in my next comment. |
[bot] 🏷 ## Review 结论 — PR #1822(结构化七问) Rebase 保真度已独立验证(不是只看描述):head 七问
合并前唯一协调事项:open 的 #1431(anchor affinity 路由)改的是同一个 side-request 分支的入口条件( 判定可合并(merge 由人执行):#1822 —— 修复打在根因上,diff 干净(每行都在目的内),回归测试有牙且 A/B 验证过,CI 全绿,rebase 保真度可证明。建议合并顺序:本 PR 与 #1431 任选其一先合,另一个 rebase 后跟进。 |
225a2bf to
0ad9565
Compare
|
关闭本 PR:撤销替代方案。原 PR #1765(作者 @InCerryGit)仍处于可合并状态(其 head 分支被删导致引用冻结,但 head 本身 mergeable、CI 全绿),应直接合并原 PR。给首次贡献者带来的困扰,抱歉。 |
Supersedes #1765 — its head branch was deleted on the remote, so the old PR froze at stale head
0ad9565and can no longer receive pushes. This is the same single fix commit rebased onto current master (96137977, after #1814/#1784).Fixes #1763
Responses side requests can echo a private
fc_bili_*compaction handoff and receive HTTP 400 (Expected an ID that begins with 'cmp'). This branch bypassed the summary conversion already used by normal Responses preparation and the native fallback fixed in #770.Reuse
replaceBiliCompactionItems()before the side request is forwarded: retain the summary as a user message at its original position, drop legacy local markers without recoverable summaries, and preserve genuine upstream compaction items. Requests without local handoffs keep their raw buffer. Side requests still bypass kernel mutation and compression/tool injection. The normalization applies in both plugin and proxy modes once the request reaches the side lane; no compression carrier policy changes.Add the compaction-ID rule to the permanent wire-contract ledger and fake validator (WC-012), scoped to compaction IDs rather than function-call IDs.
Validation:
225a2bfeon master96137977: typecheck ✓; codex-compact-e2e + wire-contract 28/28 ✓; full local suite running (clean env).3de2ea8): focused 60/60; full suite 3360/3341/0/19.Only four files change: one server branch and three regression/contract files. Related open #1431 changes side-request classification; this PR only normalizes requests already in that branch.