Repository navigation
feat(absorb): revive absorb scoped to image results + fix plugin-lane tool visibility (#3402) - #3422
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4134-pr.3422.700ad38This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3422.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 检索 open/closed issue 与 PR(关键词 absorb / mediaOnly / image distillation):无并行的 absorb 复活工作。相关谱系仅为本 PR 自身引用的 #3309(revert)、#3402(目标 issue)、#3293(plugin-lane 可见性)、#3371(纪律引用),无冲突条目。 已接单核对(本 PR 是 #3402 的交付,按 [PR] 流程拉分支核对代码 + 确认 CI,不重做)。先报 CI 现状:2 个红灯,均为机械问题,正在修——
另注意到 head 上全套 |
…ibution before absorb section (cache-seam, #3422 review)
(ai: vllm-qwen/qwen3.8-27b) 进度更新:发现并修掉了一个真回归,两个机械红灯已清,测试矩阵正在跑。 ① 真回归(已修)— round-2 重建把 absorb 段拼错了位置,每次折叠都断前缀缓存。 ② lock-sync(已修):重生成 ③ kernel-guard(已修):正文标题补冒号成 ④ 顺带说明:review 期间分支上落了一个并行 docs commit 本地定向验证(rebased head 上):kernel absorb 19/19;root absorb/wire-contract/plugin-protocol/issue1192/side-lane/ccr-v2/fork-ccr/opencode-v2/native/rules/search-plan/store 全绿;typecheck 干净。golden 核对过:bili.json 与 #3309 删除前逐字节一致(纯恢复),manifest 两文件差异仅为 #3309 之后 master 新增的描述文案,kernel.json 未动。 CI 现状:所有 gate 绿, |
634e50f to
2f60d2e
Compare
…ibution before absorb section (cache-seam, #3422 review)
|
冲突 |
2f60d2e to
af162bc
Compare
…ibution before absorb section (cache-seam, #3422 review)
af162bc to
64c3f52
Compare
…ibution before absorb section (cache-seam, #3422 review)
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决: 冲突来源与解决
本地定向验证(全量以远程 CI 为准)
结构化八问
判定:冲突闭环,分支干净且基于最新 master,等 CI 绿灯即可由你合并(我无权合并)。若 CI 红了我来排查;master 若再前进产生新冲突,系统会再次转发,我再处理。 |
|
ci失败 |
(ai: vllm-qwen/qwen3.8-27b) CI 失败已定位,正在修。两类问题:
修完会 force-push 并给完整结论。 |
Restore the absorb machinery reverted by #3309, as the base for the media-scoped revival (#3398): conflicts resolved keeping both the restored absorb wiring and post-#3309 additions (withProjectAttribution #3298, withAcpNotes #3252). src/proxy-tool.ts is deleted again — its only export isProxyToolFor moves back to absorb.ts (absorb-aware, pre-#3309 shape). This revert is intentionally NOT pushed alone; the media-only scope restriction lands on top in the same PR.
…esults (#3402) New AbsorbConfig.mediaOnly (default unset = neutral): when true, isAbsorbCandidate rejects media-less results, appendAbsorbPrompts exempts media-bearing candidates from the minToolTokens floor (image bytes are not counted in text), and applyAbsorb mirror-rejects a non-media target so screening and execution agree. Bumps acp-kernel 0.0.128 -> 0.0.129 (rebased onto master whose kernel is already at 0.0.128 via the #3406 screen-observability change). kernel-change: optional mediaOnly gate for absorb distillation — host-side config plumbing alone cannot express candidate scoping inside the kernel's absorb pipeline
…t parity (#3402) Host applies the product policy the kernel leaves neutral: resolveAbsorbSettings defaults mediaOnly to true (image-bearing results only), so pure-text large results are no longer marked by default and the old over-compression mode is gone; mediaOnly:false restores legacy full-text behavior. absorb.enabled still defaults false. New config key compress.absorb.mediaOnly (boolean) added to the schema, cleaning loop, and plugin-lane divergence fields; config docs regenerated (EN/ZH/website). Adds a regression test pinning that the plugin-lane absorb prompt gate and the manifest advertisement read the same base config block (#3293: prompt appears iff tool is advertised). CHANGELOG backfills the entry #3309 omitted and records this revival.
The generated config index table already carried compress.absorb.mediaOnly, but the hand-maintained '#### absorb' reference prose still showed the pre-mediaOnly field set and described 'large tool results'. Add mediaOnly to the Type line + sub-field bullets and reword to 'qualifying tool results' so the authoritative reference is internally consistent.
…ibution before absorb section (cache-seam, #3422 review)
…-keys INERT list (#3402) The #3309 revert revived absorb, but #3344 still listed compress.absorb alongside compress.imageCompression as a removed/inert key: old-config parsing dropped absorb and tests/removed-compress-keys-inert.test.ts asserted it parsed to undefined. Pull absorb out of INERT_REMOVED_COMPRESS_KEYS (imageCompression stays removed), correct the warning text, and update the test so absorb is asserted kept while only imageCompression warns.
…oved-key pin with #3402 CI red (run 38991748164, 3 shards): master's tests/removed-compress-keys-inert.test.ts (#3344) pins compress.absorb as INERT (feature removed by #3293), while this PR revives it — the key parses again, so the undefined assertion fails deterministically. Drop absorb from INERT_REMOVED_COMPRESS_KEYS (imageCompression stays — its #3266 removal stands), narrow the warning text accordingly, and update the pin test: absorb now asserts PARSED ({enabled,minToolTokens} survive) and absent from the warning; imageCompression keeps its full-path naming assertions.
f4e8cc0 to
acd981d
Compare
(ai: vllm-qwen/qwen3.8-27b) CI 失败已修复并重新推送(新 head 八问
行为变更披露(旧→新):INERT 告警旧文案同时点名 两点透明说明:
|
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.523-master.4c62d2a # this exact build
npm install -g billion-context@master # always the newest merged build
|
Third item from #3546 follow-up: absorb (default off) had no panel control either - enabling it meant hand-editing JSON. Adds the quick-fields checkbox mirroring the imageRescale pattern: checked writes compress.absorb.enabled=true preserving any existing sub-fields, unchecked deletes the whole absorb block (and an emptied compress object). Hint notes the #3422 mediaOnly default (image-bearing results only) and points sub-fields at the JSON editor. CHANGELOG [Unreleased] entry now covers both panel toggles.
Third item from #3546 follow-up: absorb (default off) had no panel control either - enabling it meant hand-editing JSON. Adds the quick-fields checkbox mirroring the imageRescale pattern: checked writes compress.absorb.enabled=true preserving any existing sub-fields, unchecked deletes the whole absorb block (and an emptied compress object). Hint notes the #3422 mediaOnly default (image-bearing results only) and points sub-fields at the JSON editor. CHANGELOG [Unreleased] entry now covers both panel toggles.
Summary
Revives the absorb distillation feature removed by #3309 (revert commit
a900499), now scoped to image-bearing tool results by default through a newcompress.absorb.mediaOnlyknob. Also pins the plugin-lane prompt/tool parity that #3293 reported as broken.Closes #3402
What changed
acp-kernel0.0.127 → 0.0.128): new optionalAbsorbConfig.mediaOnly. Whentrue:isAbsorbCandidaterejects media-less results;appendAbsorbPromptsexempts media-bearing candidates from theminToolTokensfloor (image bytes are not counted in text tokens);applyAbsorbmirror-rejects a non-media target so screening and execution agree (kernel: recommend screen misses the apply-side throw — last shape of the permanent advertise→reject loop may survive on pruned hosts | kernel:#3236 筛选未建模 apply 侧 throw,pruned host 上可能复活「永久 advertise→reject 死循环」的最后一个形状 #3371 discipline). The kernel ships the capability NEUTRAL (default unset); the host applies the product policy.resolveAbsorbSettingsdefaultsmediaOnlytotrue(single source of truth), so pure-text large results are no longer marked by default — this removes the "always over-compresses" failure mode that motivated the original removal. New keycompress.absorb.mediaOnlywired into the schema, the cleaning loop, and the plugin-lane divergence fields.effectiveAbsorbBlock/handlePluginManifest). Added a regression test pinning "prompt appears ⟺ tool is advertised" so the two doors cannot drift apart again. Attribution: post-revert bili is correct on its own side; the residual 开了 absorb 之后,插件模式会话被指示调用一个永远不会出现的 absorb 工具(与 #3177 同症状家族,机制不同) #3293 symptom is host-side tool reachability (dsh host-scope registration / manifest-refresh timing — the billion-context 0.1.197 在 DeepSeek Harness(DSH)0.2.0-rc.2 里反复抛出 Error: unknown tool "compress"。 工具注册落在了错误的作用域 #3177 family), which is outside bili's control for external hosts.config surface
Adds one key:
compress.absorb.mediaOnly(boolean, defaulttrue). The existing surface cannot express "absorb only image-bearing results": the closest mechanism,excludeTools, filters by tool NAME and cannot inspect payload shape, so a payload-shape predicate is required. No migration needed — unset resolves totrue; setfalseto restore legacy full-text absorption.behavior change (old → new)
mediaOnlydefaulttrue: when absorb is enabled, ONLY tool results carrying media (images) are marked[ACP absorb]; plain-text large results are no longer marked by default. Pre-feat: remove the absorb distillation feature (#3293) #3309 behavior marked any large text result. SetmediaOnly: falseto restore it.absorb.enabledstill defaultsfalse(feature remains opt-in). Flipping it totrueis left to the owner per the issue thread ("等 owner 表态再定").mediaOnly: false; media-scoped undertrue.kernel-change:
new optional
mediaOnlyfield scoping absorb to image-bearing results (#3402). Version 0.0.127 → 0.0.128. Wire-contract goldens UNCHANGED: the media-scoped default lives in the host layer (resolveAbsorbSettings), sodefaultConfig(100_000)goldens are untouched and the ledger neither grows nor shrinks.testing
kernel/tests/absorb.test.ts: 19/19 (media-gate matrix, mirror-reject, neutral-default pin).tests/absorb.test.ts,tests/absorb-plugin.test.ts(开了 absorb 之后,插件模式会话被指示调用一个永远不会出现的 absorb 工具(与 #3177 同症状家族,机制不同) #3293 invariant),tests/absorb-emission.test.ts,tests/wire-contract.test.ts→ 94/94 green; typecheck clean, dist rebuilt.Review fix (2026-10-16): round-2 absorb join broke the fold-seam prefix — fixed on branch
The cache-seam probe failures (P1+P2 pair 5→6, P3 pair 9→10) were not environment-specific — they are deterministic and caused by this branch:
src/server/relay.ts's round-2 rebuild nestedabsorbSectionINSIDEwithProjectAttribution(...), so round-2 emitted[compress prompt][absorb][attribution]while every steady prepare* path emits[compress prompt][attribution][absorb]. The system element therefore flipped at every fold while absorb was armed — a prefix-cache break, exactly what the probes pin. Fixed in commit 3116b06 (fix: keep round-2 absorb join byte-identical with steady paths):absorbSectionnow joins outsidewithProjectAttribution, matching steady byte-for-byte. Also regeneratedpackage-lock.jsonfor the kernel 0.0.128 bump (lock-sync gate, commit 3608324). Verified locally on the fixed head:cache-seam-probes2/2 +cache-seam-fuzzgreen, plus all targeted suites (kernel absorb 19/19; root absorb/wire-contract/plugin-protocol/issue1192/side-lane/ccr-v2/fork-ccr/opencode-v2/native/rules/search-plan/store 94+/142/33 green); full-suite verdict via CI.Golden refresh (2026-10-16): storage-render snapshots pick up the new
effectiveAbsorbmetadata keystoreEffectiveAbsorbstamps one NEW persisted key (session.metadata["effectiveAbsorb"], the session's last adjudicated absorb block, ornullwhen the feature is off) on every prepared request — by design, so the plugin tool API reads the same block the wire saw (shadowing semantics pinned intests/absorb.test.ts). The committed storage-render goldens therefore drift on the metadata section only (state/blockContents/stats digests and all wire bodies unchanged; "state-key divergence: none"). Refreshed vianode --import tsx scripts/update-storage-render-goldens.ts(commit 634e50f) and reviewed line-by-line: each of the four wire snapshots changes exactly two digest fields (metadatasection digest + overallstateDigest). Compatibility: the key is purely additive — pre-existing persisted sessions load unaffected (absent key →effectiveAbsorbConfigfalls back to the base config).