Repository navigation
[PR] batch: 20 verified fixes from Afloat16's open PRs (verbatim cherry-picks, authorship preserved) - #7074
Conversation
Match the issue3400 suite's BILI_CONFIG_FILE isolation so the admission/eviction tests run on the default (enabled) rescale posture regardless of any host config file. (cherry picked from commit 01ff01a)
(cherry picked from commit 1689c96)
…sation The fix adds a trailing sweep(now) that enforces the 64-lane limit and refreshes stats after the insertion. The leading sweep(now) ran the same TTL + lane-limit + stats work with the same `now` moments earlier, so it is redundant. Removing it keeps one sweep per learn (the hot path taken on every attributed dispatch) with no behavior change: the per-lane LRU plus the trailing sweep reach the identical final state (verified: 18/18 targeted recall/fingerprint/dsh tests pass with and without it). (cherry picked from commit 3c9d19b)
(cherry picked from commit 244d526)
The repeated-pointer assertions use the unified session sidecar. Pin the fixture to full storage mode, matching the neighboring canonical-pointer suite, so the legacy CI default does not prevent the tests from reaching their assertions. (cherry picked from commit 5704fc5)
(cherry picked from commit 30f92ff)
(cherry picked from commit cb4b5af)
(cherry picked from commit 009ea16)
(cherry picked from commit ea4f9c7)
(cherry picked from commit 6b08f61)
(cherry picked from commit b22e9c1)
(cherry picked from commit 6e10757)
(cherry picked from commit bd03db0)
(cherry picked from commit 2140072)
(cherry picked from commit de7616b)
(cherry picked from commit 7b55d5f)
(cherry picked from commit a48e71a)
(cherry picked from commit 9f33b3a)
(cherry picked from commit ea20b38)
(cherry picked from commit 8e6a192)
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10657-pr.7074.2dc590dThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7074.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重 (dedup): Not a duplicate. This is a new consolidated batch PR — 20 verbatim cherry-picks from Afloat16's 20 open PRs (#6843, #6848, #6853, #6854, #6997, #6999, #7002, #7006, #7015, #7018, #7020, #7024, #7028, #7030, #7032, #7034, #7036, #7040, #7042, #7044). No other open PR targets this same consolidation; the 20 source PRs are the individual versions this batch supersedes (all 20 confirmed still open). The 5 held PRs (#6845/#7004/#7022/#7026/#7038) are correctly excluded per the body. 标签: Applied Review verdict — the batch is sound and mergeable. What I verified independently (not from the PR description):
Disclosed behavior changes (all stated in the PR body — flagged here per policy): #7028 root-array requests now get the upstream's 4xx instead of a local 4xx (the fix — bili no longer mangles them); #7044 an undocumented mutate-in-place+return-undefined egress-plugin side effect no longer applies (now matches the documented contract); #7024 the threads-lane summarizer input gains a "# Previously folded history" section (model-facing text, rollout-gated path); #6848 the image encode cache is now byte-bounded at 64 MiB (evicted images re-encode byte-identically); #6997 recall eviction is now by latest activity with the lane bound enforced on learn. One non-blocking note: the ework-agent commit No kernel/ changes, no config-schema changes, no version bump — matches the body's claims. 结构化八问
合并判定:可合。 代码、测试、CI(核心矩阵)、verbatim 完整性、Closes 列表全部独立核验通过;5 处行为变更均已披露且属修复本意。两点留给你(均为 human-only):① 是否先加 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1225-master.adfa675 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What this is
A batch PR bundling 20 independently verified fixes from Afloat16's open PRs, each cherry-picked verbatim (original commits and authorship preserved — Afloat16 / ci-check). Each item is a small, self-contained bug or performance fix; none changes wire formats, storage formats, config schema, or protocol semantics.
Every item was reviewed against master (
77fe0b1): the reported defect reproduces on master, the fix is semantically sound, and the regression tests fail on master and pass here. All 177 tests in the 21 touched test files pass locally; fullnpm run typecheck/npm run buildpass. Full-suite and real-model gate run in CI.Five related PRs are deliberately not included — they touch trust sets, signal lifecycles, credential semantics, or wire-visible behavior and are held for separate discussion (list at the bottom).
The 20 fixes
Performance (hot paths made linear)
perf: scan cache body boundaries in linear timeBuffer.indexOfcalls — 1.3 s of blocked event loop on a 1.7 MB transcript. Now one linear pass. 44 ms → 4.5 ms / 1.3 s → 13.7 ms measured.perf: frame loop SSE chunks in linear timesrc/sse-util.ts; old helpers kept for all other consumers. Exhaustive split-point equivalence tests included.perf: consume repeated canonical pointers in linear timeshift()on large duplicate-content buckets (array moved on every call).reverse()+pop()— element-identical output, 303 ms → 98 ms at 50k repeated rows.fix: preserve long histories when replacing the compression viewpush(...replacement)) and silently emptied the conversation history for the next request. Replaced with an in-place item-by-item helper at all three sites.Correctness (wrong bytes / wrong refs / wrong data served)
fix: recover each Responses image from its own refdecompress({imageRef})returned sibling files and 20 images produced 400 spill files. Recovery now reads only the part's own sidecar.fix: verify image spill bytes before advertising restore refsfix: bound retained image encode cache payloadsfix: retain prior summaries across Threads reforgesfix: keep catalog invalidation effective across overlapping requestsfix: search ancestor originals in derived sessionssearch_contextfallback pre-screened ancestors by summary text only, so keywords surviving only in folded originals were unfindable from the child even though an explicit parent search found them. Ancestors now get the full original-aware search.fix: retain active lanes during conversation recall evictionServer / process lifecycle
fix: close pending WebSocket upgrades during server shutdownsessionsnorwss.clients: shutdown hung on it, and a late "ok" could create a session after teardown. Pending upgrades are tracked and destroyed on close.fix: relay root JSON arrays without conversation preparationfix: preserve image exports while session twins survivefix: expire writer conflict verdicts with session retentionserved-markers.tsnever pruned (marker map is capped at 128, verdict map wasn't) — unbounded daemon memory growth; evicted sessions also inherited stale verdicts for 60 s. Verdicts now expire on the existing prune pass.fix: release completed reasoning-round response bodiespipeThroughRawpattern) when a round ends before EOF.Upstream protection / egress
fix: retain the longest active upstream throttle deadlineMath.max.fix: scope restored-image shedding exemptions to their tool resultread_original_imageresult, the whole message was exempt from image shedding — the normal tool results' images in it could never be archived, so byte/over-count budgets were unreachable. Exemption now applies per tool_result part (anti-loop property preserved).fix: isolate egress module cache generations across reloadsfix: isolate binary body drafts from failed egress pluginsBuffer.from()draft — only a successfully returned body commits. Note: plugins relying on the undocumented "mutate in place, return undefined" side effect silently no longer apply — behavior now matches the documented plugin contract (docs/configuration.md).Verification
77fe0b1).npm run typecheck,npm run build, all 21 touched test files — 177/177 pass. Partial local full-suite run: ~1900 tests pass; the only failures are 70 daemon-attach readiness timeouts (~15 s watchdog) intests/dsh-native.test.ts/tests/advisory.test.ts— reproduced identically on clean master on the same machine (shared-machine noise, none of the 20 fixes touch those paths).Authorship & the individual PRs
All commits are cherry-picked verbatim from Afloat16's PR branches — original authors (
Afloat16,ci-check) and messages preserved, with-xorigin trailers. This PR adds no re-authored changes.After this merges, each of the 20 bundled PRs will contain nothing new (its commits are already on master) and can be merged or closed directly as-is:
#6843 #6848 #6853 #6854 #6997 #6999 #7002 #7006 #7015 #7018 #7020 #7024 #7028 #7030 #7032 #7034 #7036 #7040 #7042 #7044
Held for separate discussion (not included)
anyPending()bypass in plugin mode; signature split across stream chunks).network.caFileis set changes from bundled roots to Node's effective default trust — direction is correct (matches the unconfigured path) but the trust-set change warrants explicit sign-off.localMachineIps, which changes howselfAddressedLocalPathtreats non-127.0.0.1loopback aliases (403 where self-served before). Needs a documented decision or a one-lineclassifyIpguard.server.closefires; during the standalone final flush window a second Ctrl+C would skip flush (one-lineshuttingDownguard suggested).Closes
Fixes #6839
Fixes #6846
Fixes #6849
Fixes #6851
Fixes #6995
Fixes #6998
Fixes #7001
Fixes #7005
Fixes #7014
Fixes #7017
Fixes #7019
Fixes #7023
Fixes #7027
Fixes #7029
Fixes #7031
Fixes #7033
Fixes #7035
Fixes #7039
Fixes #7041
Fixes #7043