Repository navigation
Fix #3344 range-review leftovers: stale docs, kernel lockfile, INERT config warns, SIGKILL escalation, 2xx-only ack - #3355
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4031-pr.3355.c1b5886This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3355.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 这是 #3344(owner 清单)的唯一实现 PR;在途 PR 里最接近的 #3340(incremental ack 按 turn id 归因)与 #3349(marker divert 绕过管理面)机制均不同——本 PR 第 6 项改的是「失败响应不再盖 ack 头」,与归因、路由无关。 独立审核完成(未照抄 PR 描述,逐项对 master/pr head 代码复核 + 本地定向复跑)。PR head 结构化八问
行为变更清单(old → new,均已按规范披露)
验证证据
判定可合(等最后一个 CI test 分片转绿即可,预期无悬念)。合并须人工执行:触碰 |
(ai: vllm-qwen/qwen3.8-27b) CI 追平确认:head |
|
ai: zhipuai-lb/glm-5.3 这个 PR 修的 INERT 告警缺口(已删配置键
麻烦 rebase 到最新 master 解掉冲突;如果和 #3400 的实现 PR 撞键名,以「老键告警 + 新键另行注册」为边界。 |
9854907 to
00f406b
Compare
The env-variable description row still said 'default 8' while L173 and the env table already say 0 (the code default is 0 since #3050). One-line fix in en + zh.
…lt upstream (#3344/#3129) #3129 switched the no-CLOUD_CODE_URL default from cloudcode-pa to daily-cloudcode-pa (bare cloudcode-pa 400s on /v1internal:*), but the docs still named only the old production host. Updated README en/zh, CLIENTS en/zh (default-upstream sentence + MITM-fallback domain whitelist), cli help text, and web i18n notes.
…on keys (#3344) compress.absorb (#3293) and compress.imageCompression (#3266) were removed, so users who had enabled them get their config silently ignored on upgrade. Added a one-time INERT warning (same pattern as the existing warnInertStripImages / warnInertResignPassthrough) that scans all three compress levels and names the exact offending paths.
…leanup error (#3344) killAndVerify sent SIGTERM to a replacement process that survived, then only logged an error asking for manual cleanup. Added a SIGKILL round with its own verification window before falling back to the manual-cleanup error, so a stuck replacement is reaped automatically. Updated the #3044 regression test: a SIGTERM-ignoring stub is now reaped by the escalation instead of leaking.
The writeHead wrapper stamped the ack header on whatever status the pipeline wrote, including failures. A host trusting it unconditionally would skip its resend after a failed turn and lose the user's message. Now the header is set only for 2xx. In-repo clients already gate on 200, so this tightens the contract without changing live behavior. Added a failure-path regression test.
00f406b to
d83b0b5
Compare
(ai: vllm-qwen/qwen3.8-27b) 已按指示 rebase 到最新 master( 关键发现——第 ③ 项已被上游解决,rebase 时丢弃了该 commit:master 的 #3381(kernel 源码变更)在评审期间已经把 与 #3400 的键名边界(按你定的口径落实):#3400 目前还是 open、实现未合入 master(master 上 grep 不到 结构化八问
验证证据
判定可合(等 CI test 分片转绿,预期无悬念)。合并仍须人工执行;第 ② 项 daily 上游措辞的确认也仍挂在你那边。 |
(ai: vllm-qwen/qwen3.8-27b) CI 追平确认:rebase 后 head |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.509-master.f95d8b8 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Redoes the image pre-compression removed in #3295 in simplified form: on every outbound request (after kernel folding, before protocol encoding, one shared pass over the generic message structure) an image whose longest edge exceeds 1600px (BILI_IMAGE_RESCALE_MAX_DIM) or whose base64 body exceeds 100KB is re-encoded fit-inside (never upscaled, original format kept) on an outbound COPY only - session storage keeps the original bytes byte-exact. A re-encode saving less than 20% of the bytes is discarded (keep-smaller), so small and low-benefit images pass through untouched. Only PNG/JPEG/BMP are handled (pure-JS jimp encoder, zero native dependencies - sharp does not return). Each shrunken image carries a stable annotation beside it reporting current vs original size. Lanes that register bili tools name read_original_image("mNNNNN") in the annotation: proxy-injection lanes get it via the per-protocol manifest lists, plugin lanes (DSH/opencode) via handlePluginManifest; tool-rejecting lanes (codex) get size-only notes and no tool. read_original_image returns the original bytes from local session storage (incomingImageIndex spill files); its results are structurally exempt from re-shrinking - the zero-state loop guard against the #3266 guess-reject-resend disease. Output is deterministic: content-hash encode cache (one encode per unique image), stable note text derived only from dims/bytes/ref - the same history produces byte-identical outbound bodies, so upstream prefix caching is undisturbed (#3266 lesson). Observability: one log line per unique image and one per original-image read (ref, sizes, session cumulative count+bytes); no hard cap. Knobs (config surface): top-level config key imageRescale (boolean, default true), env BILI_IMAGE_RESCALE ("0"/"false" off, live-read), env BILI_IMAGE_RESCALE_MAX_DIM (default 1600, env-only). Documented in CONFIGURATION.md en+zh. Legacy compress.imageCompression.* INERT warnings remain owned by #3344/#3355. Also removes the dead external:["sharp"] leftover from #3295 in tsup.config.ts and adds jimp to the inlined devDependencies list. kernel/** untouched.
Closes #3344
Implements the 7-item hygiene checklist from the #3331 v0.1.197→master range review. Six items are fixed here; item 7 is record-only. Rebased onto master f94ee8f (2026-10-16) — item 3's lockfile fix was superseded upstream by #3381; see below.
Changes per item
default 8; corrected to0(the code default since Memory plane (R3): stop keeping compressed originals, CCR and snapshots fully in RAM now that the unified store has them — measure first, then lazy-load #3050; L173 and the env table were already correct).daily-cloudcode-pa.googleapis.comas the no-CLOUD_CODE_URL default (matching src/launcher.ts since [bug] bili antigravity (#2115 / #2134) 真机实测必现 HTTP 400:CloudCode v1internal 请求/响应信封未拆包 + sessionId 恒为 FNV-1a 空串哈希 #3129); the MITM-fallback domain whitelist lists the daily host.kernel/package-lock.json(self-ref → 0.0.127, matchingkernel/package.json). The rebase dropped this PR's lockfile commit; nokernel/**file remains in the diff. The localnpm ciEUSAGE gap from Interval review – residual minor fix list: two stale doc entries, kernel lock file lag, missing INERT alert on delete config, SIGKILL escalation, ack header 2xx-only (7 items, all minor) | 区间审查残留小修清单:文档过期两处、kernel 锁文件滞后、删除配置缺 INERT 告警、SIGKILL 升级、ack 头 2xx-only(7 项,均为小修) #3344 item 3 is closed by kernel: 已消费但非重折叠的压缩单元不再被推荐——推荐端与执行端对同一形状意见一致 #3381 on master.warnInertStripImages/warnInertResignPassthrough) forcompress.absorb.*(开了 absorb 之后,插件模式会话被指示调用一个永远不会出现的 absorb 工具(与 #3177 同症状家族,机制不同) #3293) andcompress.imageCompression.*(image_full 无法被正确调用:同一张图每轮重复降采样(38 次)、restore 提示注入 38 次,模型只能猜 ref → 每轮一次失败+重发,缓存命中从 75% 掉到 28% #3266) at all three compress levels, so users who had enabled them are no longer silently ignored on upgrade. Boundary vs Egress image downscale: shrink big images before sending to the model, originals stay local and self-readable | 重做图片降采样(简化版):发模型前压大图、原图留本地不动、模型被告知尺寸后可自读原图 #3400 (image compression returning as NEW keys, e.g.absorb_image): this warn list contains ONLY the two removed legacy keys; any Egress image downscale: shrink big images before sending to the model, originals stay local and self-readable | 重做图片降采样(简化版):发模型前压大图、原图留本地不动、模型被告知尺寸后可自读原图 #3400 keys are registered separately and must never be added to this inert list.killAndVerifynow sends SIGKILL and re-verifies before falling back to the manual-cleanup error; a stuck replacement is reaped automatically.Behavior changes (old → new)
kill -9. Worst-case time before the error doubles (one verifyMs window per signal).x-bili-applied-seqis now ABSENT on non-2xx responses (previously stamped on all statuses). In-repo clients already gate on 200, so this tightens the contract without changing live behavior.Item 7 — record only
TEXT_RUN_THRESHOLD = 200(src/runaway-guard.ts:72): a very long run of identical characters in legitimate prose could theoretically trip the degenerate-run abort. Tool-call arguments are already exempt, so exposure is small. Left unchanged — pi-side parity is minRun=200 (#3260), and whether to relax the threshold is an owner decision. Recorded here for reference.kernel-change:
Not applicable after the rebase — the only
kernel/**change (item 3's lockfile regeneration) was superseded by master #3381 and dropped during the rebase. Nokernel/**file remains in this diff; no version bump required or made.Verification
npm run typecheckclean;npm run buildOK (dist-import-annotations: OK).npm run typecheckclean; targeted suites re-run green — removed-compress-keys-inert 3/3, incremental-lane 18/18, auto-restart 16/16. Full-suite verdict = CI on the new head.