Repository navigation
feat: ccr on by default in proxy mode unless explicitly disabled (#1425) - #1428
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1428Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1428.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…e-pin global/model disarm, unit-pin resolveCcrArming, deepest-wins docs
|
Deep review verdict: Approve — semantics correctly implemented and well-guarded; 1 major test-integrity gap + 2 minors fixed in-branch (head Verified against the #1425 decision
Fixed on your branch (
|
[bot] 🏷 Independent verification of head Review-fix commit verified (not just taken on faith)
Gates
Two notes for the merge moment
Behavior-change record (old→new, restated for the PR)Proxy lane, Verdict: ready for human merge. Auto-merge stays N/A by design (default-value change = product decision, owner-approved in #1425). 中文摘要:独立复核了 CCR 代理模式默认开启 PR 及其评审补测提交 99a8b8c —— 语义实现正确、插件通道 opt-in 契约未动、四处测试缺口已用真断言钉死、CI 13 项全绿、与 master 仅差一个版本 bump 无冲突,可以合并(按规矩由人来合)。 |
|
暂时hold 发现ccr有很大问题 修复后再说 |
What
Implements the owner decision on #1425 (2026-09-26):
compress.ccr.enablednow resolves toenabled: truefor proxy-lane sessions; an explicitfalseat any level (global/provider/model) still disables, deepest-wins.compress.ccr.enabled: trueis still required for BOTH manifest advertisement and session arming; the manifest advertisement stays a deliberate global act.Behavior change (old → new)
ccrunset at every levelccr.enabled: falseanywhereccr.enabled: truetrue(anthropic/openai wires)rules.*Rationale recorded in the issue thread: local end-to-end verification passed (placeholder →
acp_retrieve→ folded-original retrieval → range decompress), which was the gate set when CCR was flipped to opt-in in #1207.How
src/config.ts: the production base config (loadOptions) is stamped with{ ...DEFAULT_CCR_CONFIG, enabled: true }, so theresolveRequestConfigno-config early-return path arms zero-config proxy users via the base itself.src/compress-settings.ts: newresolveCcrArming(s)—false→ undefined (disarm), absent →{ enabled: true }, partial → inherit defaults +enabled: true; used by both arming sites so the session stamp always carries an explicit boolean (the store validator requires one).src/server.ts: proxy branch stampsresolvedCcrCfgdirectly; plugin branch keeps the explicit-global-true gate. The manifest call site stripsccrfrom the manifest view unless the global block explicitly saystrue— keeping advertised surface == executed surface when the stamped base would otherwise advertise a tool the plugin sessions are not armed to run.findCcrPluginDivergencessemantics unchanged (a non-explicitly-enabled base means no plugin session can arm → silent); docstrings updated to cite the split.Tests
tests/ccr-v2.test.ts: the feat: CCR v2 — covered-ref spans, range-level decompress, ID-returning search_context; CCR default-on (#1179) #1207 opt-in contract test flips to the 默认打开ccr和rule功能 #1425 regression test — zero-config proxy session arms, placeholder emitted, range restore works.tests/ccr-plugin.test.ts: route-scoped rig reverts to NO global block (plugin unarmed per feat: enable CCR (acp_retrieve) on host/plugin lanes (#1271) #1273 while the proxy lane arms from the route merge); test rigs stamp the production-equivalent base so manifest/arming consistency holds as in prod; divergence-diagnostic test asserts absent-global silence again.tests/wire-contract.test.ts:BASE_EXPECTEDgainsacp_retrieveon all four proxy-mode wires (ledger growth — the zero-config forward surface now includes the retrieve tool); rig base stamped production-equivalent. Goldens unchanged (inventory builds from the raw kernel config, not the stamped base).tests/e2e-relay-5xx-selfheal.test.ts: startProxy pinsccr: { enabled: false }— that suite calibrates arm emergency shrink on upstream failure to break relay-5xx deadlock #604 window arithmetic against a fixed relay tolerance; the extra ~600B retrieve schema would eat its margin. Isolation pin, not a behavior assertion.tests/e2e/e2e-codex-fake.test.ts: calibration comment notes the +~0.2k honest overhead from the now-default retrieve tool; pin values needed no change (re-verified green below).Preflight budget (owner note)
estimateWireOverhead(src/server/budget.ts, #470) measures the ACTUAL forwarded body — system text + tool definitions — so the acp_retrieve schema counts into the honest budget automatically; no src-side pin exists to update. The calibrated fake-codex window pins were re-run locally and hold:CI's
ci-e2e-fake.ymlwill re-confirm on the hosted runner.Pre-flight results
npm run typecheck— cleannpm test— 2839 pass / 0 fail / 12 skipped (gated e2e)npm run build— successe2e-codexfull run fails IDENTICALLY on clean master in this environment (local upstream returns empty generations — environmental, not this change);E2E_CHECK=1preflight passes; CI'sci-e2e.ymlcovers it on the hot-file trigger.Incidental labeled fix
README.zh-CN.mdscope clause foracp_retrievesaid "仅代理模式、仅原生工具线" (proxy-mode only), contradicting the English README's scope sentence (proxy + plugin lanes on anthropic/openai). Pre-existing en/zh drift; aligned the zh sentence to the current lane semantics.Fixes #1425