Repository navigation
[PR] compress: accept flat single-range summary-in-content calls, guard unrecognized refs separators, unmask reject reasons - #4253
Conversation
…ntent; guard unrecognized refs separators; unmask line-form reject reasons
- kernel parseObjectValue: a string content with NO refs headers plus
top-level bounds ({content, startId, endId, topic}) is the two
schema-advertised forms merged — recover it as one range (JSON-encoded
{summary,topic} in the string unwrapped; explicit top-level summary
wins). Line-form content with refs headers is never redirected.
- REF_PAIR_IN_LINE / LINE_ENTRY_REFS_RE: accept U+2212 minus and U+FF0D
fullwidth hyphen as range separators; a pair with an unrecognized
separator is rejected with a precise reason instead of silently
narrowing to the first ref.
- Header-only line entries now report kind=no-valid-ranges with their
per-entry missing-summary reasons instead of a blanket
content-not-array (#362 visibility).
- Schema text documents the accepted flat shape; proxy logs a
flat-summary salvage warn line (#3780 style).
- Tests: 10 kernel parse tests + 3 proxy reject-reason tests; full
kernel suite 1428/1428, compress sweep 179/179.
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR 对应 #4252(compress 调用被拒 + U+2212 破折号静默缩窄区间),检索 open/closed issue 与近期 PR 均无同机制条目;#362/#3780 是可见性与可观测性先例,非同缺陷。 标签: 审核进行中,先报一个已确认的 CI 红灯:
后续回复给结构化八问结论。 |
… text
The compress tool description and content param description now document the accepted flat single-range form {content: "<summary text>", startId, endId, topic?}. Golden regeneration via scripts/update-wire-contract-goldens.ts; the diff is exactly those two description strings across the four wire shapes (tool + param) in kernel.json/bili.json/manifest-*.json — no other surface moved.
Kernel Boundary rule 2 (CI kernel-guard): kernel/src changes require a version bump in kernel/package.json so accumulated changes can ship as an independent acp-kernel release later. Regenerates both lockfiles (version lines only).
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.5074-pr.4253.f5ff3edThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4253.tgz
npm install -g packageInstall instructions are refreshed on each push. |
The compress tool description/param text is injected into every outbound body (compress.injectTool=true in the golden drive), so the schema-text change shifts all pinned per-turn digests by the ~173-byte tool-JSON delta. Regenerated via scripts/update-storage-render-goldens.ts (digest-only diff, matches the CI failure pair 2a7d4d40 -> f98b8102 on chat turn 0).
(ai: vllm-qwen/qwen3.8-27b) 收到,判断接受。storage-render 那两次「golden 重生」(#4253 f771c71、#4255 b6f9a884d)是止血不是修复——我照着历史上几条 "regen storage-render goldens" 的 commit 先例走了,但那些场景是生产 wire 字节合法变化(nudge 低水位戳、effort ledger 字段),这次漂移来自测试驱动没走生产接线: 分支状态我刚实际核对过(
接下来怎么处理:
八问
|
|
Golden regeneration added: the compress schema text is carried on the wire, so the doc change shifts per-turn digests — storage-render (4 wires) + wire-contract (4 manifests) regenerated and verified locally (golden-storage-render 5/5, wire-contract 22/22, storage-engine-proofs 12/12 wire parity). Re-running the failed legs. |
…NE plain string Per review decision on #4252: the multi-form advertisement (array-of-objects entries + flat single-range calls + summary-in-content hybrids) is what led models to blend forms into shapes the parser rejected. The schema now teaches ONLY the string form; every legacy shape stays functional in parseCompressInput (open object schema, no required / additionalProperties — flat calls still validate), it is just no longer documented. - kernel compress-tools.ts: content + tool descriptions trimmed to the string form; flat-form top-level properties dropped; header contract comment rewritten for the new policy - tests/wire-contract.test.ts: COMPRESS_FORM_PROPS guard reduced to [topic, content] with the rationale - kernel 0.0.152 -> 0.0.153 (kernel-guard rule: schema change ships a bump) - goldens regenerated: storage-render (4 wires) + wire-contract (4 manifests) Verified: kernel 1428/1428, wire-contract 22/22, golden-storage-render + compress-reject-reasons 12/12.
|
Per the review decision: the schema now advertises exactly ONE compress form — |
(ai: vllm-qwen/qwen3.8-27b) 核对完成(拉分支 head
八问
行为变更披露(旧→新):① advertised schema:删 CI 现状:全部 guard/gate/static-gates(ubuntu24+win22)/build/version/lock/docs/lane/kernel-guard 绿; 标签: 收工判定:代码正确、关键门禁全绿、golden 分歧已裁定为合法、legacy 可用性有测试兜底。这是 kernel 改动 → 无论 CI 结果如何都属人工合并档(§7.4 / Kernel Boundary),不自动合、我不代合也不 force-push。 等最后 3 个慢分片落地绿即可由你合并;若其间转红,系统会再次转发给我定向排查。 |
… ranges beyondFrontierNote (#2146) only fires when EVERY requested endpoint sits above the session's highest mapped ref. The incident shape — start inside, end above (allocation lags rendering: refs visible in the transcript are not yet minted in the store) — fell through to generic guidance, and the model blind-retried against a moving ceiling (session 01a15993: 5× gate:none-resolved inside 8 minutes, compress-loop breaker armed). frontierClampNote now fires for exactly that partial case: names the highest stored ref, says numbers visible in the transcript may not be ingestible yet, and gives the actionable clamp (Retry with endId ≤ highest). Mutually exclusive with the all-above note; b-ref endpoints and empty states never fire; the above-frontier endpoint stays verbatim in the receipt (typo-correctable, per the #2146 mixed-case contract). Verified: issue2146 suite 9/9, e2e-update-state + compress-reject-reasons + preflight-compress 11/11.
|
Folded the first follow-up into this PR (8259905): partially-past-frontier ranges now get |
(ai: vllm-qwen/qwen3.8-27b) 增量核对完成(新 head 改了什么 & 对不对:新增
范围合规:这属于本 PR 同一机制族(compress 拒绝引导,#2146 血脉,同在 八问
行为变更披露(旧→新):半跨界区间的失败回执,由通用引导 → 「点名最高已存 ref + CI 现状(新 head 8259905):全部 guard/gate/static-gates(ubuntu22/24 + win22/24)/build/version/lock/docs/lane/kernel-guard 绿;因本次动了 收工判定:这个增量修复正确、测试到位、范围干净,与上一轮已验证的核心合并后整个 PR 从我的角度可合。仍属人工合并档(同一 PR 内含 kernel 改动 → §7.4 / Kernel Boundary 不自动合),我不代合也不 force-push。等 14 个 unit 分片落地绿即可由你合并;其间若任一转红会再次转发给我定向排查。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.735-master.94f75cc # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #4252.
What was broken (live session on v0.1.204): the compress tool schema advertises two forms — "PREFERRED:
content= ONE plain string holding ALL ranges" and the flat single-range{startId,endId,summary,topic}. A model doing single-range compression naturally merges them into{content: "<summary text>", startId, endId, topic}— which the kernel parser rejected askind=content-not-array, so the model retried the same valid-intent call in a loop (6 identical rejects in 60ms observed, plus refold churn at 0% cache hit all night). Two sibling defects in the same path: a U+2212 minus dash silently narrowedm00150−m00168tom00150–m00150(end ref swallowed into the topic — wrong range folded), and header-only string entries reported a blanketcontent-not-arraythat hid the real "missing summary" reasons (#362 visibility).Fix (root cause — the parser, not the callers):
kernel/src/parse-compress-input.tsparseObjectValue: stringcontentwith NO refs headers + top-level bounds ⇒ recovered as ONE flat range (diagnostics flagflatSummarySalvage). A JSON-encoded{summary,topic}inside the string is unwrapped; an explicit top-levelsummaryfield wins. Content that carries refs headers keeps its line-form reading — never hijacked (tested both ways).m00150 => m00168) is rejected with "refs separator not recognized — refusing to narrow a ref pair to its first ref" instead of silently folding one message.kind=no-valid-ranges+ per-entry reasons; prose without refs stayscontent-not-array(existing classification tests unchanged).kernel/src/compress-tools.ts: schema text documents the accepted flat shape on both the tool and thecontentparam.src/compress-tool.ts: proxy lane logs[acp-compress-input] flat-summary salvage: recovered N range(s)…(compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780-style observability).Tests: +10 kernel parse tests (
kernel/tests/parse-compress-input.test.ts), +3 proxy tests (tests/compress-reject-reasons.test.ts). Full kernel suite 1428/1428, proxy compress sweep 179/179 locally.Not covered (separate follow-ups, noted in the issue):
gate:none-resolvedchurn from refs aimed above the allocated ceiling; the refold/estimate economics.kernel-change: #4252 compress input-contract fix in kernel/src/parse-compress-input.ts (accept the flat single-range shape {content:"