Repository navigation
[PR] fix: judge no-visible-context permanence against active peers (#5111) - #5118
ranxianglei wants to merge 12 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9578-pr.5118.38dec8dThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5118.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本条是 #5111「判定诚实化」子部分的实现 PR(Part of #5111);同家族谱系 #3126(空视图拒绝门)/ #3918(原非瞬态判定)/ #3982(存储尾部兜底)机制各不相同,无重复立项。 标签:pr(已有)+ bug、scope/wiring、p1 —— 机制位于 compress 工具请求路径(驻留池判定 + 拒绝回执),与 #5111 家族分类一致;宿主客户端未知,不打客户端标签。 核对结论(对 master 源码独立复审,未复用 issue 侧结论)
八问
CI 状态(head 14a5043)静态守卫全绿(kernel-guard / config-surface-guard / lane-guard / version-guard / docs-sync …);测试套件运行中:最新快照 0 失败、12 项进行中(测试分片)、14 项按设计跳过(e2e 门禁)。全套件以 CI 为准。 收工判定:代码核对与回归审查通过,base 与 master 同步、无需动作;等剩余测试分片转绿即可由 owner 合并(我不合并)。CI 全绿后我会补一条确认。另:优雅恢复方向(A 宽限钉住 / B 瘦驻留)仍在 #5111 等你拍板,本 PR 可先独立合入。 |
(ai: vllm-qwen/qwen3.8-27b) CI 已跑完,全绿。 上一条回复承诺的确认:
收工判定:CI 全绿 + 代码核对与回归审查通过,PR #5118 可以合并了(合并动作归你)。#5111 那边的优雅恢复方向(A 宽限钉住 / B 瘦驻留)仍在等你拍板,与本 PR 独立。 |
(ai: vllm-qwen/qwen3.8-27b) 结论先行:run 41068286472 的 4 个失败 shard 全部是继承性 master 红,与本 PR 的 diff 零交集(4 份 job 日志对本 PR 领域 结构化八问:
收工判定:本 PR 侧能做的已全部完成(ci-fixes 已合、已推 c72f836),等 CI 在新 head 重跑。若重跑后仅剩 issue4788 / #5103 / issue4739 这些 master 级家族红,那是哨兵收敛进 ci-fixes 的事,本 PR 可随其转绿,无需再动。状态已留一行至 #4599。 |
…sible-context refusal (#5111)
…nt-pressure-idle-peers # Conflicts: # src/codex-models.ts # src/pack-install.ts
c72f836 to
af17c91
Compare
…ard (#5111) Gate repair accompanying the ci-fixes merge: commit 2 switched the sole caller to storedTailViewStatus, leaving the thin wrapper unused. Deleted per the guard's DEAD prescription; the docblock now matches the surviving function's {view, reason} shape.
… the ci-fixes merge (#5319) Gate repair accompanying the ci-fixes merge: the sentinel's seed fix (#4599, 701688d) re-added the 'chat' builtin pack to compress.yaml while master's md had been regenerated without it (a4bbf47) — a semantic conflict the text merge could not see, red on docs-sync. Regenerating restores #5319's lost doc line in en+zh and makes seed/md/html agree.
Conflict resolution for #5118 (merge state dirty): - src/session.ts residentPressure(): union of #5111 active-peer permanence judgment (PEER_ACTIVE_WINDOW_MS, activeOtherBytes) and master's #5782 cold-load grace exemption (!graced && ...); doc comments merged likewise. - CONFIGURATION.md / CONFIGURATION.zh-CN.md: take master's redirect stubs (docs moved to docs/ per #5920); port this PR's compress.promptPack chat-pack line into docs/configuration.md + .zh-CN.md by restoring the seed entry and regenerating with tools/gen-config-docs.mjs (zero drift). - website/config-reference/compress.yaml + website/docs/index.html: restore the PR-side promptPack chat entries that hunk alignment silently dropped. Verified locally: typecheck clean; tests/issue{3126,3859,3918,4788,5111,5782} all pass (28/28); gen-config-docs coverage OK; config-surface-guard OK. Full-suite verdict deferred to CI on the pushed head.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — 这是同一 PR 冲突自动修复车道的重触发,非新工作项;本轮完成了上轮未推的合并提交。 What was done this runPR #5118's head branch ( Conflicts resolved (3 files):
Local verification (targeted only; full-suite verdict belongs to CI on the pushed head): typecheck clean; six targeted suites green — Live status after push (verified this run via the mirror check cache, not from memory): No design decision was needed, no authorization gate was hit, the PR body was not touched, and no new issues were opened. 结构化结论(八问,覆盖七问)
判定:冲突已清除(live 验证 mergeable_state 由 dirty 转为 behind),CI 正在新 head 09e1a14 上运行(截至最近读取 0 failed / 12 pending);待 CI 收尾后即可由 owner 合并。 |
[ework] auto-fix stalled: test (windows-latest, 22, 4), test (ubuntu-latest, 24, 1), test (ubuntu-latest, 22, 1) — stopping for human review |
1 similar comment
[ework] auto-fix stalled: test (windows-latest, 22, 4), test (ubuntu-latest, 24, 1), test (ubuntu-latest, 22, 1) — stopping for human review |
… is deterministic (#5118) The "exact reason code" test asserts the persisted-view fallback receipt names (no-persisted-rows) — a code that only exists when the unified sidecar is OPEN (a closed sidecar yields unified-store-off). The ambient storage mode is environment-dependent: a developer's config may set storage.unified, but CI's hermetic preload (tests/preload-test-env.mjs) points XDG_CONFIG_HOME at a fresh temp dir with none, so the sidecar is closed there and the receipt reads (unified-store-off) — red on the ubuntu-22/24 shard-1 and windows-22 shard-4 test jobs. Pin BILI_STORAGE_UNIFIED=shadow at the top of the file (same ambient-env note as tests/issue4241-judge-render-baseline.test.ts) so the sidecar is guaranteed open and the receipt is deterministic in every environment.
(ai: vllm-qwen/qwen3.8-27b) CI-engineer run — PR #5118 (attempt 1/3) Conflict (verified live this run): no longer in conflict. Red CI (the real blocker): 3 test shards were red, all failing the same single test:
All on Root cause: the test is environment-dependent. It asserts the receipt names the persisted-view fallback failure as Fix: pin Waiting on the CI re-run to confirm the 3 shards turn green. 八问(中文):
判定:冲突已不存在(前一轮已解),3 个红分片已修复并推送( |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
(ai: vllm-qwen/qwen3.8-27b) CI-engineer run — PR #5118 (second trigger) Live state verified this run:
What I did: merged Verified before pushing:
Pushed as 八问(中文):
判定:基线已同步(merge 干净、无 force-push),PR 不再落后,CI 已绿(上一轮修复),推送 |
The #5111 change added a second module-level map (evictedWeightAt) beside evictedWeights, but the test reset only cleared the original. Clearing both keeps the reset complete so a future test that stamps a new session id cannot read a stale weight age left over from a prior test.
(ai: vllm-qwen/qwen3.8-27b) Review — APPROVEIndependence: I reviewed the diff against live master source independently — I did not reuse the issue-side or prior-thread conclusions. I read the full 9-file diff (merge-base Correctness (does it do what it claims):
Tests (would they catch a regression): the new suite (tests/issue5111-resident-pressure-idle-peers.test.ts) pins BOTH directions of the gate per #3617 — idle peer → transient self-heal wording (asserts Risks / behavior drift (disclosed): the one intentional change is the "self fits + peers idle" receipt: old "NOT TRANSIENT … close sessions / raise limit / restart" → new transient self-heal wording. That IS the fix (the old claim was factually wrong — admission evicts idle peers). No wire change, no config-surface change, no kernel/ change, no persistence-format change. 已顺手修: Scope note (non-blocking): the PR also carries a small, correct docs-sync (the Base state: the head is behind current master only by Japanese-docs work (#6072/#6076) — zero overlap with the PR's files, so it merges cleanly; the merge-guard lane owns the behind-state. CI is green on 八问
判定:APPROVE。 代码核对、回归审查、定向测试(19/19)与 typecheck 均通过;一处小缺陷已顺手修(ac3a9e6)。可合入(合并按例由你执行)。#5111 的优雅恢复方向(A 宽限钉住 / B 瘦驻留)仍待你拍板,与本 PR 独立。 |
[bot] 🏷 Review complete — APPROVE (full review + 8问 posted above).
|
# Conflicts: # website/config-reference/compress.yaml
(ai: vllm-qwen/qwen3.8-27b) Base sync + merge-conflict resolution — done and pushed. This run I synced the PR branch with the current master and resolved the one merge conflict. Summary of what happened:
Note: the 3 red shards from earlier (the 结构化八问
判定:冲突已解决、基线已同步、本地验证通过、已推送;CI 在新 head 上重跑中。 |
…ine (#5118) The ja config doc (added to the generated set by the Japanese-docs work) was missing the compress.promptPack line update from this PR's seed change, so docs-sync's regenerate-and-diff failed on the merged head. Regenerated with tools/gen-config-docs.mjs — only the promptPack line changes.
[bot] (ai: vllm-qwen/qwen3.8-27b) CI 工程师本轮(重启后继续)—— 红项已修并推送 前两轮(被强制重启前)已把 master 合进 PR 分支并推送 红项根因(PR 自身问题,非继承红): master 的日文文档工作(#6072/#6076)把 本轮动作:
本地验证(定向,全套件以 CI 为准):
八问
判定:红项已修、基线已同步到当前 master tip,新 head |
Part of #5111 — the verdict-honesty portion plus the live-repro diagnostics follow-up. The graceful-recovery direction for sustained over-budget pools (grace pinning vs thinned resident view) is still pending owner decision in #5111; this PR ships the parts with no decision dependency.
What was wrong
The
no-visible-contextrefusal's "NOT TRANSIENT" verdict (#3918) counted ALL other resident sessions' weights against the pool budget. But admission (makeResidentRoom) seats any session whose own weight fits the budget by evicting the OLDEST idle residents first. So when the budget is occupied by leftover IDLE sessions, the next model request heals the view automatically — and the receipt was steering users toward closing sessions / raisingsessions.residentMaxBytes/ restarting unnecessarily. That false "not transient" framing is exactly what the #5111 reporter followed.Fix (commit 1)
residentPressure(src/session.ts): permanence is now judged against ACTIVE peers only (traffic within 5 min, internal constantPEER_ACTIVE_WINDOW_MS) plus the self-exceeds-whole-budget case:permanent = weight > budget || weight + activeOtherBytes > budgetactiveOtherBytes;otherBytes(total others) kept for diagnosticsFix (commit 2, live-repro follow-up)
A live repro (DSH on Windows, bili 0.1.209) showed the refusal asserting over-budget eviction as THE cause while the persisted-view fallback (#3982) silently failed for its own unexplained reason, and the quoted footprint carried no timestamp although the pool drains between requests (the reporter's
/__bili/memoryminutes later read ~6.7 MiB against the quoted ~735 MiB). Additive-only changes:storedTailViewStatus(src/persist.ts): the compress-from-store: evicted sessions compress against the unified-store view instead of refusing forever (#3918 P4 root fix) #3982 tail read with stable failure reason codes —store-inactive/unified-store-off/sidecar-degraded/read-error/no-persisted-rows/unparsable-row;peekStoredTailViewdelegates to it, signature unchanged.<reason>)."/__bili/memoryreading is not misread as contradicting the refusal.Behavior change disclosure (old → new)
ctx has 0 message(s)时所有 ref 被判悬空(cannot-anchor),报错归因误导 #3126/[dsh] A healthy 93%-compressed image session becomes permanently uncompressed by ordinary usage: quota → model switch → attribution loss → 413 → rewind → 3,455 dead refs → compress REFUSED forever (0.1.202) | 一个健康压缩率 93% 的图片会话被普通操作永久废掉:额度→换模型→丢归因→413→撤回→… #3918 assertions).Branch state (2026-10-31)
Rebased onto master f9cec9f and re-merged origin/ci-fixes per the #4599 coordination protocol (the sentinel had earlier merged ci-fixes into the stale base). Merge conflicts in src/codex-models.ts / src/pack-install.ts resolved by taking master's versions, which carry the same gate fixes in improved form (surrogate-safe text-safe slice, #5340 windows npm shim).
Verification