Repository navigation
[PR] Guard open objectives against self-declared completion in compression summaries (#3538) - #3660
ranxianglei wants to merge 5 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4407-pr.3660.491323dThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3660.tgz
npm install -g packageInstall instructions are refreshed on each push. |
abe5b71 to
9199591
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复 — 本 PR 修 #3538(压缩摘要里模型自判“完成”导致任务被提前收尾)的写侧缺口。open/closed 里没有同症状同机制的并列条目(#3592 是 pi compress carrier identity,不同问题)。 标签: 我独立审了 diff(没有照抄 issue 结论),并把改动触及的整个爆炸半径在本地跑绿了。先给结论:代码与测试本身没毛病,可合的前提只剩一次干净的 CI。 结构化八问1. 是什么问题 2. 什么原因导致的 3. 影响范围与严重程度 4. 怎么修的
5. 是否有回归
6. 是否破坏缓存 7. 是否改了设计方向 8. 是否引入新配置 关键卡点:CI 红,需一次干净重跑pushed head 上 6 个 test shard 挂了 4 个(ubuntu 22/2、ubuntu 24/1、windows 22/1、windows 22/2),而同名 shard 在当前 master HEAD 上是绿的(除 ubuntu 24/1 仍在跑),失败 check-run 没有任何 annotation。我这边拿不到 CI 日志(token 无 checks-log 权限, 处置建议:重跑失败 shard。转绿即可人合并;若重跑后仍有具体测试用例(而非环境错)失败,那才需要追真正回归——但我手上的证据指向 flake。 合规核对(Kernel Boundary)PR body 首行声明 判定代码与测试:通过,质量达标(命名达意、注释讲为什么、正负向断言都有牙、diff 收敛到 12 个相关文件无跑题)。唯一未闭环的是 CI 红——请重跑失败 shard,确认转绿后由人工合并;若重跑仍红且有真实用例失败再回来追。我不会代合并(kernel 档 + 系统规则都禁止 agent 合并)。 |
…orage-render goldens) for #3538 rule wording
9199591 to
a9e7ef4
Compare
(ai: vllm-qwen/qwen3.8-27b)
冲突面(PR 在途期间 master 合入了 #3658 protocol-stable-core、#3699、lock-sync 等):
解法:
本地定向验证:typecheck 干净 · build 绿(含 dist 注解检查)· 内核单元套件 1313/1313 · 宿主定向测试 4 个文件 43 用例全绿(golden-storage-render、wire-contract、compress-fingerprint-refold、issue3538-post-compress-receipt)。全量判定 = 新 head 上的远程 CI。 结构化八问
判定:冲突已解除,分支现在可合;请等新 head 的 CI 转绿后由人工合并(kernel 档,agent 不代合并)。 |
kernel-change: the write-side objective-status gap from #3538 lives in the kernel: (a) the compression prompt rules (
compression-rules.ts) are the surface that tells the model how to carry and re-judge open objectives, so the "status change needs in-range evidence" gate can only be stated there — the host has no prompt surface; (b) the deterministic anti-loss backstop must run where summaries are stored/rewritten (compress.tsapplyRefolds / covered-span paths), which is also kernel. The host-side receipt reminder ships as a separate non-kernel commit.(acp-kernel version: 0.0.131 → 0.0.132 on top of current master.)
What this fixes (#3538)
In a long pi-native session on v0.1.197, a model's compress summaries kept the
Open objectives:heading but rewrote a still-open acceptance criterion into "delivered" / "unreachable per current analysis", after which the assistant concluded "All work is delivered and committed." and closed out the task. Root cause (verified at tag v0.1.197): that build already carries #2918's read-side wording ("objectives remain binding until the user completes, cancels, or supersedes them"), yet nothing on the WRITE side constrained who may change an objective's status — the model's own "unreachable" analysis counted as a valid completion mark, and no pre-store check existed for dropped objective entries.Three parts, all minimal:
kernel/src/compression-rules.ts:blocked (needs verification)and keep the entry.kernel/src/compress.ts: when a distillation (T2/T3) or refold drops a ref-backedOpen objectives:line that a consumed source block still carried, the original line is appended back into the stored summary verbatim and the receipt warns naming the refs ("…remain open: do not treat this fold as completing them"). Strictly deterministic subset — a ref present anywhere in the new summary passes untouched (no semantic judgment), whole-line append avoids fabricating text, and it runs post-hoc after length validation.src/stream.ts(host): every successful compress receipt gains one static line: "Compression only folds history — it completes no task. Before declaring done, re-check every still-unmet acceptance criterion in yourOpen objectives:entries." Model-facing receipt only; the log copy stays unchanged (日志清理隐私信息 #1718 excerpt-free log invariant). Plugin and proxy lanes both funnel through this path (external-summary lane included).Behavior changes (old → new)
One-time prefix-cache invalidation on upgrade (same class as #2918, ~500 B). No new config/env keys. No changes to refusal semantics, message-ref/id logic, or persistence format.
Tests
tests/issue3538-post-compress-receipt.test.ts— success receipt carries the note, log copy does not, refused receipts do not.kernel/tests/open-objectives.test.ts— distillation dropping a ref → line carried back verbatim + warning names it; keeping the ref → summary byte-identical, no warning; in-place refold → same guarantee. Nudge text now also pins the evidence rule.tests/compress-fingerprint-refold.test.tsexact receipt-shape assertion includes the new static line.Not closing #3538: the P1 sub-item (real-model eval lane measuring objective-preservation rate across DeepSeek Flash / GPT / no-compression baseline) remains as a follow-up tracked in that issue; the GPT-vs-DeepSeek contrast stays an uncontrolled observation until then.