Skip to content

[PR] release v0.1.216 - #6938

Merged
ranxianglei merged 25 commits into
masterfrom
2026-11-16_release-v0.1.216
Nov 17, 2026
Merged

ranxianglei merged 25 commits into
masterfrom
2026-11-16_release-v0.1.216

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Auto-fallback from the one-click release workflow: direct push to master was blocked by branch protection. Merging this PR publishes via the standard release.yml flow.

Changes since v0.1.215

@ranxianglei ranxianglei changed the title release v0.1.216 [PR] release v0.1.216 Nov 16, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Dup check: not a duplicate — this is the one-click release fallback PR for v0.1.216 (auto-fallback because the direct master push was blocked by branch protection). No other open release PR targets this version; the head branch 2026-11-16_release-v0.1.216 is master + the release v0.1.216 bump commit + synced plugin manifests (6 files, +7/−7).

Per the release-PR audit rule, my review window is the full v0.1.215 → master diff (98 files, +6334/−498), not just the version lines. I'm reading it in batches now (high-risk domains first: dsh, kernel, proxy/loop core, lockfiles). CI check cache is not populated yet for this PR — I'll verify the check state before the final verdict.

One finding already, early in the audit (details in the final review reply): the kernel change merged in #6929 (removal of the #4521 [ACP status: …] line) did not bump kernel/package.json (stays 0.0.198) — the kernel-guard job went red on that PR's head and the merge went through anyway; a post-merge re-run passes vacuously because the three-dot diff against master becomes empty once the head is merged. I'll assess impact in the final reply.

@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Nov 16, 2026
ranxianglei and others added 5 commits November 16, 2026 20:32
…#6938 review)

The TRUNC_REF_CLOSE hard-cut tail in the streaming flush() dropped its
remainder under the response-first-drop budget, which a one-shot strip
earlier in the same response had already spent — a silent drain drop.
Every other drain site in flush() was given the duringDrain flag by the
#5192 dual-budget commit; this one was missed.
…#6720, PR#6938 review)

pairing is nudge-attributed by design (#6729), but the pairing loop
consumed ANY next fold — including a model-active compression — so the
per-event 'not folded' ratchet flag was silently lost whenever the model
happened to self-compress after a nudge. Regression test added.
…y (PR#6938 review)

- config.example.json shipped agentsR='' (present-but-empty), which the
  jget/:-/|| chain treats as unset-inherited from GATE_AGENTS — Lane R
  would run the full P agent set, hit 'unsupported lane' and false-red
  after paying for six agents of real-model turns. Example now ships the
  launcher default dsh,pi, matching _doc_agentsR.
- entrypoint.sh: rm the per-run rc files before launching the concurrent
  subshells — a stale .rc-plugins/.rc-restart in a persistent outDir
  could be read back if the subshell died before its final echo, a
  failure direction that HIDEs a red in release verification.
- both READMEs: the dsh-variants opt-in sentence still listed dsh-google
  (now in the default set), and laneScript/snapshotRender were missing
  from the config-key lists (they only had _doc_* in the example).
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

📦 Built Package Artifact

Branch: 2026-11-16_release-v0.1.216 (5d852d2)

Latest build — install this exact version

npm install -g billion-context@0.0.10568-pr.6938.c1c8a16

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
5d852d2 billion-context@0.0.10568-pr.6938.c1c8a16 build
59e6c86 billion-context@0.0.10555-pr.6938.bb01552 build
34b0fc8 billion-context@0.0.10546-pr.6938.8565666 build
e8d2577 billion-context@0.0.10534-pr.6938.eedf3c3 build
523fc22 billion-context@0.0.10452-pr.6938.792a4bd build
64b0700 billion-context@0.0.10444-pr.6938.f94eb6c build
28f11a0 billion-context@0.0.10418-pr.6938.13d9a2c build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6938.tgz
npm install -g package

Install instructions are refreshed on each push.

dog and others added 14 commits November 16, 2026 21:47
…ed on the next client re-send (#6947)

The handoff capture (handoffReply) wrote its messages to
session.metadata.handoffResponse — consumed solely by the 'bili export'
CLI. The store rows existed only after the NEXT request re-sent the
conversation, so an idle session's last reply was missing from
index.db and the /__bili web UI kept showing the previous reply
(live sessions 01a1dd98 and 01a1de38: reply in pi jsonl with
stopReason=stop, zero DB rows, none arriving while the session idles).

- handoffReply.save(): append the captured messages back into
  session.lastMessages with codec-derivable ids (deriveMessageId +
  cluster numbering), so the debounced turn-end save persists them
  immediately. Folded snapshots are untouched; all stale guards
  (request advance / snapshot swap / discard / oversize) apply to the
  write-back as well.
- store.ts: a full re-ingest that joins a stored row whose ref is
  still NULL backfills the minted ref (NULL only — the stored value is
  the index-time projection and never rewrites; the 'BLOCKED'
  byRaw-only token stays out of messages.ref).
- tests/issue6947-turn-final-writeback.test.ts: id stability vs the
  production codec re-send (the store join key), cluster numbering,
  tool-call fields, folded/stale no-ops, and store-level
  land-once + backfill guards.
…oin exactly (#6947)

The original write-back derived ids with legacy deriveMessageId
(toolCallId slot filled, raw args text). The production codecs feed
deriveCanonicalMessageId (#3642): toolCallId pinned empty, args via
canonicalToolArgs. Plain text/reasoning seeds coincide, but every
tool-call write-back row minted an id the re-send pass would never
derive — a (msg_id, identity) join miss per tool call: refused delta
+ O(history) full re-ingest + a retired-row tombstone, every turn,
on exactly the long sessions this project exists for.

- new kernel helper baseIdOfCore(BiliMessage): re-derives the canonical
  base id from core fields (null only for image-part cores, whose #3751
  payload fingerprint lives in sidecars the capture never sets);
- the handoff write-back pre-seeds a ClusterCounter over the stored
  tail with it, so appended ids number like the next full codec pass;
- tests: the tool-call write-back id is pinned against the canonical
  derivation, plus a re-send-join test through the real openaiToCore
  (text + tool-call + tool-result) that fails under the legacy seed.

Verified: issue6947 suite 9/9; handoff-response/handoff-capture-work/
handoff-client-abort/web-handoff-roles/e2e-export-handoff +
storage-ingest-watermark/issue5744-ingest-diff/issue5794-ingest-cap/
order-unified-store/issue4665-archive-restore-identity = 74 pass /
0 fail / 1 skip; kernel suite 1640/1640; 20-suite storage sweep
139 pass / 8 fail — the 8 reproduce identically on clean master
(pre-existing content-store envelope failures, unrelated);
tsc --noEmit and npm run build clean.
…guard #2092)

kernel/ is human-gated: a PR touching it must declare 'kernel-change' in
its body. The helper is host plumbing — it only pre-seeds the write-back
ClusterCounter and needs two helpers the kernel ALREADY exports
(deriveCanonicalMessageId, canonicalToolArgs). Moved baseIdOfCore into
src/server/handoff-response.ts as a module-local function; the PR diff no
longer touches kernel/.

Verified: tsc --noEmit clean; issue6947 suite 9/9; handoff-response/
handoff/handoff-capture-work/handoff-client-abort/web-handoff-roles/
e2e-export-handoff = 44/44; check:unused-exports clean (12 waived).
The probe anchor PROXY_TOOL_AT=6 was calibrated on 2026-10-31 for #4521
(schedule {4,6,8,9}). The nudge scheduling has shifted again — nudge now
lands at {3,5,11,14}. Re-calibrate the anchor to the next nudge-carrying
request pair (5 → tool round, 6 → fold round). The fold/proxy-tool-round
mechanics under test are unchanged.

Closes: master-red on test (windows-latest, 22, 3) and (ubuntu-latest, 22, 1).
…pstream index (PR#6938 review)

The scenario-materialization assert pinned the ephemeral nudge to exactly
inputs[6]. The arm index tracks the local token-estimate curve, so an
unrelated stable-prefix size change in this batch (#6928 removed the
per-turn '[ACP status: ...]' model-visible line, ~260 tokens/request)
shifted the arm one request earlier and turned the release CI red on a
byte-identical assertion — the same trip hit master commit #6922.

Scan inputs[0..PROXY_TOOL_AT] for the nudge instead: still proves the
production trigger shape (nudge armed pre-fold -> model calls proxy tool
-> compress), no longer a knife-edge on one estimate sample. The real
#2929 invariants (post-fold re-request + next-turn byte stability) are
unchanged and pass (nudge now lands at request[3] on the local curve).
…tamp lane sidecars (#6947)

The id join landed in c0242dc, but the store key is msg_id AND stored-byte
identity (id/wireIndex stripped) — and the raw capture lacked what the client's
re-send codec stamps:

- openai reasoning cores carry a reasoningContent sidecar (the codec stamps
  the reasoning text a second time);
- clients like pi re-serialize tool-call args (parse + JSON.stringify,
  compact, order preserved) instead of echoing the streamed bytes.

Without the restamp every reasoning core and every tool call left TWO rows
per reply: the write-back row retired by the next full ingest + the re-send
row, with the content CAS storing the reply bytes twice — unbounded
tombstone/CAS bloat on long sessions. The write-back now restamps
openai reasoningContent and compacts openai/anthropic tool-call args before
pushing to lastMessages, so the re-send joins onto the SAME rows (pinned by
a store-level identity-join test). Lanes whose codecs attach payload
sidecars the text capture cannot reproduce (google rawGoogleParts /
responses rawResponsesItem / anthropic thinkingSignature) keep their
accepted byte-drift residual.
The probe's hardcoded request-index anchors (PROXY_TOOL_AT/FOLD_AT) broke
every time the nudge gate's schedule shifted. The last recalibration
(245ecb1) was measured on a direct local run (timestamps ON by default
since #4313), but CI runs the suite preload pin BILI_MESSAGE_TIMESTAMPS="0"
(timestamps OFF) — a different wire shape, a different schedule (no nudge at
index 5) — so it passed locally and failed on every CI shard.

Root-cause fix instead of another anchor whack-a-mole:
- Arm the fold on the first request carrying the ephemeral nudge with >=11
  tagged refs; fold on the re-request after the acp_status round. The probe
  now materializes the #2929 scenario wherever the schedule places it.
- Pin compress.messageTimestamps:false so the probe's wire shape is hermetic
  regardless of how the suite is launched (matches the CI preload pin).

Supersedes the 245ecb1 recalibration. Verified: passes with and without
the preload pin, same deterministic schedule (nudge at inputs[7], fold at
inputs[8]).
…dger (direction C, #6947)

The write-back appended the turn-final reply to session.lastMessages, but
the reply's ref is minted by the kernel only when a request presents it —
fork/snapshot between turn end and the next request saw a message with no
ref and 409'd SNAPSHOT_UNAVAILABLE.

Direction C: save() stashes plan-ready rows in metadata.handoffReply
(ids derived exactly as the re-send codec derives them, incl. cluster
numbering and lane-sidecar restamps); the planners turn the stash into
trailing NON-TAIL log rows (never tailSeqs, so the reconstructed view
stays byte-equal to the session file); the full path joins the re-send
by identity and backfills the NULL ref (as before), and the delta path
now joins a stored row above the trusted tip in place (keep seq, claim
the NULL ref) so the #3133 fast path stays green across the boundary.
lastMessages is never touched — fork invariant restored.
# Conflicts:
#	tests/issue2929-codex-fold-double-miss.test.ts
@ranxianglei

Copy link
Copy Markdown
Owner

8问

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Audit complete on the full window (v0.1.215..master, 98 files +6334/−498) plus the release branch's own delta — one important note up front: PR #6953 (direction-C fix for #6947) was merged into this release branch at 09:35 +0800, 9 minutes before your 8问 comment. The PR body's "Changes since v0.1.215" list was generated at open time and does NOT cover it. The branch's real diff vs master is 21 files +927/−79, not just the version bump. I audited that delta line-by-line (storage = high-risk domain).

8问

  1. 是什么问题: v0.1.216 发版 PR(自动一键)。PR 正文本身是版本号变更,但分支随后合入了 PR [PR] fix(storage): persist the turn-final reply at turn end — it only landed on the next client re-send (#6947) #6953(pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 的 direction-C 存储修复),实际内容 = 版本 bump + 该存储修复。审计窗口 = v0.1.215 以来全部变更 + 该修复。
  2. 什么原因导致的: 窗口内各项是独立修复/特性,非单一根因。最重要者:
  3. 影响范围与严重程度: pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 修复针对 p1 级数据丢失(所有「一轮以长最终回复结束且随后闲置」的 pi-mode 会话;web UI/decompress/fork 都读到过期数据)——这是修复,恢复正确性。窗口其余为定向修复/可观测性,无全局行为漂移;行为变更全部列在下方清单。kernel 版本纪律违规是流程问题(无外部影响)。
  4. 怎么修复的:
  5. 是否有回归问题: 逐项审过的既有行为: snapshot-render view 不变(stash 行永不进 tailSeqs,重建 view 与 session file 的 lastMessages 字节一致);重发路径不变(planner 跳过 msgId 已是 view 行的 stash 行);fork/snapshot 不变;pre-[PR] dsh purpose: declare auxiliary requests instead of content-guessing (#6880) #6883 插件保持 persona ladder 字节不变(灰度安全);nudge hold 仅在请求被拒时回滚 stamp(成功路径不变);kernel statusLine 移除后无残留消费者;[DSH plugin mode] Echoed render tag with type="tool:…" leaves a fabricated tool result in assistant text and starts a self-copying loop (0.1.213, kimi-k3.1-pro) #6557 tool-typed echo span 整体死亡(text 通道不变);[Bug] Inconsistent system prompt separator in Responses internal re-request breaks cache prefix | [Bug] Responses 内部重请求的系统提示分隔符不一致,破坏缓存前缀 #6922 非 responses 保持 " " 胶;incremental lane 64MiB cap 移除只改变大信封路由(readBody 已强制接收预算)。高危模式: 无 fail-fast 变吞错、无静默配置覆盖、无阈值漂移(除清单所列)、无输出格式漂移(除清单所列)。本版本引入回归: 无(0 处),待 CI 确认。
  6. 是否破坏缓存: [Bug] Inconsistent system prompt separator in Responses internal re-request breaks cache prefix | [Bug] Responses 内部重请求的系统提示分隔符不一致,破坏缓存前缀 #6922 本身就是缓存缝一致性修复(responses wire round-2 system join 改用共享 joiner,与非 responses 对齐)。[PR] fix: un-show a nudge whose request the upstream rejected #6531 nudge hold 仅在拒绝时回滚 stamp,成功路径前缀字节不变。Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 recovery ledger 为 sqlite 持久化、稀疏、不触 wire。[Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880 purpose 头: 预声明插件不变,头是 host→bili 信道。未引入任何缓存失效。
  7. 是否改了设计方向: [Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880 是身份信道 purpose 声明的终态(在既有 KDD fix: suppress duplicate auto-update notices within one process #17/release v0.1.6 #18 框架内,声明 purpose 优先于 body 启发式;dsh-declared persona 直接 key 原始 session id)——协议演进,非新方向。pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 direction C 是存储架构决策(owner 已拍板的 direction C)。无其他方向变更。
  8. 是否引入了新的配置: delegate.notifyStructured(pi-subagents 配置,默认 false,opt-in,已文档化);compress.messageTimestamps 为既有 key,默认翻转 OFF→ON(opt-out: false / env 0);gate harness 的 snapBase/laneScript/snapshotRender 仅 CI gate 用,非产品配置。无新 BILI_* 产品 env。

行为变更清单(旧→新 + 原因):

高危域逐项点名核查:

发现(非回归,本 PR 不处置):

  1. kernel 版本纪律违规: PR [PR] kernel+host: remove the #4521 armed-but-silent '[ACP status: …]' refresh line (#6928) #6929(4ccccab)改了 kernel/src/compress.ts + kernel/src/types.ts + kernel/tests/issue4521-retry-livelock.test.ts,但未 bump kernel/package.json(停在 0.0.198)且 PR 正文无 kernel-change: 声明。kernel-guard CI job 在该 commit 上 FAILED(run 133220452200,10:36:37→10:37:00),merge 仍在 10:37:33Z 进行;后续 run(133240826684)因 three-dot diff 在 merge 后为空而空过。in-repo pin 不变量(KDD feat: persistent + namespaced sessions, multi-tenant session isolation, stream robustness #5「commit IS the pin」)被破坏;将在在途分支 origin/2026-11-16_image-recovery-spill(含 0.0.199 bump)合入时自愈。仅报告——发版 PR 不能携带 kernel bump(release 车道 = version-only)。
  2. pi-subagents lockfile: 窗口内 commit "fix([PR] Pi: opt-in structured acp_delegate notification envelope for third-party UIs #5790): sync root package-lock.json..." 实际修的是 pi-subagents/package-lock.json(0.2.2→0.2.4)——commit message 小误,非阻塞。

CI 状态(镜像缓存快照 01:47 UTC): static-gates 3/4 绿(1 个 in progress),test 车道运行中(ubuntu/windows × node 22/24 shards),0 失败。

判定: 可合(待 CI 绿)。 窗口无回归;发版分支携带的 #6947 direction-C 存储修复已逐行审过;kernel 版本纪律违规为流程发现,不阻塞发版。

ranxianglei and others added 3 commits November 17, 2026 10:58
…on C1, #6947)

The first cut of this fix persisted the turn-final reply as non-tail rows
in the messages table. That breaks the table's contract: its seq space is
the ref-ledger substrate — on the first fold, persist.maybeRestampToLedger
aligns every live ref onto the store row's seq+1 (#4316), so a non-view row
interleaved in the table desyncs every post-fold ref (golden wire drift:
responses/google legs, body #10 onward).

C1: the stash lives only in sessions.metadata_json.handoffReply. That column
is persisted in both the legacy file and the unified DB, identical in both
views (digest-equal), so the reply still lands durably in the database for
#6947's 'anything reading the DB loses the turn's final reply' concern —
without touching the view, the ledger, or any wire. A client re-send then
persists the reply as a normal view row with the kernel-minted ref, exactly
as before #6947.

- handoff-response.ts: unchanged from the previous cut (metadata-only stash,
  plan-ready rows with the codec-canonical ids, restampForJoin sidecars)
- ingest.ts: keep the planStoredMessageRow/HandoffReplyStashRow exports the
  capture uses; no planner emission
- store.ts / mysql.ts: back to the pre-cut delta/full paths (the join
  extension is gone with the table rows)
- tests: rewrite for C1 (stash never reaches the table; re-send is base
  behavior; identity join-key parity; golden re-baseline = metadata section
  only)

Local (node 22, clean env): issue6947 12/12, fork 4 files 91/91, lane/
storage/golden 6 files + storage-engine-proofs green at BASE expectations,
build OK.
…#6938 review)

1. blocks upsert carried JS // line comments inside the MySQL SQL string
   (since #4608) — MySQL has no // comment, so EVERY blocks ingest on the
   mysql backend syntax-errored ('near // #4608: keep durable interval
   evidence' at line 6) and no session with >=1 fold ever populated the
   unified store. Converted to a /* */ block comment. The DSN-gated e2e
   suite (delisted from CI per #4926) is where this first surfaces.
2. Full-path mirror of the sqlite lane's #6953 ref backfill: the delta
   path already claims NULL refs on in-place joins, but a FULL re-ingest
   of a turn-final write-back row (ref=NULL, the documented worst case)
   stayed ref-less on the mysql lane because INSERT IGNORE no-ops the
   existing row. SELECT now carries ref; ref IS NULL rows join a
   non-BLOCKED incoming ref via the same idempotent UPDATE as the sqlite
   twin (store.ts remapPlanToAbsolute).

Both verified: storage-mysql-seam 8/8 + live DSN run of
storage-backend-mysql-e2e (ingest now lands; the suite's remaining
failure is its delisted pre-existing hot-path assertion, #4926).
tsc --noEmit clean.
…ecovery chart (PR#6938 review)

#6729 ported the client-side recovery chart to the server SVG but dropped
the circle closing tags on both growth-point branches (report.ts flat and
measurable points): the flat branch left <title> unclosed-inside-circle so
the whole SVG was malformed XML (strict image loaders -> rasterize fail ->
PNG download broken for any session with a flat growth point), and the
measurable branch emitted a bare <title> sibling of <svg> (tooltip stuck
to the whole document). Client twins (client.ts growth chart) already close
properly; this mirrors them. tsc clean; all <circle> elements in report.ts
now verified closed.
@ranxianglei

Copy link
Copy Markdown
Owner

(a: sglang-gpu0/qwen3.8-27b — release review per house playbook; verdict below, merge 留给人)

结论:可合并(合并留给人)

v0.1.216 主体(98 文件,相对 v0.1.215)review 通过:无 CRITICAL/HIGH。两道 CI 红均已定位并修复,CI 现全绿(34/34 job),真模型三道快车道全绿。

两道 CI 红的根因与修复

红 1:#2929 探针钉死了会漂移的请求下标

#2929: nudge + proxy-tool-round fold keeps re-request/next-turn byte-stable 断言 nudge 必须出现在第 7 个上游请求里。#6928 移除了每轮发给模型的 [ACP status: …] 状态行(合法行为),每请求稳定前缀短了 ~260 token,nudge 触发时机提前一格 → 钉死下标的断言挂。
→ 修复 64b0700:探针改为「折叠前窗口内找到 nudge 即通过」,意图不变(真 #2929 不变量——折叠后重请求与下一轮逐字节一致——原样保留)。
(注:#6953 作者后来自行重校准了同一测试,release 合并时取其版本。)

红 2:#6953 初版把回复行写进了 messages 表 → ref ledger 错位

#6953(turn-final 回复持久化,#6947)初版把回复作为 non-tail 行写入 messages 表。该表的 seq 空间是 ref ledger 的底座(首折时活 ref 对齐到行 seq+1,#4316),非 view 行把 view 行 seq 顶偏 → 首折后每个 ref 编号散掉:storage-engine-proofs 的 responses/google 腿从第 10 个请求体起只有 <acp>mNNNNN</acp> 编号漂移(文本一致),lane 计数测试连带红。
→ 修复方向 C1(已回到 #6953 分支,80daffc2f):stash 只进 sessions.metadata_json.handoffReply —— 在 legacy 文件和 unified DB 都持久、两 view 相同(digest 等价),回复依然落在 index.db 满足 #6947;视图/账本/wire 零触碰;重发即 base 行为。详见 #6953 评论。

本评审追加的修复(均已推入 release 分支)

commit 内容
a3f0b41 loop: #5192 末位 drain-drop 点补 drain 标志(src/loop/tag-echo-filter.ts:1683)
1869f0e cache-ledger: nudge arm 只配对 nudge 归因的 fold(mode 'n'),附回归测试
28f11a0 gate: config.example agentsR 默认值修正、persistent outDir 旧 rc 文件清理、README 参数表补 laneScript/snapshotRender
64b0700 #2929 探针窗口化(见上)

真模型 gate(快速三车道,8299)

  • 8199 一轮红 = 环境(该端口当时被其他负载打满,上游超时/拒答),非候选回归;
  • 8299 复跑(含 C1 的最终 tarball):A 9/9、B 6/6,U 2/2,253s 全绿;
  • 完整七车道容器 gate 未跑(GPU 占用中),是否补跑请 owner 定。

报告项(不动手)

本地环境失败(非回归)

13 个本地失败经 base v0.1.215 同环境复现 + CI 同 commit 绿 确认环境问题(node 25 等);C1 后 storage 批次 71 文件 389/391,2 失败均为 base 预存。

URL: #6938

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

第二轮独立复审完成(最终 head 59e6c86b4,vs master 26 文件 +729/−63),与上一位评审的结论交叉验证:

我独立核过的关键点

  • C1 重构(80daffc)逐行复审:stash 只进 sessions.metadata_json.handoffReply(legacy 文件与统一 DB 双视图都持久、digest 等价),planner 不再向 messages 表发 stash 行;store.ts/mysql.ts 的 delta/full 路径已回退到 pre-cut 形态;full-path ref 回填保留且幂等(只补 ref IS NULL、绝不改写非空 stored ref)——它同时修复初版 cut 的 PR 构建(0.0.10418-pr.6938.x)可能已写入的 ref=NULL 行。golden storage-render 4 个文件仅 metadata 段 re-baseline(state/blockContents/stats 段 digest 未动),与 C1 声明一致。
  • d371092 确认是真 bug:mysql 块 upsert 里的 // 行注释是 JS 语法不是 MySQL 语法,自 Post-fold resaves erase resolved block interval bounds | 折叠后重存会把已解析的块区间边界抹回未知(-1/-1) #4608 起 mysql 后端每次 blocks ingest 都语法错——统一存储在 mysql 车道上从未真正落过 fold 证据。改 /* */ 正确;ref 回填与 sqlite twin 对齐。
  • 59e6c86 确认是真 bug:flat 分支 circle 未闭合 → 整个 SVG 是畸形 XML → 任何含 flat 增长点的会话 PNG 下载坏。两处闭合正确。
  • CI 实况(镜像缓存 04:21 UTC 快照):最终 head 59e6c86b4 的 CI 仍在跑(30 项中 2 项完成、0 失败、28 项排队/运行中)。上一位评审的 34/34 全绿是前一个 head 的结果,最终 head 的绿还需等这一轮跑完。
  • 报告项(上一位评审列的 wire/web/dsh/kernel-cache 各项)我逐项过了一遍:均为中量或需拍板的发现,无「几行级显而易见」可直接修的小缺陷,按发版契约报告不猜,不塞进发版分支。

8问

  1. 这是啥问题: v0.1.216 发版——v0.1.215 以来约 79 项变更(身份信道 purpose 声明终态 [Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880、nudge 拒绝回滚 [PR] fix: un-show a nudge whose request the upstream rejected #6531、receipt 修正 Compress success receipt echoes the requested end ref instead of the clamped one, so the model's next call starts above the highest ref and is refused #6855/compress receipt masks the offending ref as [stale-ref], making post-model-switch failures undiagnosable #6712/[Bug][pi] Policy-gate REFUSED receipts (compress.requireNudge / requireRecommendation) charge no failure ledger — endless byte-identical refusals, breaker never arms | 策略门 REFUSED 回执不计入失败账本:逐字重复拒绝、熔断永不启动 #6728、dsh tool 生命周期 dsh: stale tool readiness after same-context reload or adopted-owner disposal #6702、recovery 观测 Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 等),外加发版分支上的 pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 修复(pi-mode 一轮最终回复丢失不落库)和 6 个评审修复 commit。
  2. 根本原因是啥: 最重改动 = pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 direction C1——turn-final 回复的持久化从「依赖后续请求重发才落库」改为「save 时按存储序列化链暂存进 sessions.metadata_json.handoffReply」:metadata 列双视图持久且等价,回复不再丢,同时不碰 messages 表(ref ledger 底座)、不碰 view、不碰 wire;客户端重发时回复按 base 行为成为普通 view 行并拿到 kernel 铸造的 ref。
  3. 如何修复: 我未新增修复(分支上评审修复已齐:80daffc2f C1 重构、d371092b8 mysql 注释语法错 + ref 回填镜像、59e6c86b4 SVG circle 闭合、a3f0b411/1869f0ec/28f11a09/64b07006 前轮修复);建议修的(报告项,不塞进发版):web Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 头部计数拿最近 500 事件窗口当会话总量等 4 MEDIUM、handle.ts purpose 头信任面对 plugin 请求不对称、dshDeclaredPersona 对辅助类声明也生效(4 处分支)、recordNudgeInject 在 prepare 期记账(请求 4xx 时记了模型没看到的 nudge)。
  4. 能否合并/发布: 可合并(合并留给人)。依据:C1 逐行复审无回归(stash 不触 view/ledger/wire;delta/full 路径已回退;ref 回填幂等只补 NULL);两道 CI 红已定位修复(codex 命中率问题分析 #2929 探针窗口化、C1);前一个 head CI 34/34 全绿 + 真模型三车道全绿(8299:A 9/9、B 6/6、U 2/2);最终 head CI 运行中、0 失败。
  5. URL: https://github.com/ranxianglei/billion-context/pull/6938(关联 pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 / [PR] fix(storage): persist the turn-final reply at turn end — it only landed on the next client re-send (#6947) #6953 / Per-turn '[ACP status: …]' line keeps ordering the model to fold leftover small ranges right after a big fold — the opposite of what the compress receipt says #6928 / [Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880 / [PR] fix: un-show a nudge whose request the upstream rejected #6531)
  6. 影响面: 存储(handoff-response.ts / ingest.ts / store.ts / mysql.ts + web recovery 图)、身份信道(handle.ts / side-request.ts / plugin.ts / dsh-native.ts 的 purpose 声明)、nudge 节奏(relay.ts / session.ts / prepare-* 的拒绝回滚)、model-facing receipt 文案(stream.ts:feat: Support precise timestamps for each message, allowing the model to recognize which messages are outdated and which | feat: 给每个消息支持精确时间,以让模型认识到什么消息是过期的什么是当前的新的 #4313 span 默认开、Compress success receipt echoes the requested end ref instead of the clamped one, so the model's next call starts above the highest ref and is refused #6855 clamp end 回显)、dsh tool 生命周期、hermes 插件 dist 解析、gate harness(CI 用)。用户面:pi-mode 闲置会话 web UI 回复显示(pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 修复对象)+ receipt 措辞变化。
  7. 测试: issue6947-turn-final-writeback.test.ts(405 行:stash 不进表 / 重发即 base / identity join-key 一致)、storage-engine-proofs(首折后 ref 对齐——C1 前红、C1 后绿)、issue2929 探针(窗口化后 schedule-independent)、issue6720-nudge-recovery、storage-mysql-seam 8/8、golden storage-render 4 个(仅 metadata 段)、真模型 gate 8299 三车道全绿。
  8. 风险: ① 完整七车道容器 gate 未跑(GPU 占用中)——是否补跑待 owner 定;② 最终 head CI 未跑完(运行中,0 失败);③ 报告项未修(web Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 4 MEDIUM、purpose 头信任不对称、recordNudgeInject 4xx 记账等)——非阻塞,应立项跟踪;④ kernel 版本纪律违规([PR] kernel+host: remove the #4521 armed-but-silent '[ACP status: …]' refresh line (#6928) #6929 未 bump kernel/package.json 且无 kernel-change 声明,kernel-guard 红被 merge 越过)——流程发现,在途分支合入 0.0.199 bump 后自愈;⑤ 装过初版 cut 的 PR 构建(0.0.10418-pr.6938.x)的用户 DB 里可能有 ref=NULL 的回复行——C1 的 ref 回填路径会在下次全量 re-ingest 时修复。

…the tool CC exposes (#6958, PR#6938 review)

CC 2.1.x keeps MCP tools out of tools[] until ToolSearch loads them and
announces them in the request messages instead ("deferred tools are now
available via ToolSearch … mcp__bili__compress"). observeDeclaredTools
reads tools[] only, so the #4344 dialect was always false for CC and the
nudge advertised the bare `compress` — which CC answers "No such tool
available" — so workers WITH the tool never folded (field sample: 14 hard
fails, 13 never folded, sessions pinned at 133K–244K tokens).

resolveLaneDecisions now treats "declared in tools[] OR announced
deferred" as "the host has this tool" for both the dialect and compress
reachability; the announcement is observed from this request's messages
(single site, no caller changes — extractDeferredBiliToolNames).
Deliberately NOT the #6960 variant: its claudeCodeWithoutTool gate (no
compress anywhere → surface off) would also starve the #4372 zombie probe
on headerless rounds. PR #6960 stays unmerged; this supersedes it on the
release branch.

Tests: tests/claude-deferred-tools.test.ts (CC field repro — dialect flips
on the announcement; deferred-only reachability on a host-scoped profile
with control; bare compress still wins; extractor over both content
shapes). 153 regression tests across the six lane-decision/self-heal
files pass unchanged.
@ranxianglei

Copy link
Copy Markdown
Owner

(ai: sglang-gpu0/qwen3.8-27b — release review 跟进)

#6958(Claude Code 调不到 bili 的 compress)已修进本分支,commit 5d852d2。

问题:CC 2.1.x 把 MCP 工具"延迟"了——mcp__bili__compress 不在请求的 tools[] 里,只在消息正文的 ToolSearch 公告里。lane-decisions 只读 tools[],所以 #4344 的方言判定对 CC 恒为 false,提醒里叫的是裸名 compress,CC 回 "No such tool available"。线上样本:14 个 worker 硬失败,13 个从没压成功,会话卡在 133K–244K token。

改动(5d852d2,2 文件 +117/-1):

验证:新增 tests/claude-deferred-tools.test.ts(4 例,含 CC 现场复现形态);lane-decisions 六个回归文件 153/153 不变;tsc/build 干净。CI 在跑(65 检查)。

结论:无回归,修复已生效;合并留给人。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

对最终 head 5d852d2f5(#6958 修复)做了独立复审,分支 vs master 现为 28 文件 +870/−64:

5d852d2 复审结论:干净,无回归

CI 实况(镜像缓存 06:31 UTC 快照):新 head 5d852d2f5 上 30 项检查 10 项完成(全绿)、0 失败、20 项运行/排队中。

8问

  1. 这是啥问题: v0.1.216 发版——v0.1.215 以来约 79 项变更(身份信道 purpose 声明终态 [Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880、nudge 拒绝回滚 [PR] fix: un-show a nudge whose request the upstream rejected #6531、receipt 修正 Compress success receipt echoes the requested end ref instead of the clamped one, so the model's next call starts above the highest ref and is refused #6855/compress receipt masks the offending ref as [stale-ref], making post-model-switch failures undiagnosable #6712/[Bug][pi] Policy-gate REFUSED receipts (compress.requireNudge / requireRecommendation) charge no failure ledger — endless byte-identical refusals, breaker never arms | 策略门 REFUSED 回执不计入失败账本:逐字重复拒绝、熔断永不启动 #6728、dsh tool 生命周期 dsh: stale tool readiness after same-context reload or adopted-owner disposal #6702、recovery 观测 Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 等),外加发版分支上的 pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 修复(turn-final 回复丢失不落库)、[Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 修复(Claude Code 延迟工具导致 nudge 叫错工具名、14 个 worker 硬失败)和 7 个评审修复 commit。
  2. 根本原因是啥: 最重改动仍是 pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 direction C1——turn-final 回复的持久化从「依赖后续请求重发才落库」改为「save 时按存储序列化链暂存进 sessions.metadata_json.handoffReply」,不碰 messages 表(ref ledger 底座)、不碰 view、不碰 wire,重发时按 base 行为落 view 行并拿 kernel 铸造的 ref。次重是 [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958:「宿主有这工具」的判定从只读 tools[] 扩为 tools[] 声明或 ToolSearch 公告列出,单点观察同时作用于方言判定与可达性。
  3. 如何修复: 我未新增修复(分支上评审修复已齐:80daffc2f C1 重构、d371092b8 mysql 注释语法错 + ref 回填镜像、59e6c86b4 SVG circle 闭合、a3f0b411/1869f0ec/28f11a09/64b07006 前轮修复、5d852d2f5 [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 延迟工具);建议修的(报告项,不塞进发版):web Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 头部计数拿最近 500 事件窗口当会话总量等 4 MEDIUM、handle.ts purpose 头信任面对 plugin 请求不对称、dshDeclaredPersona 对辅助类声明也生效(4 处分支)、recordNudgeInject 在 prepare 期记账(请求 4xx 时记了模型没看到的 nudge)。
  4. 能否合并/发布: 可合并(合并留给人)。依据:C1 与 [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 均逐行复审无回归;两道 CI 红已定位修复(codex 命中率问题分析 #2929 探针窗口化、C1);前一个 head CI 34/34 全绿 + 真模型三车道全绿(8299);新 head 5d852d2f5 的 CI 运行中(10/30 完成、0 失败)。
  5. URL: https://github.com/ranxianglei/billion-context/pull/6938(关联 pi-mode: a turn's final assistant reply is silently dropped from the session database — web UI keeps showing the previous (stale) reply #6947 / [PR] fix(storage): persist the turn-final reply at turn end — it only landed on the next client re-send (#6947) #6953 / [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 / Per-turn '[ACP status: …]' line keeps ordering the model to fold leftover small ranges right after a big fold — the opposite of what the compress receipt says #6928 / [Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880 / [PR] fix: un-show a nudge whose request the upstream rejected #6531)
  6. 影响面: 存储(handoff-response.ts / ingest.ts / store.ts / mysql.ts + web recovery 图)、lane 判定(lane-decisions.ts 的 [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 延迟工具观察——影响所有走 plugin 模式的 CC 会话的 nudge 工具名)、身份信道(handle.ts / side-request.ts / plugin.ts / dsh-native.ts 的 purpose 声明)、nudge 节奏(relay.ts / session.ts / prepare-* 的拒绝回滚)、model-facing receipt 文案(stream.ts)、dsh tool 生命周期、hermes 插件 dist 解析、gate harness(CI 用)。
  7. 测试: issue6947-turn-final-writeback.test.ts(405 行)、claude-deferred-tools.test.ts(4 例,含 CC 现场复现形态 + 双向门)、storage-engine-proofs(首折后 ref 对齐)、issue2929 探针(窗口化)、issue6720-nudge-recovery、lane-decisions 六个回归文件 153/153、storage-mysql-seam 8/8、golden storage-render 4 个(仅 metadata 段)、真模型 gate 8299 三车道全绿。
  8. 风险: ① 完整七车道容器 gate 未跑(GPU 占用中)——是否补跑待 owner 定;② 新 head CI 未跑完(运行中,0 失败);③ 报告项未修(web Feature: show nudge-recommended vs actually-folded tokens per fold (recovery rate) in the web panel chart and session report | 功能:web 折线图与 session 报告显示每次压缩「推荐 vs 实际折叠」回收率 #6729 4 MEDIUM、purpose 头信任不对称、recordNudgeInject 4xx 记账等)——非阻塞,应立项跟踪;④ kernel 版本纪律违规([PR] kernel+host: remove the #4521 armed-but-silent '[ACP status: …]' refresh line (#6928) #6929 未 bump kernel/package.json 且无 kernel-change 声明,kernel-guard 红被 merge 越过)——流程发现,在途分支合入 0.0.199 bump 后自愈;⑤ 装过初版 cut 的 PR 构建(0.0.10418-pr.6938.x)的用户 DB 里可能有 ref=NULL 的回复行——C1 的 ref 回填路径会在下次全量 re-ingest 时修复;⑥ [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 的 extractor 依赖 CC 公告措辞(marker 字符串)——CC 改措辞时静默回退到裸名行为(即回到 [Bug][claude] bili names bare compress while Claude Code defers mcp__bili__compress, and nudges agents that have no compress tool #6958 症状),属可接受的优雅降级,但值得在 CC 升级时留意。

@ranxianglei
ranxianglei merged commit 6a641f3 into master Nov 17, 2026
92 checks passed
ranxianglei pushed a commit to MohammadErfan-Jabbari/billion-context-upstream that referenced this pull request Nov 17, 2026
…erred-tools already on master)

Resolving the merge conflict against master (6a641f3):
- master 5d852d2 (ranxianglei#6958, PR#6938 review) already ships the deferred-tools
  observation — refined (exported extractDeferredBiliToolNames, mcp__bili__-only
  filter) — in src/server/lane-decisions.ts + tests/claude-deferred-tools.test.ts.
- This PR's unique claudeCodeWithoutTool gate was DELIBERATELY excluded in
  ranxianglei#6958 (master test comment: it would starve the ranxianglei#4372 zombie probe on
  headerless rounds; 'that trade needs its own discussion').
- Taking master's version for both conflicting files makes this branch
  byte-identical to master (empty diff). The PR has no unique changes left.
ranxianglei pushed a commit that referenced this pull request Nov 17, 2026
One conflicted file: tests/issue2929-codex-fold-double-miss.test.ts. Both sides fixed the same root cause (the #2929 probe pinned the nudge to a hardcoded upstream request index that drifts with the kernel schedule): this branch relaxed the scenario assertion (nudgeGrowthTokens 2000->3000, nudge-in-some-pre-fold-request check); master (v0.1.216, PR #6938 review) reworked the fake upstream to arm schedule-independently (first nudge-carrying request with >=11 refs) and pins compress.messageTimestamps:false for a hermetic wire shape.

Resolution: take master's version wholesale - it is a strict superset of this branch's intent (its arming logic is what the relaxed assertion was compensating for) and is CI-verified in v0.1.216. The PR-side fix commits 65e403d/298524c486 are superseded.

reference/architecture.md auto-merged: both lines kept (this branch's update-pin.ts module line + master's handoff-response.ts #6947 line).

Local verification on the merged tree: issue2929 probe green (nudge landed at inputs[7] locally - the index-pinned arming would have missed), update-pin + cli-parseargs + web-updates 40/40 green, typecheck clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR root-cause

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant