Repository navigation
[PR] kernel: let content-free BLOCKED partners close their turn (#6709) - #6754
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10078-pr.6754.581e685This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6754.tgz
npm install -g packageInstall instructions are refreshed on each push. |
0110a84 to
acbaf91
Compare
(ai: vllm-qwen/qwen3.8-27b) Reviewed the diff against What the change does
const doomedStranded = visibleStranded.filter(
(id) => isNeverFoldable5919(id) && !isContentFreeBlocked5919(id),
);The predicate returns true only when ALL hold: Why this is the right split
The safety net is intact: rung 2 ( Tests — both directions pinned (gate-test discipline):
Local verification (targeted only, per local-testing discipline):
One minor test-coverage note (non-blocking): in every new test the stranded partner is a tool-RESULT ( Verdict: Correct, well-reasoned, well-tested. This is the right superset of #6719/#6731 — it folds exactly the BLOCKED refs that are actually foldable and keeps the live-protected/media no-op. Kernel change → human-only review tier, so I'm not merging; flagging for your sign-off. #6719 and #6731 can be closed once this lands (I won't close them — that's your call). 结构化八问
判定:可合(kernel 属 human-only review,我不合,等你拍板)。#6719/#6731 待本 PR 落地后由你关闭。 |
The #5919 merge no-op treats every ref='BLOCKED' partner as "cannot be closed now", but that conflates two very different cases. A content-free BLOCKED partner (body removed by native compression) carries no live wire content and can never age into foldability, so letting it doom the merge turns the no-op into a permanent deadlock: every merge covering its turn re-hits the same skip and the session stays stuck at its context ceiling (#6709, session-ad47cd30, 6,115 BLOCKED). A LIVE protected tool / unrecoverable media is pinned to ref 'BLOCKED' by assignRefs too, with its full body still in the wire — folding it in drops protected content and leaving it split emits an orphaned tool_call/tool_result. Exempt only content-free BLOCKED partners (ref BLOCKED AND not live-protected-tool AND not host-protected AND not unrecoverable-media) from the merge-deadlock; they flow to the #5919 rung-2 fallback and are folded into the merged block, closing the turn. Live protected tools / media still doom the merge into the honest no-op. This is the correct superset of the two related PRs (#6719: flow-all- BLOCKED-to-rung2; #6731: key-on-ref-BLOCKED, keep-split) — both keyed on ref==='BLOCKED' alone, and both masked the live-protected case by giving the protected partner a numeric ref in their regression tests. 5919-5 adds that guard (live protected tool stored as ref BLOCKED still no-ops). Refs: #6709, #6719, #6731
…RL.pathname) new URL(import.meta.url).pathname yields "/D:/..." on Windows (leading slash), which path.resolve mangles into "D:\D:\a\..." and makes the package.json read throw ENOENT — a deterministic red on the windows hermetic-registry e2e leg for every PR. fileURLToPath (node:url) is the cross-platform idiom the repo already uses (src/index.ts:12, src/update.ts, ...). Landed here because it was blocking PR #6709's windows leg; path.dirname is preserved so REPO_ROOT still resolves to the repo root on both platforms. Refs: #6709
acbaf91 to
10b12e5
Compare
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1201-master.6468299 # this exact build
npm install -g billion-context@master # always the newest merged build
|
kernel-change: #6709 — the #5919 merge no-op conflates content-free BLOCKED partners with LIVE protected tools, so a turn that has a content-free partner dead-locks every merge covering it (session pins at ~67% of context).
What
A content-free BLOCKED partner (body removed by native compression) can never fold. Under the current #5919 classification it therefore dooms every merge covering its turn forever → the session stays stuck at its context ceiling (#6709, session-ad47cd30, 6,115 BLOCKED = 13.7%).
But
ref==='BLOCKED'ALSO covers LIVE protected tools / unrecoverable media —assignRefspins those toref 'BLOCKED'too, with their full bodies still in the wire. Those MUST still no-op the merge: folding them in drops protected content, and leaving them split emits an orphanedtool_call/tool_resultthe provider rejects.The two related PRs both keyed on
ref==='BLOCKED'alone, and both masked the live-protected case (their regression tests gave the protected partner a numeric ref):This PR is the correct superset: exempt ONLY content-free BLOCKED partners (
ref BLOCKEDAND not live-protected-tool AND not host-protected AND not unrecoverable-media). They flow to the #5919 rung-2 fallback and close the turn; live protected tools/media still no-op.Changes
kernel/src/unit-projection.ts— addisContentFreeBlocked5919; filter it out ofdoomedStranded.kernel/tests/issue5919-shredded-merge.test.ts— 5919-2 updated (content-free BLOCKED now merges); new 5919-5 (live protected tool stored asref BLOCKEDstill no-ops — the guard both prior PRs missed).kernel/package.json— 0.0.197 → 0.0.198.Pre-flight (local, rebased on 58741e4)
tsc --noEmit: cleanci:full).Closes #6709
Related: #6719, #6731 — both superseded by this one (please close once this lands).