Repository navigation
fix: surface passthrough everywhere it silently killed compression (#405) - #547
Conversation
) - boot: banner suffix 'PASSTHROUGH (compression OFF)' + dedicated warn with source (env/flag vs config file) and the exact way to re-enable compression - boot: one info line enumerating every active env override knob (ACP_PASSTHROUGH / ACP_MODEL_CONTEXT_LIMIT / ACP_COMPRESS_TOOL / ACP_COMPRESS_NUDGE / BILI_PERSIST) with values — no more silent env wins - web panel: /__bili/config GET now reports {passthrough:{enabled,source}}; PUT accepts passthrough true/false/null (409 with instructions when an env var forces it); overview page shows a warning banner + 恢复压缩 button - hot-flip: PUT updates the live opts.passthrough without restart - config: passthroughState() shared helper + Options.passthroughSource
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-547Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr547.tgz
npm install -g packageThis comment is automatically updated on each push. |
[bot] 🏷 审核完成(基于分支 验证证据
Live smoke(构建产物实测,#403 验收标准逐条覆盖):
代码评审四块(config 共享 helper / boot 可见性 / 面板读写+热翻转 / Web UI banner)均按描述落地,
已代办:编号修正标题和正文原本标 合并前两点提示
另外 CI 已发布 |
[bot] 🏷 更正:我上一条消息里的编号判断错了,已回滚。 我查证了 GitHub API 的权威记录(此前误信了本地镜像的过期数据):
即:原 PR 标题/正文的 顺带报告一个平台侧小问题(仅报告):ework 本地的 issue 检索仍把这条 PASSTHROUGH issue 显示为 其余评审结论不变:预检全绿(typecheck / 1043 of 1044 / build / 专项 2-of-2)、live smoke 覆盖 #405 全部验收标准、堆叠分支携带 v0.1.85 release + #360 内容属有意追平 npm 现状、建议合并前手动触发一次 ci-e2e(请求管线有 #360 strip 改动且捆绑 acp-kernel 升至 0.0.52)。 |
Fixes #405.
Problem
ACP_PASSTHROUGH=1(or configpassthrough: true) silently disabled 100% of compression: no boot log, no banner, invisible in the web panel — and the panel could neither see nor clear it. The whole env-knob family (ACP_MODEL_CONTEXT_LIMIT,ACP_COMPRESS_TOOL=0,ACP_COMPRESS_NUDGE=0,BILI_PERSIST=0) also applied with zero trace, so a "healthy-looking" proxy could be forwarding everything verbatim while the user debugged in the wrong direction.(Note: the issue also mentions
ACP_NO_INJECT_TOOL— no such knob exists in the code; the real one isACP_COMPRESS_TOOL, which is covered.)Fix
Boot visibility (
src/server.ts):— PASSTHROUGH (compression OFF)suffixwarnwith the source (env/flag vs config file) and the exact way to re-enable compression[config] env overrides active (win over the config file): ACP_PASSTHROUGH=1, …Panel read/write (
src/web/api.ts):GET /__bili/confignow includespassthrough: {enabled, source}PUT /__bili/configacceptspassthrough: true | false | null; when an env var forces the state it returns 409 with instructions instead of silently not workingopts.passthrough(the request path reads it per-request) — no restart needed; flip logs a warn/info lineWeb UI (
src/web/page.ts,src/web/client.ts):.noticestyle) with the source and a 恢复压缩 button; the button disables itself with a hint when the source is envConfig plumbing (
src/config.ts):passthroughState(env)shared helper — single source of truth used byloadOptionsand the web API (no drift);Options.passthroughSource: "env" | "file" | nullVerification
tests/passthrough-visibility.test.ts: state resolution matrix (env wins / file / default, incl. env0forcing file-on OFF), GET exposure, PUT on/off/file-write/hot-flip/400-invalid/409-env-forced — 2/2BILLION_CONTEXT_PROXYunset)Out of scope
/acpagent-side panel passthrough marker