You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
02:24:16.644 [info] [acp-proxy: [Compressed m00001–m00003 → 1 block(s), ~4846 tokens saved.
Excluded 2 protected message(s) m00004, m00005 from compression range (recent/last-user zone).]]
02:24:16.646 [error] preflight fail-fast 502 (retryable=false): context ~15339 tokens exceeds the
model window 11000 (model=qwen3.8-27b) and preflight compression could not bring it under:
no compressible ranges remain in the conversation. The over-window payload was NOT forwarded.
02:24:16.853 [error] preflight fail-fast 502 ... ~14712 ... no part of the conversation is
compressible (nothing left to fold) ...
02:24:17.231 [error] (同上)
02:24:18.038 [error] (同上)
02:24:19.775 [error] (同上) ← codex 每次重试都撞同一堵墙
Activity
ranxianglei commentedon Aug 29, 2026
[bot] 已修复,PR: #334
采纳方案 A(你倾向的最小语义破坏),实现细节:
根因确认:
preflightCompressIfNeeded(src/server.ts)在两处对 "exhausted"(无可折范围)状态 fail-fast 502。这个状态是静态的——客户端重试永远撞同一堵墙(软保护区不随重试变化),而 EMERGENCY nudge 的恢复路径恰恰需要请求到达模型,fail-fast 把它切断了 → 永久 502 循环。改动(src/server.ts:1807, 1853-1872 两处):
failure.kind === "exhausted"→ 带 warning 转发;若 preflight 已部分压缩,转发重建后的载荷(保留部分压缩成果)保留 fail-fast 的场景(瞬态状态,重试可自愈,不属于 livelock):
Retry-After: 30为什么转发是安全的:bili 的窗口限制常是 fallback/learned/relay 估计值,不是 ground truth。转发后让事实裁决:
测试(tests/preflight-fail-fast.test.ts):
learnedContextLimits= 8000)Pre-flight:typecheck 干净 · 746/746 测试通过 · build 干净
C 方案(硬截断)未采用:A 已保证活性且零信息丢失,C 的有损截断只在上游也拒绝时才有意义,而那时客户端已经拿到真实 400 可以自行处理。
fix: detect codex compaction requests before preflight; verbatim pass…
Merge pull request #335 from ranxianglei/2026-08-29_compaction-prefli…
fix: pin acp-kernel 0.0.80 (protectedLatestTools + acp_rule rules API)