Skip to content

[PR] test: align epoch-confirm/escalation-latch expectations with the merged #3641 contract (#4555) - #4569

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-24_4555-epoch-confirm-test-alignment
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-24_4555-epoch-confirm-test-alignment

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

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

Closes #4555

What this is

Both master-red tests after the #4525 train are test-expectation lag, not implementation drift. No runtime change — src/ untouched, two test files only.

Verification chain (all reproduced locally)

  1. Born red: tests/epoch-confirm-lifecycle.test.ts all-missing case was introduced by a5d1994 (cherry-pick of PR [PR] fix: retain fold snapshot until epoch confirmation resolves (#4260) #4261 head 594df72) and asserted foldEpochConfirmPending === false for all 5 passes — while its own commit's implementation latches at pass 3 (streak>=3 && unmatched>=10 → src/fold-reconcile.ts:2060). Red at the train tip because the train's test legs were cancelled (master red after #4525 train merge: sidScope rename straggler + #4241 judge double-fix collision + missing BILI_CODEX_STATE_MODE ledger row #4554).
  2. Regression attribution: git log 8ae56a01..HEAD -- src/fold-reconcile.ts src/session.ts tests/issue2915-order-centric-reconcile.test.ts → a5d1994 is the only train commit touching the latch path. The issue's suspicion on 9a9db1f is disproven at file level: that commit drops the pendingSettle prose-settle machinery in src/loop/tag-echo-filter.ts — a different subsystem. Old test independently verified 15/0 green in a worktree at pre-train master (8ae56a0), 14/1 red at tip.
  3. Which side is the intent: the owner already decided this in Snapshot as session reconstruction: identity claim order takes priority, message hash demoted to reference signal (root- | 快照即会话重构:身份认领顺序优先,消息哈希降级为参考信号(根治 #3588/#3640 一类误判) #3641 (OP boundary 4, 2026-10-18): full collapse → not default reset — error + banner, user confirms, passthrough until confirmed; Stage C acceptance: 「全塌+相似度塌才进『待确认』态(passthrough+banner)」. The in-repo doctrine states it flatly (MESSAGE-IDENTITY.md, Epoch-confirm gate): “total collapse latches foldEpochConfirmPending, emits one error, and preflight passes requests through verbatim — folding pauses; nothing is deleted, nothing is silently reset.” The code comment names the class explicitly: “wholesale replacement by foreign history … its terminal verdict is now an epoch confirmation, not 'destroyed'”.

So the implementation matches the owner-decided contract; both tests lag it:

Behavior changes

None. Tests-only alignment to behavior that already shipped via the #4525 train. If the owner instead wants all-missing to NOT latch (clean-slate reap), that would be an implementation change contradicting #3641 boundary 4 / MESSAGE-IDENTITY.md — please say so and I will revert and file the mechanism change instead.

Local evidence

  • 90/90 across tests/epoch-confirm-lifecycle.test.ts + tests/issue2915-order-centric-reconcile.test.ts + tests/fold-reconcile.test.ts on rebased head (ba5ab0b)
  • typecheck clean on rebased head
  • pre-train worktree control: old suite 15/0 at 8ae56a0

@ranxianglei ranxianglei changed the title test: align epoch-confirm/escalation-latch expectations with the merged #3641 contract (#4555) [PR] test: align epoch-confirm/escalation-latch expectations with the merged #3641 contract (#4555) Oct 24, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-24_4555-epoch-confirm-test-alignment (e7497bc)

Latest build — install this exact version

npm install -g billion-context@0.0.5552-pr.4569.d852068

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
e7497bc billion-context@0.0.5552-pr.4569.d852068 build
ea9c2d5 billion-context@0.0.5532-pr.4569.9363965 build
45a2376 billion-context@0.0.5515-pr.4569.555e29e build

Download artifact

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

Install instructions are refreshed on each push.

#3641 contract (#4555)

Both master-red tests after the #4525 train are expectation lag, not
implementation drift — no runtime change (src/ untouched):

- epoch-confirm-lifecycle all-missing shipped born-red in a5d1994 (train
  CI legs cancelled): it asserted foldEpochConfirmPending never latches,
  contradicting #3641 boundary 4 and MESSAGE-IDENTITY.md's epoch-confirm
  gate (total collapse latches, snapshot retained, nothing deleted).
  Expect pass >= 3 like one-interior-survivor; the kernel deactivates the
  zero-coverage block, the pause contract is shape-independent.
- issue2915 escalation-latch-recovery encoded the pre-#3641
  reap-at-escalation clean-slate contract. a5d1994 made the doctrine
  real (epochProtected gates the #2695 reap), so a healthy resend now
  yields 'resend' with the substrate retained and post-recovery id churn
  re-anchors ('reanchored') instead of rebuilding from zero.

Verified: 90/90 across the three reconcile suites on rebased head
ba5ab0b; old test ran 15/0 green on pre-train master (8ae56a0),
pinning a5d1994 as sole cause (only train commit touching the latch path).
@ranxianglei
ranxianglei force-pushed the 2026-10-24_4555-epoch-confirm-test-alignment branch from ea9c2d5 to e7497bc Compare October 24, 2026 16:40
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复 —— 本 PR 即 #4555 的执行项(Closes #4555)。相关但不同:#4554(#4525 train 合并机械损伤,不同机制)、#4260(a5d1994 已修复的 reap-before-pause 缺陷)、#3641(语义决策来源)。出站查重:按失败签名(epoch-confirm-lifecycle all-missing + issue2915 escalation-latch-recovery)检索近期 open/closed issue 与 PR,无并列的修复 PR。

标签: bug / scope/kernel / p2(一句话理由:两个 master-red 均为测试期望滞后——确定性 CI 噪音、零运行时影响;涉及面是 fold-reconcile 压缩决策面,归 kernel scope。)

初审进展(独立复核,非照抄 PR 描述):

  1. 方向关 ✅:diff 只动两个测试文件(+23/−13),src/ 零改动;方向与 owner 在 Snapshot as session reconstruction: identity claim order takes priority, message hash demoted to reference signal (root- | 快照即会话重构:身份认领顺序优先,消息哈希降级为参考信号(根治 #3588/#3640 一类误判) #3641 boundary 4 拍板的契约一致(全塌 → error+banner+passthrough 待确认,不是静默 reset),MESSAGE-IDENTITY.md epoch-confirm gate 原文逐字核对无误。
  2. 断言有牙(双向验证):新头本地定向跑三套件 90/90 绿;把改动前的旧测试文件换回仓库对新实现反跑——各恰好挂一条、且正是被改的那条断言(all-missing latch expected false / actual true;escalation receipt 'resend' !== 'noop')。不是恒真改写,是这个 diff 本身让红变绿。
  3. master 已前进 → 已 rebase:旧头(ea9c2d5)上 8 条 test lane 红,时间与刚合入 master 的 gate 修复(4d34abf,「merge-ref casualties, master-red too」)吻合,判定为旧基线上的存量红而非本 PR 引入;当前 master(146b34f,[PR] merge: tier-5 train — dsh prepare/streaming domain (7 PRs: bili_final terminal marker, auto-fold storm gate, wire-only guard) #4590 train)又改了 src/fold-reconcile.ts(f4a21bb),所以我把分支 rebase 到最新 master(e7497bc,无冲突,diff 不变),rebased 头上重跑定向 90/90 绿 + typecheck clean,已 push 到 PR 分支。

等 e7497bc 的全量 CI 出结果后补结构化八问结论。

@ranxianglei ranxianglei added bug Something isn't working p2 scope/kernel labels Oct 24, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

Closing: both test alignments in this PR are already on master — epoch-confirm-lifecycle.test.ts asserts the pass >= 3 latch (lines 56/68) and issue2915-order-centric-reconcile.test.ts carries the #4260 retained-substrate contract (healthy.kind === "resend", block retained; lines 367/378). See b06b408 and dc86ca8.

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

Labels

bug Something isn't working p2 scope/kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

epoch-confirm latch semantics: train a5d1994d test born-red (all-missing) + regression of 2915 escalation-latch-recovery — owner decision needed

1 participant