Repository navigation
fix(#2697): align image-request-budget tests with post-#2688 API - #2703
ranxianglei wants to merge 1 commit into
Conversation
master typecheck broke via merge ordering: #2688 removed compress.stripImages from the kernel CompressSettings (default media folding replaced it), then #2613 landed tests/image-request-budget.test.ts 31s later, still written against the removed keys (TS2353/TS2339). Test expectations rewritten to the shipped contract: the fixture drops stripImages/stripImagesKeepRecent; over-budget rebuilds now ALWAYS stop at the forward-stage 413 (request_too_large) without touching upstream, for both plain-message and tool-screenshot histories (the old 'stripping shrank it to 200' case and the 'disabled stripping' toggle case collapse into one unconditional 413 case); the decode-admission slot-release case ends in the forward 413 instead of a successful forward (slot release still proven: decode admitted, small-traffic isolation unchanged). No runtime code changes; pins behavior already shipped by #2688/#2640. Verified locally: targeted node --test run 5/5 green, npm run typecheck clean.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2917-pr.2703.d0efbf4This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2703.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 PR #2703 审查完成 — 代码、本地定向验证、CI、以及与 #2702 的对照实证全部通过。可合并。 结构化八问
验证证据
过程备注(运维):审查中段沙箱共享磁盘一度打满(ENOSPC),工具层整体停摆约数小时,期间已完成代码审查与 #2703 本地验证;恢复后补齐了 CI 确认与 #2702 对照实证,并清理了本人产生的临时依赖目录与工作树。 判定:#2703 审查通过(CI 全绿 + 本地 5/5 + 回归清点干净),可合并;建议与 #2702/#2699 的重复处置一并处理。 |
[bot] 🏷 冲突处置完成:本 PR 已被 master 上的等价修复取代 → 已关闭(未合并)。不 rebase、不硬救。 结构化八问
备注:master 版本里有一个独立用例与循环用例的 判定:冲突以「关闭被取代的 PR」收口;原 issue(#2697)所求的 master typecheck 修复已由 #2702 分支完整落地并经 CI 验证,无需进一步动作。 |
Closes #2697
根因(合并顺序陷阱,双方代码均无错)
a9fdc5374,16:10:02Z 并入)从 kernelCompressSettings删除了compress.stripImages/stripImagesKeepRecent(默认 media folding 取代,Archive-then-fold: default folding for archivable media (Closes #2607, Fixes #2609) #2640/建议:compress.stripImages默认开启——否则带图消息不可压缩会形成只升不降的输入地板撑爆上下文 #2607);ae7d9c0b4,晚 31 秒并入)新增的tests/image-request-budget.test.ts基于删除前 API 开发 → 两个各自正确的合并叠加后 master typecheck 红(TS2353/TS2339)。修法(零运行时改动)
测试文件对齐已发布契约:
request_too_large,不触达 upstream;行为变更披露(仅测试预期,运行时行为无变化)
不涉及:运行时行为、config surface、持久化格式、kernel/、pi-subagents/。
验证
node --import tsx --test tests/image-request-budget.test.ts→ 5/5 pass(修复前复现 TS2353/TS2339 逐字一致);npm run typecheckclean;