Skip to content

[PR] chore(branch): land 3 single-purpose fixes as one history-preserving batch (wave 7) - #6723

Open
ranxianglei wants to merge 29 commits into
masterfrom
batch7-wave7
Open

ranxianglei wants to merge 29 commits into
masterfrom
batch7-wave7

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Lands Afloat16's 3 latest single-purpose fixes as one history-preserving batch. Each branch is merged in with a real merge commit (Merge Afloat16/<branch> (PR #<n>) into batch7-wave7), so every original commit and author is preserved in the first-parent history.

PR Branch Issue What it fixes
#6716 2026-11-14_linear-coverage-timestamps #6715 compression-receipt coverage times: the covered-id dedupe scanned the array per id (covered.some, O(n²) on stamped 20k-message folds) → Map, boundary-ref resolution and "never invent a range" semantics unchanged
#6718 2026-11-14_frozen-message-whitespace #6717 frozen-snapshot message re-parse stripped ALL trailing blank lines from every body (content at the end of a message was silently eaten) and lost the ref marker when a body started with a blank line → only the single separator newline before the next header is removed; leading/trailing blanks survive verbatim
#6722 2026-11-14_linear-cache-usage-alignment #6721 cache-diff usage alignment: each usage sample re-scanned every request from the back (O(samples×requests) on 10k-request logs) → single forward pointer over the two sorted lists, same 50 ms admission boundary and stable ordering

Verification (clean checkout of this branch, node 22.23.4, CI preload chain):

  • per-PR added-line audit vs its merge-base: all 3 clean
  • tsc --noEmit: clean
  • all 3 touched test files: 70 pass

After this merges, the 3 source PRs become branch ancestors of master and close with their Closes keywords.

Closes #6715 #6717 #6721

@ranxianglei ranxianglei changed the title chore(branch): land 3 single-purpose fixes as one history-preserving batch (wave 7) [PR] chore(branch): land 3 single-purpose fixes as one history-preserving batch (wave 7) Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: batch7-wave7 (c43d3d3)

Latest build — install this exact version

npm install -g billion-context@0.0.10012-pr.6723.12e3f58

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
c43d3d3 billion-context@0.0.10012-pr.6723.12e3f58 build
2221db1 billion-context@0.0.9981-pr.6723.f8a656e build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6723.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: qwen/qwen3.8-27b)

PR #6723 Review — batch7-wave7 (3 single-purpose fixes, history-preserving batch)

Scope: PR #6723 lands Afloat16's 3 single-purpose fixes as one history-preserving batch. Each fix is a real merge commit (two parents), preserving all original commits and authors in the first-parent history.

Verified (clean checkout of 2221db1c9d, node 22):

Key correctness checks:

  • [PR] perf: index covered timestamps in compression receipts #6716 (src/stream.ts): Array→Map is a pure O(n²)→O(n) dedupe. First-occurrence-wins semantics preserved (covered.has early-return prevents overwrite); Map insertion order matches the old array order; typeof ts !== "number" → return null ("never invent a range") unchanged.
  • [PR] fix(web): preserve frozen message whitespace on retrieval #6718 (src/web/sessions-data.ts): ref-marker detection cur.text === "" ↔ !hasText is provably equivalent (a blank line keeps cur.text empty in the old logic and does not set hasText in the new). Item count and ref-marker positions are driven by role headers, unchanged — so snapshotRefIndexFor's count/marker/order validation is unaffected. Only the single separator newline before the next header is stripped; leading/trailing body blanks survive verbatim.
  • [PR] perf: align cache usage in a single ordered pass #6722 (src/acp-cache-diff.ts): single forward pointer is correct because both inputs are sorted ascending — verified samples at acp-cache-diff.ts:587 and g.out at :610. The 50 ms admission boundary and stable ordering are unchanged.

结构化八问

  1. 是什么问题: 3 个独立的性能/正确性修复——压缩回执覆盖时间戳 O(n²) 去重、冻结快照消息重解析吞首尾空行、cache-diff usage 对齐 O(samples×requests) 重扫。
  2. 什么原因导致的:
  3. 影响范围与严重程度: [PR] fix(web): preserve frozen message whitespace on retrieval #6718 是正确性修复(web 面板冻结快照消息首尾空行被吞,体验瑕疵 p3);[PR] perf: index covered timestamps in compression receipts #6716/[PR] perf: align cache usage in a single ordered pass #6722 是纯性能优化,无外部行为影响(仅内部实现,p3)。
  4. 怎么修复的:
  5. 是否有回归问题: 无。3 修复在不同模块(stream.ts / sessions-data.ts / acp-cache-diff.ts),无交互。[PR] fix(web): preserve frozen message whitespace on retrieval #6718 的 ref 标记判定等价性已验证;item 数量和 ref 标记位置不变,snapshotRefIndexFor 校验逻辑不受影响。高危模式(语义漂移、fail-fast 变吞错、阈值/时序/输出格式变化)逐项过:均不涉及。
  6. 是否破坏缓存: 不涉及。3 修复都不触碰缓存/重试/增量游标/去重键。
  7. 是否改了设计方向: 不涉及。3 修复都是局部优化/修正,无架构/边界/数据流转向。
  8. 是否引入了新的配置: 不涉及。无新 env/config/默认值。

合并判定: 可合。3 个修复均正确、有测试钉住、CI 绿、历史保留完整。

[PR] chore(branch): land 11 single-purpose fixes as one history-preserving batch (wave 8)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants