Repository navigation
[PR] fix: review-findings wave — 7 fixes from the #4725 pre-release audit (P1×2 + P2×3 + P3×2) - #4752
ranxianglei wants to merge 25 commits into
Conversation
…ment #4316 PR3/3 (restampRefsToLedger) re-homes citation numbers once on every full-mode cold load; goldens pinning exact ref numbers are born-red. Re-pin the 7 storage-lane tests (engine-proofs x6 + orphan-recovery x1) modulo that renumbering — zero production code touched. - golden-storage-drive.ts: per-turn citation-normalized digest (shaCiteNorm) and state digest modulo stripOneTimeAlignment (stateDigestAligned); the deep-sort helper is hoisted into golden-canonical.ts for sharing. - corrupt-index-child.ts: new stripOneTimeAlignment normalizer — strips the refLedgerAligned stamp and re-homes refs onto canonical raw-id order so a clean full-mode read and the legacy fallback load compare equal. - storage-engine-proofs.test.ts: wire legs assert shaCiteNorm equality vs the legacy restart leg and the committed goldens; state legs assert stateDigestAligned; rollback leg now spells BILI_STORAGE_UNIFIED=legacy explicitly (#3818 flip: absent resolves to full, deleting the env would vacate the legacy path). - storage-orphan-recovery.test.ts: pins the content-addressable byRaw->byRef round-trip instead of a counter-era m00003 literal. - golden/storage-render/*.json regenerated with shaCiteNorm/stateDigestAligned. Converges the master-red storage-lane family (#4599 plan A, owner directive).
…ment #4316 PR3/3 (restampRefsToLedger) re-homes citation numbers once on every full-mode cold load; goldens pinning exact ref numbers are born-red. Re-pin the 7 storage-lane tests (engine-proofs x6 + orphan-recovery x1) modulo that renumbering — zero production code touched. - golden-storage-drive.ts: per-turn citation-normalized digest (shaCiteNorm) and state digest modulo stripOneTimeAlignment (stateDigestAligned); the deep-sort helper is hoisted into golden-canonical.ts for sharing. - corrupt-index-child.ts: new stripOneTimeAlignment normalizer — strips the refLedgerAligned stamp and re-homes refs onto canonical raw-id order so a clean full-mode read and the legacy fallback load compare equal. - storage-engine-proofs.test.ts: wire legs assert shaCiteNorm equality vs the legacy restart leg and the committed goldens; state legs assert stateDigestAligned; rollback leg now spells BILI_STORAGE_UNIFIED=legacy explicitly (#3818 flip: absent resolves to full, deleting the env would vacate the legacy path). - storage-orphan-recovery.test.ts: pins the content-addressable byRaw->byRef round-trip instead of a counter-era m00003 literal. - golden/storage-render/*.json regenerated with shaCiteNorm/stateDigestAligned. Converges the master-red storage-lane family (#4599 plan A, owner directive). (cherry picked from commit 18f5146)
…claim sentinel (never degenerate [0,0]) + point-query covered ids instead of the per-save full scan (#4741, #4742) - boundsForCovered: unknown coverage → [-1,-1] (planner convention) — [0,0] read like a real interval claim over seq 0 on every consumer of the columns (export surface today); the upsert CASE guard now sees the sentinel it was written for (its comment said -1/-1 all along). - both block-write branches use the computed bounds; sqlite CASE / mysql IF guard keeps durable evidence when the incoming side is unknown. - #4742: seqSpanById resolves only the ids the payloads actually name (chunked IN query), not one full-table scan per save. - storage-render goldens regenerated: only the metadata section digest moved; per-field comparison of both runs shows raw diffs are all normalizable ephemerals (UUID/timestamp/port) — CI (hermetic) is the final arbiter.
…nds at the window's last row (#4746) pos === -1 no longer skips the anchor — it slots at viewRows.length with a matching tail flush after the merge loop (mirror of snapshot-render.ts). The old skip suppressed the covered rows AND emitted no anchor: the model lost the fold's context while the response stayed ok:true and folded=N counted.
…s at the end — interleaved appends no longer delete the wrong element (#4747) The per-id index map desynced on every splice (A1,B1,A2,B2 interleaving — the append shape for edits, exactly this lookup's target scenario): B2's splice deleted A-new's slot, A's latest row was silently dropped and B appeared twice; the tried marker then permanently forbade retry. Collect per-id latest in one pass; sort once at the end. Regression pin included.
…ugh the capture accessor (#4748) The xMeasured block (and the clientBreak guard's curIn) read session.transient.sentBody/inBody directly — on the relay lane #4430 keeps pending evidence in the AsyncLocalStorage capture, so both were permanently undefined there and the measurement (whose target scenario IS the relay lane's stateless full-history clients) never fired. curB/curIn now read pendingCapture(session) with the transient as fallback; prev reads stay on transient (settled evidence is moved out of the capture at settle time). Both reads changed together — mixing them would bypass clientBreak on the relay lane.
…dger parity masks The #4316 one-time renumbering restamped messageRefs but left state.tokenSnapshot keyed by the OLD refs, so post-restart bodies carried stale per-message token counts (1.3K vs 1.4K) and the full-mode-restart wire drifted off the legacy baseline (#4599). persist.ts: two-pass remap (stage moves, delete old keys, then write new keys) so entries whose new ref collides with another move's old ref survive; fires only when superseded refs exist. Aligned normalizer (corrupt-index-child.ts): the cacheLedger's segment bookkeeping (be/bl/bs, unfinalized tail line), the derived agg block, and per-line miss-attribution (prov/seam) are restart experience, not content — no-restart and restart legs legitimately differ there. Masked in the aligned view only; raw digests keep full accounting. Goldens regenerated (stateDigest + aligned). storage-engine-proofs 12/12, golden-storage-render 5/5 locally.
….yml (#4744) + sync the four plugin manifests to package.json (#4745) - jq bootstrap (with pull-requests:write for the alignment-PR announce) is the exact block v0.1.208 shipped for the exit-127 runs; master had the pre-fix file, so the next carve-out merge would have died the same way. - manifests were stuck at 0.1.205 while package.json reads 0.1.207 — release.yml's manifest gate rejected every cut from current master, and the marketplace update detection had been silent since 0.1.206.
#4743) The retry is an egress send: observe-side feeds noteUpstreamThrottle429/ Resolved like any main-lane send (one observation per request), and the gate answers locally under an armed hold instead of burning an upstream slot — passing the empty turn through preserves the client's stream.
…on digest only; google lane is run-nondeterministic in small floats — double-run verified stable on this pin)
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g [email protected]This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4752.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
(ai: zhipuai-lb/glm-5.3) gate:local 结果(候选 0.0.900-gate.1863a23 = 本 PR head 1863a23)跑了两轮(门禁已知非确定性,审核记录里第一轮 A 7/9 → 第二轮 9/9 同型):
两轮合并判定:全部断言至少在一轮全绿。
gate 证据:scratch 保留在 gate-1025-fix(轮1)/gate-1025-fix2(轮2)。 对抗式独立复审(修复者的自我对抗,非叙述性自查)按「只读 diff、不信修复叙述、可执行就执行」过了一遍全部分支:
局限声明:这是修复者本人的对抗式复审(无第二个独立模型可用);真正的独立复审 = 本 PR 的 CI(已在跑)——请以 CI 全绿为合并前置。 |
…persisted state (#4599) The fork-survival test asserted immediately after the compress tool response, but the fold lands in the live session state asynchronously (#3573 replay semantics). Slow CI runners persisted the pre-fold state ('0 block(s) (compressions=0)' cold load) and the deepEqual diverged. Bounded 5s wait on the in-memory fold; fast machines exit on the first iteration. Product semantics unchanged.
The #4316 cold-load alignment reads the unified sidecar; its ingest of just-flushed records completes asynchronously. Slow runners compared the pre-ingest state and saw refLedgerAligned missing while the fold itself had landed. Poll (bounded 5s) until the loaded state carries the flag; fast machines exit on the first probe.
Git-for-Windows autocrlf checks the bundled .md posts out with CRLF; the exact-match '---' fences then failed to parse and every post lost its title/excerpt/date frontmatter (Windows CI: 'bundled meet-bili post found' assertion). Normalize CRLF to LF inside parseFrontmatter when the fence is CRLF-shaped; LF content is byte-identical as before. Regression test with a CRLF fixture.
… storage mode (#4599) The #4316 cold-load alignment sets refLedgerAligned only when the unified store is available; config-clean machines (CI runners) run legacy mode where it is an honest skip. The test asserted the flag unconditionally, so every shard carrying this file was born-red on CI while unified-config machines passed. Expectation now mirrors store.replicasAvailable(); verified 49/49 in BOTH modes locally.
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。本 PR 各项修复对应独立 issue(#4741–#4748),无重复立项。 标签: 现状:head 7 个红分片逐条定性:
八问:
判定:当前不可合。7 项修复的方向我都认可(storage 那条重点核过,机制成立)。等 ci-worker 按上面“正确修法”绿掉 + 我复查 diff,再给可合结论;plugin-fork 归属我本地定向验证后回帖。 |
(ai: vllm-qwen/qwen3.8-27b) 补充(收紧前一条的定性)——查了在途条目后,归属比第一轮判断更清楚,也发现一个跨分支冲突风险: 关键发现:在途 PR #4727(ci-fixes → master,open,mergeable_state=blocked)正在改的文件与本 PR 的红区完全重叠:
另有在途 PR #4652(open)专门修 “plugin-fork 断言按存储模式分支,无 sqlite 引擎 runner 不再 born-red”,以及决策请求 #4757(wire-parity proofs 在 unified-full 重启后 born-red)。也就是说:master 侧的 storage-lane / wire-parity 测试区正处于未收敛的过渡态,由 ci-fixes(#4727,#4635 哨兵协议)统一收敛。 据此重排 7 个红分片的归属:
更新后的判定:仍不可合。给 ci-worker 的收敛路径改为:① 本 PR 内修 |
…entinel (#4741/#4742) The store now stores unresolvable block coverage as the -1/-1 no-claim sentinel (never a degenerate [0,0] that reads like a live claim over seq 0); this pre-existing #4316 layer-3 regression pin still asserted 0 and went deterministically red on CI. Update the two gap-case assertions and their doc strings to -1/-1. The resolved-coverage subtest is untouched — real seq bounds are unaffected by the sentinel change.
(ai: vllm-qwen/qwen3.8-27b) 已落地一项(本 PR 唯一确定性必修):commit 剩余(交 ci-worker,需 CI 裁判,不本地盲猜):
我不替 ci-worker 抢做「ci-fixes 合并 + 金文件对账」那步——它必须靠 CI 验金,抢做只会盲猜浪费一个 CI 周期;上面是给它(及后续接手者)的确切路径。等 CI 在新 head 出结果我再复核 diff + 给可合判定。 |
… non-429 (#4743 review fix) fetchWithRetry throws UpstreamHttpError for terminal non-ok verdicts; the boundary observation armed on 429 but stayed silent on e.g. a fail-fast 400, whereas the #4204 contract clears the hold on ANY resolved non-429 (the endpoint demonstrably processed a request) — relay parity, same as the sibling #4752 site. Transport deaths remain unobserved (circuit-breaker territory, #3148). The responses-wire pin gains a re-arm -> fail-fast-400 phase asserting the hold lifts (verified failing without the fix line).
…lignment mask (#4599) After merging ci-fixes 1fa9373, stripOneTimeAlignment is the superset version (masks cacheLedger line bookkeeping bd/be/bl/bs/prov/seam, ledger agg, and metadata.snapshotShadow). The google lane's RAW persisted view is unchanged vs the PR-side pin (stateDigest dc673ce0 / metadata d827ffae / all sections identical — the values CI itself produced on head 1863a23, where the google golden passed on ubuntu 22+24 and windows 22 shards); only stateDigestAligned must be recomputed under the merged stripper. Regenerated via scripts/update-storage-render-goldens.ts; double-run stable. chat/anthropic/responses pins needed no change.
(ai: vllm-qwen/qwen3.8-27b) CI 自动修复车道 attempt 1/2:已把 ci-fixes 并入本分支 + 重钉 google 车道金钉,push 新 head 八问:
残留观察项(不阻塞本 PR):若重跑后 windows shard 仍现 判定:分支已 push( |
(ai: vllm-qwen/qwen3.8-27b) 收到。两点现状补充: CI 状态:新 head gate 候选与新 head 的覆盖关系:你的 gate 候选是 无需你操作,等 CI 结果即可。 |
…mspec wrap on win32 (#4599)
The ci-check lane's expectation change (c496cfb) exposed a real Windows bug: stripInheritedProxy builds inlineEnv as a spread copy of process.env, which keeps the original key casing (ComSpec) — Windows env vars are case-insensitive but plain objects are not. planClientSpawn's exact env.COMSPEC probe then missed it and silently degraded every wrapped spawn to the bare-name 'cmd.exe' fallback (verified by repro on a real win32 box: childEnv.COMSPEC=undefined while process.env.COMSPEC was set). Fix: probe COMSPEC/ComSpec/comspec in planClientSpawn and planDshSpawn. Verified on real Windows (Node 22): launcher-opencode-inline + fix-679 + dsh-refresh 37/37; host tsc clean, 35 pass / 2 win32-skips.
…payloads — with the #1195 rescue exempt (#4288, rework of the reverted #4294) The round-boundary exit now judges on the payload's OWN floorless estimate (result.payloadEstimate) instead of decisionTokens, which is floored by the session usage baseline. After a mid-session switch to a smaller-window model that baseline was measured under the prior (wider) model and sits above the new target, so the floored comparison never trips and the summarization ladder burns every round on a payload that already fits — until the client times out mid-ladder and the session wedges (gate:local reproduced: 299s continuous preflight at deficit 0). The rework adds what the reverted 621c35a (#4294) lacked: the own-estimate exit is OFF on the #1195/#3787 refold lanes (upstreamProvedOverflow), where the baseline carries the upstream's STATED number (armed by armOverflowShrink right before the refold) and is evidence, not staleness — a locally-fitting payload was just rejected by the real window, so folding continues on the floored quantity exactly as before. The original exit killed that rescue: the mock upstream's stated 130k made a 17k payload look fitting and preflight returned an unchanged body (issue1195 A/C/2777 red, verified by probe on a clean tree). Both contracts pinned green in one tree: issue4288 (stale baseline, fitting payload, zero fold calls) + issue1195 A/B/2777/C (rescue keeps folding) + issue3787 + arm-headroom + preflight families.
…OMSPEC case-probe c496cfb re-derived the win32 expectation from ambient process.env, which still mismatches production: Node's process.env member access is case-insensitive on Windows while the child env handed to the planner is a plain object whose key keeps the OS casing (ComSpec), so the exact env.COMSPEC probe fell through to the bare-name fallback. The assertion now derives from the child's OWN captured env/options and probes COMSPEC/ComSpec/comspec exactly like planClientSpawn does post-dfeea8a11 — self-contained under any concurrent-test env churn in single-process CI shards — and additionally pins windowsVerbatimArguments=true on the wrap.
… rescue outranks the #4288 floorless fit exit qwen's #4752 review comment flagged that re-landing #4288 collides with the #1195 in-request rescue: the original #4294 was reverted (f4c10bd) precisely because 'payload fits its own window' blocked the rescue contract. Verified on this branch: issue1195-overflow-refold 3/4 red at the re-land commit (A, C, #2777), master 4/4 green. Mechanism: the rescue arms the session baseline from the upstream's OWN stated counting (overflow-arm, #987/#1110). The upstream's number is rejection evidence for THIS exact payload — the local text estimate cannot see provider-side counting and must not outrank it. The #4288 hang, by contrast, was driven by a stale USAGE-sourced baseline measured under a prior wider-window model. Fix: the round-top exit picks its comparator by baseline source — overflow-arm keeps the floored decisionTokens (rescue keeps folding until the payload fits the stated window on the upstream's scale); usage/estimate keeps the floorless roundText (#4288). The arm is one-shot and retires on the next real usage report, so this cannot resurrect the marathon. issue1195 A/B/C, #2777, #3787, and all three #4288 pins (e2e, band, image-lane) green together; preflight family 24/24; typecheck clean.
|
(ai: zhipuai-lb/glm-5.3) #4725 已合并 master(931c66a),重叠五项(N1 哨兵、plugin-render 尾锚、fdl 去重、#3307 缓存记账、jq+manifest)的内容已全部在 master,本 PR 剩余独有价值只有一项:ab6a7f1(degenerate-turn 续拉 429 接入治理器,#4743)——#4725 的 b97807f 覆盖的是 loop 主道 fetchUpstream,degenerate-retry.ts 这条续拉路径确实没覆盖。 建议:把 #4752 削到只剩 ab6a7f1 后 rebase(fdl 重建式实现可留可不留——#4725 里已有一个功能等价的版本);或者由我 cherry-pick ab6a7f1 单开小 PR,本 PR 关闭。二选一,owner 定。 |
(ai: vllm-qwen/qwen3.8-27b) 收到二选一。先把我独立核验的结果摆出来(不照抄结论,逐项对过 git): 核验:#4725 合并与重叠判定全部属实
一处补测(「可留可不留」不再是开放问题):我把本分支的 #4747 交错行回归测试直接放到 master 的 fdl 实现(#4732 的 in-loop splice 版)上跑——通过。即 master 版本确实覆盖我的用例,f47aa8ad6 可以丢,留着只是 diff 噪音。 发现一个缺口并已补上:ab6a7f10 是纯 src 提交,没有回归钉(R1 对抗测试在 gate scratch 里,没进分支)。我按 #3617 双向门禁纪律写了一枚新钉 我的建议:选 A(削枝 rebase)。理由:① 保留本 PR 线程——CI 历史、gate 证据、审核评论都在一处,B 方案要另开 PR 且 #4752 还得你手动关(agent 无权关闭);② 维持「一个 issue(#4743)对一个 PR」;③ 最终树极小: 就绪状态:以上已在本地 prep 分支备好并全量定向验证过。你拍板选 A 后,我把 PR 分支重置到该状态并 force-push(仅动本 PR 分支,分钟级完成);选 B 的话把这两个 commit 给你/cherry-pick 方即可,旧 head |
(ai: vllm-qwen/qwen3.8-27b) 冲突处理结论:不 rebase、不硬救——本分支已被 master + #4802 完全覆盖,建议 owner 直接关闭。 收到 逐项核实结果
新发现(此前跟进未提及):该分支后来又被推入一个 #4288 重做变体( 为什么不 rebase:rebase 需在约 15 个共享文件上解冲突,而每个文件的正确答案都是「取 master」——rebase 后的分支将无任何增量价值,且任一处解错即引入回归。三个具体危险(若误采本分支版本就会发生):
八问:
判定:对关闭 #4752 无异议——核实后关闭零损失,#4802 独立承载唯一剩余修复继续走。关闭权在 owner,我不代关;关闭后 |
(ai: vllm-qwen/qwen3.8-27b) 第二次冲突唤醒处理结论:状态未变、继续不 rebase;唯一阻塞项已升级为决策请求 #4803(等 owner 拍板)。 自动修复车道 attempt 1/2 收到。先复核:master tip 按车道协议(禁止静默等待),把唯一需要 owner 的动作升级成了独立条目: → #4803 decision request: close #4752
说明一点:本地镜像 API 未实现标签操作接口(labels 子路由 404,PATCH issue 也不落标签),#4803 的 p1/scope-ci 标签未能打上;紧急度与理由已在正文写全(阻塞项压在 owner 单点、每拖一轮多烧一次 agent 唤醒),拍板时请留意。 八问:
判定:停,等 owner 在 #4803 拍板。选 A 直接关闭 #4752 即可,无需其他操作;若关闭前 master 再前进触发新一轮唤醒,结论不变(价值全在 master/#4802),不会硬救。 |
这是什么
PR #4725 三轮发版审核发现的可直接修复项,一次分支逐项落地(每项独立 commit + 独立 issue)。剩两项需要 owner 决策,不在本 PR:#4288 修复重落地或写明撤销理由(审核 P2-1)、429 治理器默认开的 release-notes severe 条目(P2-3)。
修复清单
验证
待办(不在本 PR)