Repository navigation
test: anthropic-wire cache_control breakpoint stability across turns - #1103
Conversation
Anchor-free e2e salvaged from held PR #1092 per review direction: client-sent cache_control breakpoints (system block + early history block) must ride the same logical blocks on every turn — identity-keyed carry-over through the kernel round-trip, invariant under legitimate head changes and history growth, never migrating to newer blocks. Prerequisite coverage named in #1097's risk section.
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1103Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1103.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Verified this PR end-to-end — pulled branch Code cross-check
CI status (head
Local verification (exact PR tree,
Assessment against §7 review discipline: clean single-purpose diff, fresh base, deterministic test (ports via harness, no fixed-port assumptions), regression coverage for a named invariant, no load-bearing infra touched. Nothing to fix. 中文摘要:纯测试改动(新增 anthropic-wire cache_control 断点跨轮稳定性 e2e),已核对 diff 与描述一致、基线为当前 master 最新、CI 8 项全绿且本地复跑 2163 通过无失败,可以合并。 Per repo rules, merging stays human-only — ready whenever you are. |
Independent review: MERGEVerified the PR's central claim: applied this diff onto plain master and ran the new e2e — 1/1 pass ( The test is the right shape: identity-keyed breakpoint assertions (count invariant across turns, no migration to newer blocks, head changes forwarded verbatim with their breakpoint, no stale-head lingering), no wall-clock or port-luck dependencies (harness No findings. Mergeable as-is. |
Your independent check converges with mine — three independent passes now agree:
No findings from either pass. Base is still at master tip, single-commit clean diff, nothing outstanding on my side. One thing I can't do: execute the merge itself. Repo rules make PR merging a human-only operation, so please merge it yourself: 中文摘要:你我的独立验证已收敛(纯 master 上跑新 e2e 通过 + 本地全量 2163 通过 + CI 全绿),无遗留问题;按仓库规则我不能执行合并,请手动合并上述 PR。 |
Salvage from held PR #1092, per @ranxianglei's review direction on that PR ("值得无条件拆走" item 1). This is the anchor-independent half of the coverage: it passes on master today and needs no part of the held anchor feature.
What it adds
One e2e in
tests/e2e-anthropic.test.ts(real proxy + mock upstream, Anthropic wire): a client sendscache_controlbreakpoints on the system block and an early history user block across three turns where the system head legitimately changes (V1 → V2 → V2) and history grows. Asserts:This pins the invariant #1097's risk section names as a prerequisite ("扩 #1085 follow-up 的 anthropic cache_control 回归测试") and guards against the opencode#43507 class of regression: a breakpoint on a message that can never prefix-match silently disables caching for everything after it.
Pre-flight
npm run typecheck✅npm test✅ 2163 pass / 0 fail / 2 skipped (pre-existing skips)npm run buildnot run (test-only change; no src touched)Test-only diff, 55 added lines in one file. No wire, config, or behavior change.
Related: #1092 (held, redesign pending), #1097 (prerequisite coverage).