Repository navigation
feat: compress.visibilityMarkers toggle to suppress ACP visibility markers - #893
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-893Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr893.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review complete — verified, ready to merge (merge stays with you, human-only). Diff cleanliness (first gate)Single linear commit Code review — all four artifacts covered, default = zero changeGuarded sites (all use
I grepped every Config plumbing is correct and consistent with the codebase's strictness rules:
Both compression modes reasoned through: the flag only gates text artifacts, never #717 anti-forgery stripping ( Docs: CONFIGURATION.md + CONFIGURATION.zh-CN.md sections are content-synced (not just translated titles), web UI compress field list updated. Tests: 7 new, all deterministic (mocked Evidence
中文摘要:新增 |
|
解决冲突 |
[bot] 🏷 收到,正在处理。master 已前进到 |
…rkers (#862) - CompressSettings.visibilityMarkers: three-level merge, default true (zero behavior change) - parseCompressSettings: strict boolean validation like tiers/stripImages - LoopCtx + CompressLoopResponsesCtx guards cover all four emission sites: live emitMarker stream line, orphan marker message in rebuilt history, responses JSON read-only marker item, mutating re-request developer marker - server.ts resolves per request via resolveCompress at both loop call sites (same pattern as existing per-request resolutions) - tool executions themselves unaffected: calls still run, paired tool-call/tool-result messages untouched; #717 anti-forgery stripping independent of this flag - docs: CONFIGURATION.md + CONFIGURATION.zh-CN.md + web UI field list - tests/visibility-markers.test.ts: parse/merge cascade + streaming + JSON read-only/mutating paths
942eb87 to
923fb46
Compare
冲突已解决并推送完成。 Rebase: Conflict — exactly one file, adjacent lines:
Semantic check after rebase: all nine change sites re-verified intact ( Pre-flight on rebased head Pushed & CI: branch force-pushed to 一句话总结:PR 已 rebase 到最新 master(仅 src/web/page.ts 一处相邻行冲突,按两边意图取并集解决),rebase 后 typecheck/测试/构建全绿、diff 足迹不变(9 文件 +200/−7),CI 8/8 全绿,可以合并(合并操作留给人工)。 |
Follow-up to #862 (marker-suppression item 1 of 2 confirmed by the reporter).
Problem
In the #862 deployment (ZCode/ACP → openai-wire relay), the model repeatedly imitated and narrated around the 📦/❌ ACP visibility markers — emitting its own confirmation marker lines and Chinese commentary before/after proxy compression. The reporter's deployment-side workaround was stubbing
buildVisibilityMarkerto return "" plus empty-marker guards in three adapters; this lands that as a proper config option.Change
New
compress.visibilityMarkersboolean (three-level global/provider/model merge like every other compress field), defaulttrue= current behavior, zero change for existing users:falsesuppresses all four marker artifacts:LoopCtxguard at theemitMarkeryield),surfaceReadonlyJson),compressLoopResponsesJson).Server resolution follows the existing per-request pattern:
resolveCompress(opts.routes, route?.rewrittenUrl, model, opts.compress).visibilityMarkers ?? trueat both loop call sites inforward()(same shape as the existing resolutions for strip-images / reasoning-guard). No changes to thePreparedtype, prepare* signatures, or kernel Config.Docs: CONFIGURATION.md + CONFIGURATION.zh-CN.md new field section; web UI compress field list updated.
Tests: new
tests/visibility-markers.test.ts(7 tests) — parse valid/invalid, merge cascade, streaming loop default-parity vs suppressed (tool still executes + re-request still fires), JSON read-only path, JSON mutating re-request body.Pre-flight on master @ 55da3f0 (v0.1.117): typecheck clean · npm test 1675 pass / 0 fail / 2 skipped · tsup build ok.