Skip to content

[PR] batch-D: tests-only — absorb #7288 (#5558 receipt) + #7164 (#5631 cold-load retry); #7373 already pinned in master - #7447

Merged
ranxianglei merged 3 commits into
masterfrom
batch-D-2026-11-21
Nov 21, 2026
Merged

ranxianglei merged 3 commits into
masterfrom
batch-D-2026-11-21

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What this is

A tests-only batch (zero production behavior change) that absorbs two small open test PRs so their tests land on master in one shot, plus a verification note on #7373.

Absorbed original PRs

Original PR Author What it does Absorbed commit
#7288 ranxianglei Adds the #5558 no-op receipt regression tests (carried from superseded PR #5564): a fully protected range returns an applied no-op instead of a failure, and an already-covered range reports the covering block as a no-op b780fa22 + efe0656a (wording fix for the already-covered assertion)
#7164 ranxianglei Bounded-retry on the #5631 post-restart cold-load test to stop the known load-flake family from red-ing CI on timing 58625041

Original authors preserved via cherry-pick -x (no --no-keep-author). The original PRs will be closed as superseded after this batch lands — they stay open for now.

#7373 — verified already pinned in master, no new test needed

Issue #7373 asks for a full-path regression: drive a watermark-HIT turn through prepareOpenai -> persist -> shadow and assert the verified prefix is preserved, failing if the fix line if (wpHit !== undefined) session.lastMessagesFolded = true; (src/server/prepare-openai.ts:675) were removed.

That test already exists in master: tests/issue7346-pf-window-ledger-fullpath.test.ts, merged 2026-11-20 via #7357 (about an hour after the issue was filed). Duplicate-screening per AGENTS.md §7.1, I did not add a third copy. Empirical re-verification on this branch's head:

#7373 can be closed as already covered by that merged test.

Test evidence (targeted, local)

node --import ./tests/preload-test-env.mjs --import tsx --test tests/issue5558-ext-summary-noop.test.ts   # 4/4 pass
node --import ./tests/preload-test-env.mjs --import tsx --test tests/issue5631-restart-survival.test.ts   # 3/3 pass
node --import ./tests/preload-test-env.mjs --import tsx --test tests/issue7346-pf-window-ledger-fullpath.test.ts  # 1/1 pass (with fix); fails without it, see above
npm run typecheck   # clean

The authoritative full-suite verdict is the CI test lanes on this head (AGENTS.md §7.2: a local full-suite run is environment noise, not evidence; the local run was additionally blocked by the machine-wide test-suite lock held by a concurrent batch run).

Issues

ework-agent and others added 3 commits November 21, 2026 15:12
…5564

Carries the regression tests from PR #5564 (superseded by #5560) that assert
observable no-op receipt fields not covered by #5560's existing tests:
- reason === 'noop' and blocksCreated === 0 on the ext-lane no-op path
- compressFailStreak not re-armed on a legal no-op
- genuine kernel errors (too small) keep the refused receipt
- the shared no-op receipt did not change the normal path (applyRanges)

Text assertions adjusted to match #5560's receipt wording
('protected' / 'already compressed' instead of the PR's original
'protected zone' / 'already covered').

Closes #5558 (behavior fix already in master via #5560; this adds the
regression coverage that PR #5564 carried but never landed).

(cherry picked from commit 914efb4)
…nel receipt wording

The carried-over test asserted res.text.includes("already compressed"), but the
kernel's no-op warning for an already-covered range reads "already covered by
active block(s)" (kernel/src/compress.ts:1864) — "already compressed" is the
wording of the refused/error path (gate:already-compressed), not the no-op path.
The assertion therefore failed against master. Align it with #5560's existing
already-folded test, which uses /covered by active block/.

(cherry picked from commit 0f94cbb)
…load-flake family)

The #5631 restart-survival dsh lane flakes under CI load: the first
request after a restart can arrive before the proxy finishes reloading
the folded session state from disk, so the proxy sees the full raw
context and fails the preflight window check (502/413
preflight_compress_failed). Documented 3+ times in #4599 (floors
971/981/1049) as the 'post-restart preflight race' load-flake family;
local targeted runs are always green.

This is the test-side bounded-polling fix the fleet's durable item
(floor 903) pointed at: sendTurn now retries the known race signature
(502/413 preflight_compress_failed) up to 6x with 1s backoff on the
main arm. A one-off race succeeds on a later attempt; a real
fold-state loss 502s on every attempt and still fails the test. The
control arm is untouched (it must never fold, so a 502 there is a real
bug, not a race).

Closes #7145 (scheduled full test red at 548e396, ubuntu 24 shard 2,
dsh lane cycle0/sigterm/post-restart 0).
#7108 (windows shutdown-signal test) is already fixed on master at
3186e54; referenced for the aggregation board.

(cherry picked from commit b4f7c7a)
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: batch-D-2026-11-21 (5862504)

Latest build — install this exact version

npm install -g billion-context@0.0.11178-pr.7447.b2d4725

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
5862504 billion-context@0.0.11178-pr.7447.b2d4725 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr7447.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: vllm-qwen/qwen3.8-27b)

Duplicate screening: 查重: 不重复 — no other open PR targets this thread (checked all open [PR] rows; the batch siblings batch-A #7452 / batch-B #7447 / batch-C #7451 cover different topics). Labels applied to this thread: p3 + scope/ci (tests-only, CI stability; no production behavior change).

Reviewed PR #7447 (batch-D) against current master (98fa9575f10). Verdict: mergeable once CI is green — CI was still running at the time of this comment (7 success / 11 skipped / 12 pending / 0 failed).

What I verified independently (not taken from the PR body):

  1. Cherry-pick fidelity — the PR diff is byte-identical (modulo index lines) to the concatenation of original PRs [PR] test(#5558): carry no-op receipt regression tests from superseded PR #5564 #7288 + [PR] fix(tests): bound-retry the #5631 post-restart cold-load race (known load-flake family) #7164; authors preserved via cherry-pick -x.
  2. Scope — exactly 2 test files: NEW tests/issue5558-ext-summary-noop.test.ts (+110), MODIFIED tests/issue5631-restart-survival.test.ts (+39/−17). Zero production code, zero kernel, zero config, zero version bump.
  3. Local targeted tests on the PR head — tests/issue5558-ext-summary-noop.test.ts 4/4 pass; tests/issue5631-restart-survival.test.ts 3/3 pass; tests/issue7346-pf-window-ledger-fullpath.test.ts 1/1 pass. npm run typecheck clean.
  4. [Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 claim re-verified empirically — the fix line if (wpHit !== undefined) session.lastMessagesFolded = true; is at exactly src/server/prepare-openai.ts:675 on master; the full-path test (merged via [PR] fix: watermark-HIT window save must not retire the verified prefix (#7346) #7357) passes with the line and fails without it (I commented it out: AssertionError [ERR_ASSERTION]: the verified prefix must survive the HIT window save (got 2 live rows) at tests/issue7346-pf-window-ledger-fullpath.test.ts:196 — exactly the failure mode [Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 requires; line restored, worktree clean). So [Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 is genuinely already pinned in master — no third copy needed.
  5. Test design review —
    • 5558: 4 tests cover both gate directions (protected range → applied/no-op with "protected" receipt; already-covered range → no-op naming the covering block; genuinely too-small range → stays "refused" with [Compression FAILED; normal-path receipt unchanged). The unresolvable summary.example.test payer URL means any accidental payer dispatch fails the test. Non-blocking observation: the no-op receipt is identical on the ext-lane path and the plan-null fallback, so the test pins the [Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558 receipt regression (fix line reverted → "refused" ≠ "applied", which it does catch) but would also pass if ext-lane routing were removed wholesale — that is out of [Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558's scope and covered by the existing external-summary tests.
    • 5631: the retry is scoped to exactly the flake signature (status 502/413 AND body contains preflight_compress_failed), 6 attempts × 1s backoff; a real fold-state loss fails all 6 attempts and stays red, and the core POST_FOLD_CAP byte assertions are untouched, so the retry cannot mask a real regression. Worst-case time cost is bounded (~5s extra per affected turn).

Closures left to you (owner-only per policy): #7373 (already covered by the merged test) and #7288 / #7164 (superseded by this batch) stay open until you close them after this lands.


8问(审核结论)

  1. 是什么问题:这不是缺陷修复,而是一个 tests-only 吸收批次——把两个小的测试 PR([PR] test(#5558): carry no-op receipt regression tests from superseded PR #5564 #7288 的 [Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558 回归测试、[PR] fix(tests): bound-retry the #5631 post-restart cold-load race (known load-flake family) #7164 的 New test: after repeatedly killing (dsh, pi agent) and restarting, the compression state of long sessions must survive a | 新测试:反复杀(dsh、pi agent)并重启后,长会话的压缩状态必须存活、缓存命中必须能恢复——宿主 CI 与 bili-gate 两边补自动化断言 #5631 冷加载重试)一次落进 master,并对 [Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 给出「已被 master 现有测试覆盖」的验证结论。
  2. 什么原因导致的:不涉及(非缺陷)。背景:[Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558 修复已合入但其回归测试滞留在被 supersede 的 PR [PR] fix(#5558): external-summary no-op ranges reported as failure, now idempotent no-op #5564 里;New test: after repeatedly killing (dsh, pi agent) and restarting, the compression state of long sessions must survive a | 新测试:反复杀(dsh、pi agent)并重启后,长会话的压缩状态必须存活、缓存命中必须能恢复——宿主 CI 与 bili-gate 两边补自动化断言 #5631 冷加载测试存在已知的 load-flake 家族,会因时序把 CI 打红;[Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 要求补全路径回归测试。
  3. 影响范围与严重程度:零生产代码、零行为变更——只动 2 个测试文件(1 新增 110 行、1 修改 +39/−17)。无用户可见影响;严重程度 = 无(纯测试基础设施)。
  4. 怎么修复的:cherry-pick -x 吸收两个原 PR(作者保留);[Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 不新增测试——独立实证:master 上 tests/issue7346-pf-window-ledger-fullpath.test.ts([PR] fix: watermark-HIT window save must not retire the verified prefix (#7346) #7357 合入)在修复行存在时通过、注释掉 src/server/prepare-openai.ts:675 后以 [Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373 要求的失败模式失败,故判定已覆盖、不重复立项。
  5. 是否有回归问题:无。逐项过:生产路径零触碰;5631 测试核心字节断言(POST_FOLD_CAP)未动,重试只命中 502/413+preflight_compress_failed 签名,真实 fold-state 丢失 6 次全败仍红——重试不掩盖真回归;5558 测试双向断言齐全(该 noop 时 noop、该 refused 时 refused,符合 Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 门禁纪律)。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试游标/去重逻辑)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(COLD_LOAD_RETRY 是测试文件内局部常量,非 env/config/knob)。

判定:可合并——等 CI 全绿(本帖发出时 7 success / 11 skipped / 12 pending / 0 failed)。cherry-pick 保真度、测试设计、#7373 覆盖结论均已独立验证成立。

@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1254-master.f03e335 (rolling master tag).

npm install -g billion-context@0.0.1254-master.f03e335  # 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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant