Skip to content

[PR] chore(branch): land 40 single-purpose fixes as one history-preserving batch (wave 5) - #6677

Merged
ranxianglei merged 156 commits into
masterfrom
batch5-wave5
Nov 14, 2026
Merged

ranxianglei merged 156 commits into
masterfrom
batch5-wave5

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

One history-preserving batch landing Afloat16's 40 open single-purpose fix branches (each was a 1-commit PR with its own hermetic test). Each branch is pulled in as a real merge commit — original authors, commit messages, and history stay intact; no squashing, no cherry-pick rewrites.

Merge order follows the review sequence; the one textual conflict (scripts/live-files.mjs, two adjacent live-file registrations) is resolved as the union of both entries.

Contents (branch → issue)

Branch Issue One-line
2026-11-12_apig-canonical-query (#6484) #6483 APiG canonical query normalization
2026-11-12_bounded-log-window (#6487) #6486 bounded log read window
2026-11-12_async-zstd-decode (#6489) #6488 async zstd decode (no sync decompress on hot path)
2026-11-12_reconcile-long-history (#6492) #6490 gap-bracket reconcile for 150K-msg histories + spread-arg fix
2026-11-12_search-unicode-offsets (#6494) #6493 unicode-safe lowercase-span → original offsets
2026-11-12_cache-diff-byte-offsets (#6496) #6495 byte→UTF-16 offset mapping in wire diff
2026-11-12_foreign-sweep-failure-exit (#6498) #6497 sweep exits 1 when foreign blocks fail
2026-11-12_drop-fields-own-paths (#6500) #6499 hasOwn on compat-drop walks
2026-11-12_inline-null-response-bodies (#6502) #6501 null body for HEAD/204/205/304
2026-11-12_inline-request-abort-signal (#6504) #6503 dispatcher falls back to Request input signal
2026-11-13_inline-body-cancel (#6556) #6555 signal propagation through Request rebuilds
2026-11-13_pi-inline-abort (#6560) #6558 rethrow AbortError before direct fallback
2026-11-13_inline-request-init (#6563) #6562 standard Fetch signal-strip semantics in toInlineReq
2026-11-13_pi-inline-fallback (#6566) #6565 fallback rebuilds Request, no double FormData
2026-11-13_inline-stream-cancel (#6571) #6570 InlineRes bodyStream cancel destroys socket
2026-11-13_inline-signal-cleanup (#6575) #6573 detach listeners on finish/close
2026-11-13_proxy-connect-close (#6577) #6576 CONNECT error before headers, no 10s wait
2026-11-13_linear-terminal-sse (#6579) #6578 O(n) terminal SSE parse, no whole-buffer concat
2026-11-13_tool-content-order (#6581) #6580 capToolOutput keeps original part order
2026-11-13_proxy-ca-trust (#6583) #6582 undici requestTls/proxyTls CA wiring
2026-11-13_inline-data-billing (#6585) #6584 snake_case inline_data billing
2026-11-13_bounded-message-previews (#6593) #6590 O(110) session preview walk
2026-11-13_proxy-connect-buffered-data (#6595) #6594 paused-mode CONNECT reply read, no byte loss
2026-11-13_lazy-message-stringify (#6597) #6596 JSON.stringify only when echo predicate matches
2026-11-13_fastpath-json-grammar (#6599) #6598 strict JSON grammar in fastpath scan
2026-11-13_multiline-sse-rewrite (#6603) #6600 multi-data: SSE frame join before rewrite
2026-11-13_reactivation-linear (#6604) #6601 linear reactivation
2026-11-13_egress-header-isolation (#6606) #6605 case-insensitive delete before header set
2026-11-13_egress-header-replacement (#6608) #6607 draft headers committed only on plugin success
2026-11-13_session-gc-companion-index (#6611) #6609 reversed-string binary-search companion lookup
2026-11-13_lazy-messages-by-id (#6612) #6610 messagesById built only when needed
2026-11-13_session-identity-query (#6615) #6613 point SELECT for session removal identity
2026-11-13_block-content-join (#6618) #6616 block content materialized only for requested ids
2026-11-13_loop-multiline-sse (#6619) #6614 shared sseEventData/replaceSseEventData across adapters
2026-11-13_cleanup-accounting (#6622) #6620 cleanup accounting
2026-11-13_gemini-complete-frame (#6623) #6621 one wire frame per chunk, non-call parts kept
2026-11-13_count-active-blocks (#6626) #6624 SQL COUNT(*) instead of full block decode
2026-11-13_commandcode-proxy-tools (#6627) #6625 ACP tool receipts hidden from CommandCode wire
2026-11-13_loop-stream-cleanup (#6630) #6628 cancel upstream on in-band parse error + compress finally
2026-11-13_google-stream-errors (#6631) #6629 in-band google error frames become terminal events

Verification

Closes #6483 #6486 #6488 #6490 #6493 #6495 #6497 #6499 #6501 #6503 #6555 #6558 #6562 #6565 #6570 #6573 #6576 #6578 #6580 #6582 #6584 #6590 #6594 #6596 #6598 #6600 #6601 #6605 #6607 #6609 #6610 #6613 #6616 #6614 #6620 #6621 #6624 #6625 #6628 #6629

Afloat16 and others added 30 commits November 12, 2026 14:44
Register the process-spawning zstd regression in LIVE_FILES so the CI runner can start the test matrix. Append the entry to preserve existing zone slots; the child changes only its own zlib exports and binds no sockets.

The actual CI runner's global registration check and all 7 zstd cases pass locally. Typecheck, build and diff checks also pass.
Retain the upstream pack-install and CI-janitor entries at their existing slots, then append the zstd fallback regression. The original decoder, benchmark and regression test blobs are unchanged.

On the merged tree, the actual CI runner passes its global registration check and all 7 zstd cases. Full typecheck, production build and net diff checks pass.
…st (#6502)

The null-body test boots the full inline engine (config + sqlite state)
but, unlike its sibling inline-streaming.test.ts, did not redirect the
XDG dirs, so a developer run would touch the real ~/.config/billion-context
and state. Pin the same hermetic pattern and restore the env in the
after hook.
…operty idiom)

The fix (#6500) added Object.hasOwn to the intermediate-segment traversal
but left the adjacent leaf check on Object.prototype.hasOwnProperty.call.
Both are functionally identical own-property checks in the same function;
normalize to the single modern idiom so the deletion path reads uniformly.
…ent limit (#6490)

Same mechanism as the reconciliation fix in this PR: Math.max(...ptrs)
spreads the session's full canonical-pointer list (one entry per settled
canonical message) into a single call, which trips V8's argument-spread
limit (~125K-130K args on Node 22/24 x64) -> RangeError. The error is
caught and only logged as a warn, so the failure is silent: the pointer
list stops advancing and every later turn re-parses rows from the stale
max pointer instead of the fresh tail.

Replace the spread with a two-argument reduce (initial 0 - pointers are
verified non-negative by readCanonicalPointers) and export the function
for the regression test, which pins 150,000 pointers: pre-fix it fails
with the RangeError warn, post-fix it passes and the upkeep reads rows
after the highest pointer.
The CI preload selects legacy storage, so the canonical-pointer fixture
must opt into the unified store before setting session extension data.
Restore the prior mode and close the SQLite handle before removing its
temporary directory, including on Windows.

Retain the existing canonical-pointer fix and integrate current master.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1195-master.3858b69 (rolling master tag).

npm install -g billion-context@0.0.1195-master.3858b69  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

This was referenced Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment