Repository navigation
[PR] batch-5: 21 low-risk community fixes (verbatim merges, authorship preserved) - #7392
Conversation
Recognize direct connect syscalls and homogeneous connect AggregateErrors as connect-timeout, restoring existing bounded retries and alerts. Keep read, write, unknown, mixed and externally aborted failures conservative. Fixes #7120
Keep retained original images in the remaining-image budget while preserving their byte-pressure exemptions. Archive eligible images until the shared target is met and reuse the learned cap on subsequent proxy and plugin relay turns. Fixes #7140
Restore ordinary same-dimension encodes above the existing byte threshold. Keep the forced path and keep-smaller policy unchanged, and verify real codec output, original-byte preservation and proxy/plugin HTTP requests. Fixes #7146
Reuse the stripped, lowercased plan string across token matches instead of normalizing it for every token. Preserve extraction and search results while avoiding repeated full-text scans on CJK and mixed-language plans. Add a reproducible benchmark using actual compressed blocks and the plan-aware search entry point. Fixes #7160
Apply the existing 64 KiB response-header budget whether or not the terminating delimiter is already buffered. Exclude tunneled payload bytes, and cover exact limits, split delimiters and the blind tunnel. Fixes #7165
Release non-429 response bodies when the continuation is discarded. Keep cancellation asynchronous so an unfinished tee sibling cannot delay the existing null fallback; preserve successful streams and 429 readers.
Keep literal prototype-named JSON data in neutral and legacy fingerprints. Cover four wire formats, old lossy snapshots, and real HTTP session routing.
Reuse the shared line-ending and data-field parser after HTTP fallback. Preserve terminal boundaries, buffer limits, and successful warmup checkpoints.
Carry explicit function-response errors into the existing structural classifier. Keep clean-result effort routing and the requested error-recovery budget distinct.
Bound raw document and image reads before buffering an oversized response, cancel rejected bodies, and measure contents-API base64 payloads after removing whitespace and accounting for padding. Preserve fallback and last-good-overlay semantics at the existing byte limits.
Apply the review's cleanup extraction without changing the five fetch paths or the order of body cancellation and idle-watchdog shutdown. The 38 blog-refresh tests and TypeScript typecheck pass.
The #7146 fix made the 100 KiB trigger gate apply equally to force and non-force paths. The comment still claimed force 'skips the 100 KiB trigger gate' — now inaccurate. Updated to reflect the post-fix behavior.
[bot] 🏷 Review: PR #7392 — batch-5: 21 low-risk community fixesVerdict: APPROVE (pending CI green). All 21 fixes verified correct against supporting code. All 23 touched test files pass on a clean environment (398 pass / 0 fail). One minor finding (stale comment) fixed and pushed to the PR branch. Per-fix verification (all 21 CORRECT): Batch 1 (upstream/affinity/image/registry/steering):
Batch 2 (responses-ws/web):
Minor finding (FIXED, commit Test verification: All 23 touched test files: 398 pass / 0 fail (clean environment). The PR author's "396 pass / 1 fail" is consistent — the 1 fail was a stale persisted snapshot ( CI status: 30 checks, 0 failed, 12 pending (test lanes queued, as of last check). The comment fix (commit 8 问审核结论
合并判定: 可合并(待 CI 全绿)。21 个修复全部验证正确,测试全绿,1 个次要发现(过期注释)已修复并推送至 PR 分支。 |
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11087-pr.7392.229ef2f-a4This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7392.tgz
npm install -g packageInstall instructions are refreshed on each push. |
🔶 需要决策 Live state re-verified this run (mirror cache, fetched 13:40Z): This is a CI-credential problem, not a code problem. The Systemic, already on record: every same-repo PR's Options (needs owner action):
Default if undecided: C — no code-side action; the PR remains blocked solely on 八问
结论:PR 代码侧全绿(全部测试 + 静态门禁);唯一红条 build-artifact 卡在 NPM_TOKEN secret,等 owner 决策(推荐 A:轮换带 2FA bypass 的 token)。token 修好后重跑 build-artifact 即绿,无需任何代码改动。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1240-master.f7621b1 # this exact build
npm install -g billion-context@master # always the newest merged build
|
batch-5: 21 low-risk community fixes (verbatim
--no-ffmerges, authorship preserved)One batch PR carrying 21 independently-reviewed, self-contained fixes by Afloat (issues #7120–#7383 era). Each was reviewed commit-by-commit against current master and got a SAFE verdict. Every one is a scoped bugfix with a regression test — no design-level change, no hot-path/core file touched.
This is batch-5 of the layered split: the small, isolated fixes come here in one reviewable unit; the 15 load-bearing ones (fetch-util / preflight / loop-adapter-*/billing/storage/session-gc/persistence/keepalive, plus one conflicting) are kept as separate PRs so they get their own focused review. See the bottom for that list.
How the merges preserve authorship (and auto-close the source PRs)
Each PR is brought in with
git merge --no-ff <its head>— the original commit SHAs, author (Afloat), dates, messages, and content are preserved verbatim in this branch's history (not squashed, not cherry-picked). Because each source PR's head commit becomes an ancestor of master once this lands, GitHub flips all 21 source PRs to "merged" automatically — no manual closing, no duplicate landings.What's in it (21)
ETIMEDOUTAggregateErrorwhose children still carrysyscall: "connect"; the classifier read it as a generic upstream-timeout, so a request that never connected skipped the bounded connect-retry + alert path. Connect-phase ETIMEDOUT is now classified correctly.force=false— so the byte-size trigger never reached a normal re-encode. Byte-triggered re-encoding restored.planTokenize()lowercased its entire input on every token match (incl. the final failing match); a Chinese plan emits a token per character, so an unchanged source was rescanned/renormalized repeatedly. Plan text is now normalized once per source.connectThroughProxyonly enforced its 64 KiB response-header limit while the terminating\r\n\r\nwas absent — a complete 80 KiB200head opened a tunnel while the same oversized head without its delimiter was rejected. Header bound now applies to completed responses too.{}+ dynamic keys, so an own key named__proto__invoked the inherited setter and vanished from the fingerprint. Histories differing only in that retained key were wrongly replayed/merged. Own keys preserved.generate:falsewarmup read the HTTP/SSE fallback with a parser that only knew LF/LF +data:— valid CRLF, lone CR, ordata:framing became "incomplete". Complete SSE events now parsed.thinkingBudget: 8000 → 128even after a permission/partial-tool failure. Thinking budgets now survive tool errors.key/$keyquery param, but the 429 governor fingerprinted only credential headers — independent query-auth accounts on the same host shared one anonymous hold, so account A's 429 blocked account B. Holds now isolated per query-key.{"ok":false}with 200 reset its failure counter, so recovery never ran and MCP tools stayed pinned. Health payloads now validated.savedAt/mtime, but the summary merge ignored it and let the last file visited overwrite earlier summaries — a stale twin could win. Freshest disk summaries now selected.ERR_SOCKET_BAD_PORT. Listen retries now stay in the valid range.getChangelog()returned. Error response bodies now released.著作权 (authorship)
All 21 source PRs are by Afloat (
ShuffleMonkey@163.com); their original commits are preserved verbatim viagit merge --no-ff(author, date, message, content intact). 46 files changed, +2781 / −150, 21 merge commits. No conflicts at assembly time (the two intra-batch file overlaps —src/web/sessions-data.tsfrom #7290+#7292 andsrc/web/blog-refresh.tsfrom #7341+#7375 — merged cleanly).Verification
tsc --noEmit+npm run build: clean (build commitdd59c3dd8; dist import/external/thin checks OK).tests/affinity-json-own-keys.test.ts, added by [PR] fix: retain own JSON keys in anonymous affinity fingerprints #7174) reproduces identically on [PR] fix: retain own JSON keys in anonymous affinity fingerprints #7174's own head in this local Node 25 environment — CI targets Node 22/24 (@types/node ^22), and the other 20 PRs do not touchprefix-affinity.ts/affinity-neutral.ts, so this is a Node-version artifact of [PR] fix: retain own JSON keys in anonymous affinity fingerprints #7174's own test, not a cross-PR regression.ci:full) + the real-model release gate.After this merges
The 21 source PRs — #7138 #7141 #7147 #7162 #7166 #7171 #7174 #7182 #7185 #7187 #7220 #7285 #7290 #7292 #7294 #7341 #7359 #7362 #7370 #7375 #7384 — land with content identical to theirs and will auto-flip to "merged" (their head commits are ancestors of master). Nothing needs manual closing.
Fixes #7120, fixes #7140, fixes #7146, fixes #7160, fixes #7165, fixes #7170,
fixes #7172, fixes #7180, fixes #7183, fixes #7186, fixes #7218, fixes #7284,
fixes #7289, fixes #7291, fixes #7293, fixes #7339, fixes #7358, fixes #7361,
fixes #7369, fixes #7374, fixes #7383.