Repository navigation
[PR] release v0.1.216 - #6938
Conversation
[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 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 |
…#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.
…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).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10568-pr.6938.c1c8a16This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6938.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…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]).
…f-reply-turn-writeback
…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
|
8问 |
…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.
|
(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 探针钉死了会漂移的请求下标
红 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 个请求体起只有 本评审追加的修复(均已推入 release 分支)
真模型 gate(快速三车道,8299)
报告项(不动手)
本地环境失败(非回归)13 个本地失败经 base v0.1.215 同环境复现 + CI 同 commit 绿 确认环境问题(node 25 等);C1 后 storage 批次 71 文件 389/391,2 失败均为 base 预存。 URL: #6938 |
(ai: vllm-qwen/qwen3.8-27b) 第二轮独立复审完成(最终 head 我独立核过的关键点
8问
|
…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.
|
(ai: sglang-gpu0/qwen3.8-27b — release review 跟进) #6958(Claude Code 调不到 bili 的 compress)已修进本分支,commit 5d852d2。 问题:CC 2.1.x 把 MCP 工具"延迟"了—— 改动(5d852d2,2 文件 +117/-1):
验证:新增 tests/claude-deferred-tools.test.ts(4 例,含 CC 现场复现形态);lane-decisions 六个回归文件 153/153 不变;tsc/build 干净。CI 在跑(65 检查)。 结论:无回归,修复已生效;合并留给人。 |
…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.
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.
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
type="text">mNNNNNinto assistant text #5192)