Repository navigation
fix: normalize Responses side-request compaction handoffs - #1765
ranxianglei merged 2 commits into
Conversation
[bot] 🏷 Reviewing this PR now — pulling branch |
[bot] 🏷 Review complete — LGTM, mergeable (merge itself stays human). All findings below verified locally on branch Verification results (run by me)
① Issue direction (#1763)Root cause confirmed and correctly layered: ② Regression inventory (existing behaviors on touched paths)
③④⑤ Code / test validity / diff cleanlinessCode is 8 lines in one branch, consistent with the existing One note for the record: this touches wire/message shape on the side lane, so per §7.4 it stays in human-merge territory regardless of how clean it is — nothing here blocks you from merging. 中文摘要:修复了 Responses 侧请求通道把 bili 私有的 |
3d17894 to
3de2ea8
Compare
|
头部分支已被删除,PR 冻结在旧 head |
|
Closing per owner instruction — superseded by #1822 (same change rebased onto current master as a single commit). Note: master gained WC-011 via #1733 in the meantime, so the rebased PR carries this rule as WC-012 (compaction-ID scope unchanged). Full review of the original head is on record in this thread. |
[bot] 🏷 已关闭 #1765(未合并),并在 PR 上留了关闭说明。执行前核对结果:
后续合并请以 #1822 为准;原 head 的完整 review 结论仍在本线程记录中(LGTM,wire-shape 变更按 §7.4 属人工合并范畴)。 |
|
@InCerryGit 撤回我之前的建议:这个 PR 不需要关闭,也不需要重开替代 PR —— 虽然头分支被删导致引用冻结在 我刚才误开了一个替代 PR(#1822),已关闭,并把同名分支恢复回你自己的 head |
…ost-merge supplements go to follow-up PRs Lesson from ranxianglei#1765 (2026-10-01): a first-time contributor's PR whose head branch was deleted was still MERGEABLE, but the Agent opened a replacement PR and suggested closing the original. Pin the rules: - external PRs: review + verification only — never push to their branch, never replace with an Agent-owned PR, never suggest closing; owner decides - deleted head branch ≠ dead PR (refs/pull/N/head freezes; check mergeable) - BEHIND is not a blocker - post-merge supplements: small follow-up PR referencing the original PR number, never appended to the merged PR
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.The strict loopback regression fails with the same ID rejection on current master before the fix and passes afterward, asserting one forward, retained summary/native item, unchanged output budget, and no injected tools. Add WC-011 to the permanent wire-contract ledger and fake validator, scoped to compaction IDs rather than function-call IDs.
Validation:
npm run typecheck,npm run build,git diff --check: passed.3d17894based on current master32a0c16: 3360 tests, 3341 passed, 0 failed, 19 skipped (isolated host environment/XDG directories).Only four files change: one server branch and three regression/contract files. No custom usage/billing changes, config changes, dependencies, version bumps, incident logs, or image artifacts. Related open #1431 changes side-request classification; this PR only normalizes requests already in that branch.