Repository navigation
[PR] feat(kernel,config): add opt-in compress.preserveFirstUser knob with single-pass prune scan - #7845
[PR] feat(kernel,config): add opt-in compress.preserveFirstUser knob with single-pass prune scan#7845feriaref wants to merge 1 commit into
Conversation
fc4841c to
ee06360
Compare
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved — PR head rebased onto current master, merge state is clean. What I did this run:
Note for the record: the PR body says "bump The PR remains in the HOLD state from the earlier review (🔶 需要决策, floor 2): the design question (this PR's drop mechanism vs #2031/#2511's user→user carrier) is still the owner's call — conflict resolution does not change that, and I did not touch it. 八问:
判定: 冲突已解决,merge state 从 dirty 转为可合(当前 blocked = CI 在跑 + 等 owner 设计拍板);CI 全绿 + owner 拍板后由 owner 合并。 |
(ai: vllm-qwen/qwen3.8-27b) No action needed this run — the conflict was already resolved by the previous run; this wake fired on a stale mirror snapshot. Verified live in this run (not from memory):
Nothing was pushed, nothing was changed. The PR stays in its HOLD state from the earlier review (🔶 需要决策, floor 2): merge is gated on the owner's design decision (this PR's drop mechanism vs #2031/#2511's user→user carrier) plus the CI test lanes finishing — both outside this lane. 八问:
判定: 冲突已解决且保持干净(mergeable: true);CI 在跑、无红项;等 CI 全绿 + owner 对 floor 2 设计问题拍板后由 owner 合并。本 lane 当前无事可做。 |
ee06360 to
fb89163
Compare
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved again — master moved ~3.5 days (76 files) past the PR's base, and the branch was rebased onto the new master. What happened this run (verified live, not from memory):
Unchanged: the PR remains in HOLD from the earlier review (🔶 需要决策, floor 2 — this PR's drop mechanism vs #2031/#2511's user→user carrier). That is the owner's design call; merge stays with the owner after the decision + CI green. 八问:
判定: 冲突已解决(mergeable: true),CI 在新 head 上运行;PR 保持 HOLD,等 owner 对 floor 2 设计问题拍板后由 owner 合并。 |
fb89163 to
60002b9
Compare
(ai: vllm-qwen/qwen3.8-27b) close-object-guard fixed — PR head What was red and why (verified live this run, not from memory):
The fix: added the
State at finish: head Note for the record: the mirror check-cache went stale twice this run (frozen at 05:34:00Z, then 05:43:31Z, ~10-15 min behind) — final green was verified via single live API reads of the run and its jobs, not by gh-polling. 八问:
判定: 红项已清、head 全绿(镜像缓存滞后,已用单次活体 API 读确认);PR 保持 HOLD,等 owner 对 floor 2 设计问题(drop vs #2511 载体)拍板后由 owner 合并。 |
[ework] CI fix verified green ✓ |
60002b9 to
95674c5
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved — PR rebased onto current master, conflict cleared. The PR head ( What I did this run:
Live result: PR is now The PR remains in HOLD pending the owner's design decision (floor 2 🔶 需要决策: this PR's drop mechanism vs #2031/#2511 user→user carrier) — merge is the owner's call, untouched by this CI fix. 八问(中文结构化结论)
判定:冲突已解决、rebase 已验证、CI 快门禁全绿、仅剩长测 shard 在跑(零失败)。本 CI 车道工作完成。 |
[ework] CI fix verified green ✓ |
…single-pass prune scan Keep ranxianglei#2733 unconditional first-user pinning as the default (preserveFirstUser: true) so upstream prefix-cache invariants hold without rewriting tests, while allowing preserveFirstUser: false to dynamically drop covered opening user messages when later uncovered user turns survive (covering both id and ledgerSeq claims). Consolidate prune input indexing into one pass over messages, thread preserveFirstUser through processTurn/fork/persist callers, and document compress.preserveFirstUser in website/config-reference/compress.yaml. Rebased onto master 4cad860 (conflict resolution): kernel version realigned 0.0.212 -> 0.0.215 (master already carried 0.0.214); kernel and root lockfiles synced to match. Rebased onto master 5bb3eb2 (conflict resolution): kernel version realigned 0.0.215 -> 0.0.218 (master already carried 0.0.217); kernel and root lockfiles synced to match. Rebased onto master f09a487 (conflict resolution): kernel version realigned 0.0.218 -> 0.0.221 (master already carried 0.0.220); kernel and root lockfiles synced to match. Rebased onto master 2e2b30a (conflict resolution): kernel version realigned 0.0.221 -> 0.0.224 (master already carried 0.0.223); kernel and root lockfiles synced to match.
95674c5 to
14906ea
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved again — PR rebased onto current master, conflict cleared. Master advanced 223 more commits since the last rebase ( What I did this run:
Live result: PR is now Observation for the owner: this PR has now been rebased 4 times because master keeps advancing while it sits in HOLD (floor 2 🔶 需要决策: this PR's drop mechanism vs #2031/#2511 user→user carrier). Each rebase is mechanical and low-risk, but the conflict churn will continue until the design decision lands and the PR merges. Merge is the owner's call — untouched by this CI fix. 八问(中文结构化结论)
判定:冲突已解决、rebase 已验证、CI 关键门禁全绿、仅剩长测 shard 在跑(零失败)。本 CI 车道工作完成。另提请注意:该 PR 已第 4 次 rebase,HOLD 期间 master 持续推进会持续产生冲突 churn,建议设计决策尽快落地后合并。 |
(ai: vllm-qwen/qwen3.8-27b) No new work needed this run — the reported conflict was already resolved by the previous wake; verified live and confirmed. This wake reported
Why the event fired anyway: the mirror cache is lagging — its last fetch is pinned at the OLD head What I did / didn't do: no rebase, no push, no code change this run — there was nothing to fix. I did not fight the branch or re-run a loop. What remains / risk: none from the CI lane. The PR stays in HOLD pending the owner's design decision (floor 2 🔶 需要决策: this PR's drop mechanism vs #2031/#2511 user→user carrier). Reminder from last run: this PR has been rebased 4× because master keeps advancing while it sits in HOLD — the conflict churn will recur until the design decision lands and it merges. Merge is the owner's call. |
no-close-object: opt-in stopgap related to #2031 and #2511 — intentionally does not auto-close #2511 pending owner design decision between opt-in drop vs user->user carrier
kernel-change: add opt-in
preserveFirstUserconfig field (defaulttrue) inkernel/src/types.ts,kernel/src/prune.ts, andkernel/src/compress.ts; bumpacp-kernelto0.0.218with synced lockfiles.Summary
preserveFirstUser: true) so existing upstream prefix-cache invariants and tests remain byte-identical when unset.compress.preserveFirstUser: false(cascadingglobal -> provider -> model) to allow dropping a covered opening user message once a later uncovered user turn survives (handling bothidandledgerSeqclaims), preventing permanently bloated initial prompts from anchoring context floor growth.kernel/src/prune.ts.preserveFirstUserthroughprocessTurn/fork/persistcallers and documentscompress.preserveFirstUserinwebsite/config-reference/compress.yaml(+ regenerated docs).Config surface
compress.preserveFirstUser(boolean, defaulttrue) inside the existing three-levelcompresshierarchy (global -> providers[<key>].compress -> providers[<key>].models[<model>].compress), mirroring kernelConfig.preserveFirstUser.kernel/src/prune.tsunconditionally pins the opening user message (192版本缓存命中率低codex #2733) inside the kernel prune pass with no existing opt-out knob. A host-side rewrite cannot drop a covered opening user message cleanly because the kernel owns coverage claims (id+ledgerSeq), block-summary anchoring, and fork/persist replay invariants.compresscascade (parseCompressSettings/mergeCompress/applyCompressSettings) rather than introducing a new top-level section, env var, or CLI flag.true, keeping default behavior byte-identical tomaster. Settingfalseis opt-in and reversible with no storage-schema migration.Relationship to #2031 / #2511 (HOLD — awaiting owner design decision)
preserveFirstUser: false: drop the covered first user message once a later uncovered user message survives, retaining its content in the block summary).preserveFirstUser: falseremains an explicit opt-in for sessions that prefer full drop once later user turns survive, while the defaulttruepath stays cleanly ready for [Kernel] feat: Independent compression of the first user message — user→user carrier (preserving the leading user slot and long-term execution goal) | [内核] feat: 首条用户消息独立压缩 —— user→user 载体(保留头部 user 槽位与长期执行目标) #2511's user→user carrier without schema conflict (orpreserveFirstUsercan later be superseded/extended to"pin" | "carrier" | "drop"if [Kernel] feat: Independent compression of the first user message — user→user carrier (preserving the leading user slot and long-term execution goal) | [内核] feat: 首条用户消息独立压缩 —— user→user 载体(保留头部 user 槽位与长期执行目标) #2511 lands).Verification
master(c18f6b7de, including commit0682f5beawhich fixes the 3eg_debugtable-count tests); single linear commit (60002b95b),acp-kernelbumped0.0.217 -> 0.0.218with synced lockfiles.npm --prefix kernel test: all tests pass (includingkernel/tests/dynamic-first-user-prune.test.ts).tests/preserve-first-user-config.test.tsandtests/compress-settings.test.ts(43/43) pass.npm run typecheck,gen-config-docs generate(zero drift),gen-config-docs check-coverage,config-surface-guard,check-unused-exports,check-test-import-graph,check-architecture-docs, andlifecycle-ledger-guardall pass.