Repository navigation
[PR] feat: compress tool dryRun preview mode — validate range & estimate savings before committing - #3193
[PR] feat: compress tool dryRun preview mode — validate range & estimate savings before committing#3193ranxianglei wants to merge 27 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5646-pr.3193.d509210This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr3193.tgz
npm install -g packageInstall instructions are refreshed on each push. |
673423a to
545a101
Compare
(ai: vllm-qwen/qwen3.8-27b) 收到上游冲突通知,已完成 rebase 并推送。PR 冲突状态已解除(API 确认 mergeable: true),CI 已在新 head(545a1013d)上运行:theorem/e2e/real-codex/real-image-billing 等 lane 已绿,其余在跑。 八问:
判定:冲突解决完毕,待 CI 全绿后由人工合并。 |
545a101 to
8a48c9e
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。检索 open+closed PR(dryRun/preview 关键词)无其他实现;本 PR 是 #3185(owner 已拍板的设计 A)的唯一实现。以下为独立审核结论(未照抄开发会话的表述,diff 逐段重读、行为逐项清点)。 结构化八问1. 是什么问题:#3185 功能需求——模型在真正提交压缩前无法知道「这个 range 能不能压、会被剔掉什么、能省多少 token」,只能试错。本 PR 给 2. 什么原因导致的(为什么需要这个功能):内核压缩管线只有「提交后」才暴露校验/剔除信息,失败尝试还会留下副作用(dead-ref 记录、失败计数)。根因级解法是把既有的 pre-commit 规划阶段暴露为只读入口,而不是在宿主侧复制一套校验逻辑——本 PR 正是这么做的(见第 4 问),不是打补丁式地在错误层拦截。 3. 影响范围与严重程度:纯增量能力。现有用户零影响,直到模型开始使用新参数(提示词加了一句引导)。预览路径结构性零副作用(所有变更发生在一次性 clone 上,ref/block 分配只作用于 clone,clone 随后丢弃)——若做坏了后果会严重(假预览误导模型决策),但 parity 是靠代码复用保证的,不是靠两份代码各自正确。 4. 怎么修复的(机制层面):
5. 是否有回归问题——既有行为逐项清点(改动前代码读过的,不是只读 diff):
6. 是否破坏缓存:否。预览不分配、不写账本、不动任何前缀缓存相关字节;非 dryRun 线路上字节不变;回执是临时 tool result,与其他 compress 回执同性质。 7. 是否改了设计方向:无转向。内核增加的是对既有管线的只读入口(无新管线节点、节点顺序不变)。唯一的提示词面变化:默认 function prompt 的 TOOLS 条目 compress 项追加一句 dryRun 用法引导(所有用默认 prompt 的会话可见——披露如下)。 8. 是否引入新配置:无。无 config key、无 env var、无 CLI flag(符合 #3185 设计的「零配置面」要求)。 行为变更披露(旧值→新值)
我在分支上加的提交(审核中发现的问题,按「小问题直接修」直接修掉)
遗留观察(不阻塞合并)
判定方向正确、内核边界合规(declaration/approval/kernel: 前缀/版本纪律/双层测试/golden 理由齐全)、测试有牙、重构保持字节级 parity。当前 head( |
8a48c9e to
ad6b337
Compare
(ai: vllm-qwen/qwen3.8-27b) 跟进:上一轮推送后 发生了什么:我 rebase 期间 master 又前进了——#3157(persist fsync)经 #3163 合入时把内核版本从 0.0.123 提到了 0.0.124(commit 处置(与上一轮同一模式,仓库先例
功能代码本身零改动。CI 会在新 head 上重跑——这次 kernel-guard 应转绿, |
|
CI 卡住了?而且有12个失败了 |
) The first draft of the dryRun parameter carried a ~440-char description that landed in every outbound request body of injectTool sessions (+~820B ≈ +205 tokens per turn, permanent). That constant overhead broke byte-pinned goldens and shifted knife-edge preflight fit boundaries (fold timing moved ±1 turn under the flat nudge cadence). Shortened the main + google dryRun descriptions and the TOOLS prompt sentence to carry the same contract in less text: preview reports validity/exclusions/withdrawals/savings, zero side effects, re-issue with summary to commit. No behavior change — schema shape, param name, and the 'REQUIRED unless dryRun=true' suffixes are untouched.
…n tool surface (#3193) Intentional tool-surface growth (new dryRun boolean param on the compress tool) changes every pinned outbound body, so both golden sets were regenerated via scripts/update-wire-contract-goldens.ts and scripts/update-storage-render-goldens.ts. The storage-render regeneration was missing from the original PR head — that alone accounted for 8 of the 14 failing tests across all 12 CI shards.
…erhead floor (#3193) Four behavioral fixtures sat within ~205 tokens of their window limit; the new permanent per-request tool-schema bytes pushed two of them across the fold boundary (master decision 9984 < 10000 → tail survives; PR head 10189 ≥ 10000 → recent-zone tail folded) and shifted fold settlement ±1 turn under the flat 50K/500-token nudge cadence. - #280/#568/#663-anthropic: trim filler repeat(250)→repeat(225) (~13k → ~12k tokens vs the 10k window) so post-fold estimates keep comfortable headroom below the limit while still exceeding it pre-fold; test intent unchanged. - cache-proof host-compaction: the strict element-count shrink assert could not see a fold landing in the same body as the client's own user+assistant append (bytes shrank 99KB→55KB, count flat). The settling-fold check now compares coreLen net of CLIENT_TURN_APPENDS=2 appends — a no-op zombie fold (count grows by exactly the appends) still fails.
…Run wording (#3193) The function-mode compress system prompt is byte-pinned against a checked-in fixture (surface-config byte-stability gate). The wording tightening in the previous commit changed the TOOLS section, so the fixture was regenerated from buildCompressSystemPrompt(). Only that one line moved; the text/hybrid builders do not carry the dryRun text.
7281d27 to
2d8f13c
Compare
) The first draft of the dryRun parameter carried a ~440-char description that landed in every outbound request body of injectTool sessions (+~820B ≈ +205 tokens per turn, permanent). That constant overhead broke byte-pinned goldens and shifted knife-edge preflight fit boundaries (fold timing moved ±1 turn under the flat nudge cadence). Shortened the main + google dryRun descriptions and the TOOLS prompt sentence to carry the same contract in less text: preview reports validity/exclusions/withdrawals/savings, zero side effects, re-issue with summary to commit. No behavior change — schema shape, param name, and the 'REQUIRED unless dryRun=true' suffixes are untouched.
…n tool surface (#3193) Intentional tool-surface growth (new dryRun boolean param on the compress tool) changes every pinned outbound body, so both golden sets were regenerated via scripts/update-wire-contract-goldens.ts and scripts/update-storage-render-goldens.ts. The storage-render regeneration was missing from the original PR head — that alone accounted for 8 of the 14 failing tests across all 12 CI shards.
…erhead floor (#3193) Four behavioral fixtures sat within ~205 tokens of their window limit; the new permanent per-request tool-schema bytes pushed two of them across the fold boundary (master decision 9984 < 10000 → tail survives; PR head 10189 ≥ 10000 → recent-zone tail folded) and shifted fold settlement ±1 turn under the flat 50K/500-token nudge cadence. - #280/#568/#663-anthropic: trim filler repeat(250)→repeat(225) (~13k → ~12k tokens vs the 10k window) so post-fold estimates keep comfortable headroom below the limit while still exceeding it pre-fold; test intent unchanged. - cache-proof host-compaction: the strict element-count shrink assert could not see a fold landing in the same body as the client's own user+assistant append (bytes shrank 99KB→55KB, count flat). The settling-fold check now compares coreLen net of CLIENT_TURN_APPENDS=2 appends — a no-op zombie fold (count grows by exactly the appends) still fails.
…Run wording (#3193) The function-mode compress system prompt is byte-pinned against a checked-in fixture (surface-config byte-stability gate). The wording tightening in the previous commit changed the TOOLS section, so the fixture was regenerated from buildCompressSystemPrompt(). Only that one line moved; the text/hybrid builders do not carry the dryRun text.
…3159 + #3193) Rebase conflict resolution: master's #3159 re-layout (Vertex part order) and this PR's dryRun schema growth both touch the pinned google wire bodies. Regenerated from source so the golden carries the union — every turn body grows a constant +565B (the dryRun tool-schema bytes), no layout drift.
2d8f13c to
a695201
Compare
) The first draft of the dryRun parameter carried a ~440-char description that landed in every outbound request body of injectTool sessions (+~820B ≈ +205 tokens per turn, permanent). That constant overhead broke byte-pinned goldens and shifted knife-edge preflight fit boundaries (fold timing moved ±1 turn under the flat nudge cadence). Shortened the main + google dryRun descriptions and the TOOLS prompt sentence to carry the same contract in less text: preview reports validity/exclusions/withdrawals/savings, zero side effects, re-issue with summary to commit. No behavior change — schema shape, param name, and the 'REQUIRED unless dryRun=true' suffixes are untouched.
…n tool surface (#3193) Intentional tool-surface growth (new dryRun boolean param on the compress tool) changes every pinned outbound body, so both golden sets were regenerated via scripts/update-wire-contract-goldens.ts and scripts/update-storage-render-goldens.ts. The storage-render regeneration was missing from the original PR head — that alone accounted for 8 of the 14 failing tests across all 12 CI shards.
…erhead floor (#3193) Four behavioral fixtures sat within ~205 tokens of their window limit; the new permanent per-request tool-schema bytes pushed two of them across the fold boundary (master decision 9984 < 10000 → tail survives; PR head 10189 ≥ 10000 → recent-zone tail folded) and shifted fold settlement ±1 turn under the flat 50K/500-token nudge cadence. - #280/#568/#663-anthropic: trim filler repeat(250)→repeat(225) (~13k → ~12k tokens vs the 10k window) so post-fold estimates keep comfortable headroom below the limit while still exceeding it pre-fold; test intent unchanged. - cache-proof host-compaction: the strict element-count shrink assert could not see a fold landing in the same body as the client's own user+assistant append (bytes shrank 99KB→55KB, count flat). The settling-fold check now compares coreLen net of CLIENT_TURN_APPENDS=2 appends — a no-op zombie fold (count grows by exactly the appends) still fails.
…Run wording (#3193) The function-mode compress system prompt is byte-pinned against a checked-in fixture (surface-config byte-stability gate). The wording tightening in the previous commit changed the TOOLS section, so the fixture was regenerated from buildCompressSystemPrompt(). Only that one line moved; the text/hybrid builders do not carry the dryRun text.
…3159 + #3193) Rebase conflict resolution: master's #3159 re-layout (Vertex part order) and this PR's dryRun schema growth both touch the pinned google wire bodies. Regenerated from source so the golden carries the union — every turn body grows a constant +565B (the dryRun tool-schema bytes), no layout drift.
(ai: vllm-qwen/qwen3.8-27b) 先直接回答:CI 没有卡住——42 个 check 全部跑完了,「12 个失败」= test 矩阵的全部 12 条 lane(ubuntu/windows × node22/24 × 3 shards),去重后是 14 个失败测试,且只有一个根因。已修完并 rebase 到最新 master(head 结构化八问1. 是什么问题 2. 什么原因导致的 3. 影响范围与严重程度 4. 怎么修复的 5. 是否有回归问题 6. 是否破坏缓存 7. 是否改了设计方向 8. 是否引入了新的配置 收工判定:冲突已解(分支 = 最新 master |
|
补充检查了 PR #3193 当前实现,整体设计没有问题,但发现几个值得在合并前确认的细节,以及一项工具提示词优化建议。 1. Google/Gemini Schema 的
|
…#3185) New non-mutating CompressionCore.previewCompression: runs the full pre-commit planning (boundary resolution, protected carve, turn-integrity withdrawals, min-range gate, refold decisions) on a throwaway state clone and returns a per-range report with exact would-fail error text, would-fold refs, exclusion categories, withdrawn turns and estimated tokens saved. Zero side effects: no blocks, no ref allocation, no ledger write, idempotent. applyCompression is refactored around the same extracted stages (prepareBatch / planSingleRange / commitFoldedRange) verbatim — non-dryRun behavior byte-identical, pinned by the existing suite. Compress tool schema gains an optional top-level dryRun boolean (plain object, no combinators, #1299); summary becomes optional under dryRun via parser enforcement only (lenient parser threads the flag through object/string/ salvage/line-form paths). rebuild skips recorded dry-run calls so a preview never fabricates blocks on replay.
…avings before committing (#3185) A model can now call compress with dryRun:true (summary omitted) to get a structured receipt BEFORE committing: whether the range is valid (exact error text a real call would produce), what it would fold, what is excluded (protected tools / recent zone / checkpoint carriers / media), which messages are withdrawn for turn integrity, which blocks it absorbs, and the estimated tokens saved plus post-fold window occupancy. The preview is routed in applyRanges before any failure-tracking side effect and short-circuits the external-summarizer lane on raw input, so both compression modes cover it. Goldens regenerated for the schema surface: dryRun property added to all four tool schemas, summary descriptions note 'REQUIRED unless dryRun=true', Google items.required drops 'summary' (kernel still rejects missing summary on real calls via parser diagnostics).
) The first draft of the dryRun parameter carried a ~440-char description that landed in every outbound request body of injectTool sessions (+~820B ≈ +205 tokens per turn, permanent). That constant overhead broke byte-pinned goldens and shifted knife-edge preflight fit boundaries (fold timing moved ±1 turn under the flat nudge cadence). Shortened the main + google dryRun descriptions and the TOOLS prompt sentence to carry the same contract in less text: preview reports validity/exclusions/withdrawals/savings, zero side effects, re-issue with summary to commit. No behavior change — schema shape, param name, and the 'REQUIRED unless dryRun=true' suffixes are untouched.
…n tool surface (#3193) Intentional tool-surface growth (new dryRun boolean param on the compress tool) changes every pinned outbound body, so both golden sets were regenerated via scripts/update-wire-contract-goldens.ts and scripts/update-storage-render-goldens.ts. The storage-render regeneration was missing from the original PR head — that alone accounted for 8 of the 14 failing tests across all 12 CI shards.
…erhead floor (#3193) Four behavioral fixtures sat within ~205 tokens of their window limit; the new permanent per-request tool-schema bytes pushed two of them across the fold boundary (master decision 9984 < 10000 → tail survives; PR head 10189 ≥ 10000 → recent-zone tail folded) and shifted fold settlement ±1 turn under the flat 50K/500-token nudge cadence. - #280/#568/#663-anthropic: trim filler repeat(250)→repeat(225) (~13k → ~12k tokens vs the 10k window) so post-fold estimates keep comfortable headroom below the limit while still exceeding it pre-fold; test intent unchanged. - cache-proof host-compaction: the strict element-count shrink assert could not see a fold landing in the same body as the client's own user+assistant append (bytes shrank 99KB→55KB, count flat). The settling-fold check now compares coreLen net of CLIENT_TURN_APPENDS=2 appends — a no-op zombie fold (count grows by exactly the appends) still fails.
…Run wording (#3193) The function-mode compress system prompt is byte-pinned against a checked-in fixture (surface-config byte-stability gate). The wording tightening in the previous commit changed the TOOLS section, so the fixture was regenerated from buildCompressSystemPrompt(). Only that one line moved; the text/hybrid builders do not carry the dryRun text.
…d preview-first prompt strategy (#3193 review) Per the #3193 pre-merge review, three schema-surface corrections plus the prompt-strategy swap: - COMPRESS_TOOL_GOOGLE: dryRun sat at the parameters level (sibling of properties) where it is not a valid schema key — strict validators reject or ignore it. Moved into properties. - COMPRESS_PARAMETERS batch object branches: 'summary' removed from both required arrays so strict pre-validating hosts stop rejecting summary-less dryRun previews; parseCompressArgs still enforces the summary for real commits (behavior unchanged). - dryRun description slimmed to function/input/return only on both wire shapes (the commit procedure moved to the system prompt). - TOOLS prompt section: replaced the re-issue sentence with the preview-first decision strategy (preview whole batch, evaluate estimatedTokensSaved and exclusions, plan then commit in ONE call; skip only for fresh acp_status-recommended ranges verbatim). Lives in the summarization-call prompt only — main-request bodies carry less, not more. Structural guard added: top-level schema keys must stay within type/properties/required on both shapes (byte goldens alone missed the Google misplacement).
#3193 review) applyRanges checked parsed.dryRun AFTER the zero-valid-ranges branch had already run recordCompressFailure + noteCompressLoopFailure — a preview with a bad argument shape (bare flag, non-object entry) armed the repeat-failure streak and could trip the loop breaker after 3 repeats, contradicting the 'preview is not an attempt' contract. The zero-ranges path now recognizes dryRun first and returns a PREVIEW FAILED refused receipt with no counter writes.
…cted dryRun schema surface (#3193 review) Intentional tool-surface change from the kernel commit above (dryRun moved into the Google properties object, summary dropped from the batch required arrays, description shortened). Regenerated via scripts/update-wire-contract-goldens.ts and scripts/update-storage-render-goldens.ts.
…required list (#3193 review)
Owner request (issue #3185 floor 14/23): the dryRun preview added by this PR must sit behind a config switch, OFF by default, where OFF behaves exactly as if the feature were never merged. - New knob compress.dryRunPreview (bool, default false) / env BILI_COMPRESS_DRYRUN, resolved env>file>default via knobs.dryRunPreviewEnabled(). - Kernel: base schema/prompt reverted to pre-feature bytes; separate _DRYRUN variants + prompt-sentence const exported; parser gains allowDryRun (default false). - Host serves base-vs-_DRYRUN per request at every tool-serving site and appends the strategy sentence only when ON; routing auto-gates because parsed.dryRun is forced false when OFF. - Regenerated wire-contract goldens prove the OFF path is byte-identical to master; docs updated en+zh (seed-driven).
Rebasing onto master left buildCompressHybridSystemPrompt both re-exported from acp-kernel and defined locally as the withDryRunStrategy wrapper — a duplicate export that breaks esbuild/tsx transforms of the module. The wrapper supplies the name (byte-identical output when the switch is off), so the re-export line goes.
The rebased golden snapshots predate master's #4252 advertised-schema narrowing; regeneration converges them to the current served surface. With the dryRun switch default-off the regenerated files are byte-equal to origin/master's (verified by empty diff), i.e. zero surface drift.
) The compress dryRun preview switch (#3185/PR #3193) reads BILI_COMPRESS_DRYRUN in src/knobs.ts but was never added to the lifecycle ledger, tripping the lifecycle-ledger-guard. Added as a default-off opt-in transition gate with a release condition (retire env + move to §2 once the preview lane goes GA).
The #4316 ledger-alignment train added the refLedgerAligned state key without refreshing these goldens on master (verified: pure-master regen produces these exact bytes). Refresh so this branch is self-consistent with its own code.
…dRange (#3193) The dry-run split moved the createdAt stamp out of applySingleRange into commitFoldedRange, voiding the fn-keyed exception and red-ing verif-subset-guard.
…est (master born-red, #4599 sentinel) The tier-5 train added generationBoundaryActive as injectSystem's 9th parameter and updated every caller except this test's 'active' case: its trailing true landed in mcpDialectNote, so the note never appeared and the assertion must fail. Identical one-line fix already committed on PR #4559's branch (e82ccd7); drop that commit when rebasing whichever way merges first.
…s site (#4598, #4599 sentinel) pages.yml has failed 75/75 runs since landing: actions/configure-pages@v5 gets 'Get Pages site failed ... Not Found' because GitHub Pages was never enabled on this repo (the earlier enablement:true attempt was reverted without a recorded reason — not re-applied here). Stop-the-bleed per #4598 option 1: drop the push trigger, keep manual workflow_dispatch so the deploy path stays intact and no website push red-lines master again. Final direction (re-enable Pages vs retire the workflow vs in-install serving) awaits owner decision.
…ne-rewrite (#4599 sentinel) The #3719 Updates tab stayed routed (PAGES/route/loadUpdates in client.ts) but its topbar anchor was dropped when #3536 rewrote the whole topbar line, making nav.updates a dead catalog key (web-i18n born-red on every PR head). Restored at the original position (after logs); identical to the sibling fix on the panel-blog branch (900c09c), adapted to master (no blog anchor yet).
…4427 Windows red, #4599 sentinel) maskPathsForPublish keyed off os.homedir() alone. On Windows that reads %USERPROFILE% while git-bash-style tool output carries $HOME paths, so the publish-boundary identity leak masked one spelling and leaked the other (#4427 suite red on windows shards only). Now masks the deduped set of os.homedir() + $HOME + %USERPROFILE%; POSIX behavior unchanged (values dedupe to one root), anchored-flank semantics preserved.
… restamp flag (#4599 sentinel) Deliberate persisted-state change: 380ef4d (#4316 layer 3 PR3/3) added the one-time refLedgerAligned boolean to session state. All four wire digests are UNCHANGED; only the metadata section digest moved (+refLedgerAligned state key). Regen per the suite's own protocol (justification recorded here and in the ci-fixes PR body).
…wed-load interface (#4599 sentinel) #D5-5 changed buildView to call store.unifiedMessageIdRows() + store.unifiedUncoveredRows(id, intervals) first; the pre-existing fake stores (only unifiedTailSeqs/unifiedTailViewRows) threw TypeError, caught by the by-design degrade net as transcript-error, turning every render-expecting assertion red (chain 6/6, verif replay). Extended both real-JS fakes and the symbolic harness portImpls (__method_unifiedMessageIdRows / __method_unifiedUncoveredRows) to mirror SessionStore semantics.
Config surface (owner-gated)
One new config field added in this revision:
compress.dryRunPreviewfalseBILI_COMPRESS_DRYRUN(1/true)compress.injectTool/injectNudgetoggle tool/nudge injection wholesale; neither expresses "expose this one optional preview parameter". A dedicated boolean is the minimal addition.knobs.dryRunPreviewEnabled()(consistent with the 彻底整治环境变了滥用,除非必要都走配置文件 #2030 knob convention).falseis back-compatible; enabling is purely additive. Documented en+zh in CONFIGURATION.md (seed-driven param-ref/env-map tables + prose) and the website seed/site.Behavior change (this revision: old -> new)
dryRunfield and the function prompt always included the preview strategy sentence; routing honoreddryRun: true._DRYRUNvariants are served, and the prompt sentence is appended, ONLY when the switch is on. Routing auto-gates becauseparsed.dryRunis forced false when off (no routing-line edits needed). Both thedefaultandleanpacks share the same serving gate (lean drops the tools prompt section entirely, so only the schema field applies there).git diffagainst master over the golden + fixture files is empty).kernel-change: the dry-run judgments (protected carve, turn-integrity withdrawals, min-range gate, refold decisions, savings estimate) ARE the kernel's own pre-commit computations — previewing them requires running that stage without committing, which no host-side entry exposes. Re-implementing those stages in the host would be a drifting copy of kernel logic (the #2821/#498 failure family). This change extracts the existing pre-commit stages verbatim (prepareBatch / planSingleRange / commitFoldedRange) behind them and adds a non-mutating
previewCompressioncore entry; the non-dryRun path stays byte-identical, pinned by the full kernel suite plus the bili suite/e2e.Closes #3185
What
The compress tool accepts an optional top-level
dryRunboolean. When true (and summary omitted) the call returns a structured receipt INSTEAD of committing a block:Zero side effects: no blocks, no ref allocation (id-never-reused contract), no ledger write, no dirty mark, no failure/loop tracking — pinned by state deep-equal + idempotency tests at both layers. A re-issued call without
dryRun(with its summary) commits exactly what the preview reported.Layers
e5c15cb, version 0.0.122 → 0.0.123): newCompressionCore.previewCompression;applyCompressionrefactored around the extracted stages verbatim; the lenient parser threads the flag through every input shape (object / stringified / truncated-salvage / line-form) and relaxes the missing-summary rule under dryRun only;rebuildskips recorded dry-run calls so a preview never fabricates blocks on replay; TOOLS prompt gains one guidance line.applyRangesroutes dryRun before any failure-tracking side effect; the external-summarizer lane short-circuits on RAW input (no placeholder summaries); the receipt renders local token estimates. Both compression modes are covered — proxy clients throughapplyRanges, plugin hosts registering the tool from the kernel constants and executing through the same path.Tests
kernel/tests/preview-compress.test.ts: recent-zone exclusion, fully-protected exact-error parity vs a real call, turn-integrity partial withdrawal, split-turn exact-error parity, protected-tool categorization, min-range batchError, unknown refs, already-covered, purity (caller state byte-identical), idempotency, exact savings estimate. Kernel suite 1298/1298 green.tests/compress-dryrun-preview.test.ts: object + stringified-JSON wire shapes, line-form, fully-protected preview, idempotency, and real-compress-after-preview ≡ control context.Config surface
None added — pure tool capability, no knob (per the issue's non-goals).
Behavior changes (disclosed)
dryRunboolean added to all four (anthropic / openai / responses / google); top level stays a plain object, no combinators ([bug] 0.1.148 Claude 请求因 compress 顶层 anyOf schema 被 Anthropic 400 拒绝 #1299).items.required:["startId","endId","summary"]→["startId","endId"](old → new). Missing summary on a REAL call is still rejected via parser diagnostics — the relaxation only admits the dryRun shape.prompt-function-default.txtfixture regenerated. Text/hybrid prompts unchanged.estimatedTokensSavedso the model compares against its own planned summary.Golden regeneration justification
tests/golden/wire-contract/{kernel,bili,manifest-default,manifest-optin}.json+kernel/tests/fixtures/prompt-function-default.txt: the schema surface intentionally widened (dryRun property, description wording, Google required relaxation). Diff inspected line-by-line: nothing beyond intent changed.