Skip to content

[PR] test(#5558): carry no-op receipt regression tests from superseded PR #5564 - #7288

Open
ranxianglei wants to merge 2 commits into
masterfrom
2026-11-19_issue5558-noop-test-followup
Open

ranxianglei wants to merge 2 commits into
masterfrom
2026-11-19_issue5558-noop-test-followup

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Summary

Carries the regression tests from PR #5564 (superseded by #5560) that assert observable no-op receipt fields not covered by #5560's existing tests.

Context

What's carried

New file tests/issue5558-ext-summary-noop.test.ts (4 tests):

  1. Fully protected range → ext lane returns an applied no-op — asserts reason === 'noop', blocksCreated === 0, compressFailStreak not re-armed (these assertions are NOT in [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560's existing protected ranges return an idempotent no-op test).
  2. Replaying an already-covered range → ext lane reports the covering block as a no-op — asserts reason === 'noop', blocksCreated === 0, compressFailStreak not re-armed (these assertions are NOT in [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560's existing already-folded ranges return a no-op test).
  3. Genuinely uncompressible range (too small) keeps the refused receipt — entirely new (not in [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560).
  4. Shared no-op receipt did not change the normal path (applyRanges) — entirely new (not in [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560).

Text assertion adjustment

The PR's original text assertions (res.text.includes("protected zone") / res.text.includes("already covered")) were adjusted to match #5560's receipt wording ("protected" / "already compressed"), since #5560's applyRanges delegation produces different receipt text than the PR's original noopCompressReceipt.

Verification

  • All 4 tests assert observable receipt fields (outcome, reason, blocksCreated, text, metadata) — no dependency on PR-private APIs.
  • The test file imports only public APIs: parseCompressInput (compress-tool.ts), applyRanges/RewriteCtx (stream.ts), applyConfiguredCompression (external-summary-compress.ts).

Closes #5558 (behavior fix already in master via #5560; this adds the regression coverage).

Supersedes: #5564 (closed as superseded per directive).

…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).
@ranxianglei ranxianglei changed the title test(#5558): carry no-op receipt regression tests from superseded PR #5564 [PR] test(#5558): carry no-op receipt regression tests from superseded PR #5564 Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-19_issue5558-noop-test-followup (0f94cbb)

Latest build — install this exact version

npm install -g billion-context@0.0.10972-pr.7288.891f797

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
0f94cbb billion-context@0.0.10972-pr.7288.891f797 build
914efb4 billion-context@0.0.10970-pr.7288.ccbdad7 build

Download artifact

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

Install instructions are refreshed on each push.

…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/.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Duplicate check (查重): Not a duplicate. This is the only open PR carrying the #5558 regression tests — #5564 (the source of these tests) is closed/superseded, and #5560 (the behavior fix) is already merged into master. No other open PR/issue covers this test carry-over. The carry-over is authorized by the directive at #5564 floor 71 (mirror #5566): "carry only those cases into a small follow-up test PR."

Review — structured 8 questions (八问):

  1. 是什么问题: 本 PR 从被取代的 PR [PR] fix(#5558): external-summary no-op ranges reported as failure, now idempotent no-op #5564 承接 [Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558 的回归测试——断言 [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560 现有测试未覆盖的可观测 no-op receipt 字段(reason/blocksCreated/compressFailStreak 等)。行为修复已在 master(经 [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560),本 PR 只补回归覆盖,纯测试、无行为变更。

  2. 什么原因导致的: [Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed #5558 根因是 applyConfiguredCompression 把「无新摘要工作」的 preview 一律降级为同一份 refused receipt,包括正常路径本可判为 no-op 的未变更 preview,导致幂等 no-op 被误标为失败、模型反复重试并重新武装失败连击。[PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560 已修(委托 applyRanges 复用正常 no-op receipt)。本 PR 承接的是 [PR] fix(#5558): external-summary no-op ranges reported as failure, now idempotent no-op #5564 带着但从未合入的测试覆盖。

  3. 影响范围与严重程度: 纯测试 PR,不改任何源码/行为,无用户可见影响。但我发现一个真实缺陷:测试 2 的断言字面量写错(includes("already compressed")),而 kernel 的 no-op 警告实际措辞是 "already covered by active block(s)"(kernel/src/compress.ts:1864)——"already compressed" 是 refused/错误路径的措辞(gate:already-compressed),不是 no-op 路径的。因此该测试对 master 是红的(4 个测试里 1 个失败)。

  4. 怎么修复的: 就地顺手修(commit 0f94cbb):把测试 2 的断言从 assert.ok(res.text.includes("already compressed")) 改为 assert.match(res.text, /covered by active block/),对齐 kernel 实际 no-op 措辞,并与 [PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560 现有 already-folded 测试(同样用 /covered by active block/)一致。

  5. 是否有回归问题: 无。本 PR 只新增一个测试文件,不改源码;我的修复只改一处测试断言。已验证:新测试文件 4/4 通过、[PR] fix(compress): return no-op for covered external-summary ranges (#5558) #5560 现有测试文件 27/27 通过、typecheck 干净、全量 CI 绿(36 success + 12 skipped,0 失败)。未触碰任何既有行为。

  6. 是否破坏缓存: 不涉及。未触碰缓存/重试/增量游标/去重键逻辑。测试反而钉住了缓存/重试相关行为:合法 no-op 不重新武装失败连击(compressFailStreak 保持 undefined),已验证完好。

  7. 是否改了设计方向: 不涉及。纯增量测试覆盖,无架构/边界/数据流变更。

  8. 是否引入了新的配置: 不涉及。无新 env/config/默认值。

Fix applied (顺手修, commit 0f94cbb): The carried-over test 2 had a wrong assertion literal — 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 refused/error-path wording (gate:already-compressed), not the no-op path. So test 2 failed against master. I fixed it on the spot to assert.match(res.text, /covered by active block/) (aligning with #5560's existing already-folded test). Note: the PR body's "Text assertion adjustment" section is inaccurate on this point — it claims the adjustment matched #5560's wording, but it actually broke the test.

Labels: added p3 + regression to the [PR] issue (kept the existing pr label).

Verdict: 可合 (mergeable). After the fix, all 4 tests pass, the existing #5560 suite is green, typecheck is clean, and full CI is green (36 success + 12 skipped, 0 failures). The PR delivers exactly what it set out to: the #5564 regression coverage that never landed, now correctly asserting the observable no-op receipt fields. Merge is yours (human-only).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][compress] 0.1.211: external-summary mode reports no-op ranges as failed

1 participant