Skip to content

[PR] test(session-resolve): un-shadow the #5719 msgid/store pins from the #5734 E5 checkpoint rung - #5857

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-11-07_5719-test-unshadow-e5
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-11-07_5719-test-unshadow-e5

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What this fixes

Master-born-red: tests/issue5719-msgid-lane-identity.test.ts T1/T8 fail deterministically on plain master (reproduced standalone at c45ac21, before this PR existed) in every CI shard carrying the file. First exposed by PR #5849's red shards (ubuntu 22 s2 / ubuntu 24 s2 / windows 22 s4) — whose diff (src/plugin.ts + one new test file) has zero intersection with this file.

Root cause: #5734 landed the self-checkpoint re-anchor rung (E5) first in the tagChanged branch of resolveSessionOrder (src/session-resolve.ts:338), with its own pin file tests/issue5719-self-checkpoint-reanchor.test.ts — but left the older #5719 pin file untouched. That file's shared incidentHistory() fixture embeds bili's OWN authored-checkpoint identity header (conv="<raw id>" at the first user cell), so the E5 rung now preempts the msgid/store rungs this file exists to pin:

  • T1: reason string changed from the msgid-rung text to E5's → regex pin fails;
  • T8: store-null scenario now re-anchors via the marker instead of degrading to byte-only fork → expectation fails;
  • T5/T6 silently went vacuous: they pass via E5 without ever querying the store, so "stored rows outlive the wire" / "restart wipes memory, STORE survives" are no longer actually exercised.

The fix

One fixture change: give incidentHistory() a FOREIGN conv declaration (conv="${tag}-other"). The E5 gate then misses exactly like any external quote (that boundary is pinned in E5's own suite, acceptance 2), and each rung in this file fires again: T1 msgid-overlap re-anchor with the original reason strings, T5/T6 store rescue genuinely exercised, T8 store-null byte-only degradation → fork restored. All original assertions kept verbatim — no pin weakened.

Verified locally, standalone: both issue5719 suites 14/14 green on this head (was 12/14 with only T1/T8 failing pre-fix).

…5734 E5 checkpoint rung

#5734 landed the self-checkpoint re-anchor rung (E5) first in the
tagChanged branch of resolveSessionOrder with its own pin file
(issue5719-self-checkpoint-reanchor.test.ts) but left
tests/issue5719-msgid-lane-identity.test.ts untouched. That file's shared
incidentHistory() fixture embeds bili's OWN authored-checkpoint identity
header (conv="<raw id>"), so the E5 rung now preempts the msgid/store
rungs this file exists to pin: T1/T8 fail deterministically on plain
master (c45ac21, standalone run) in every CI shard carrying the file;
T5/T6 additionally went vacuous (passing via E5 without ever querying
the store).

Give the fixture a FOREIGN conv declaration: the E5 gate misses exactly
like any external quote (that boundary is pinned in E5's own suite), and
each rung here fires again — T1 msgid-overlap re-anchor with the original
reason strings, T5/T6 store rescue genuinely exercised, T8 store-null
byte-only degradation to fork restored. No src/ change; no runtime
behavior touched.

This is a master-level born-red: it redacts every tree containing
c45ac21 regardless of PR content (first exposed by PR #5849's shards:
ubuntu 22 s2 / ubuntu 24 s2 / windows 22 s4, whose diff has zero
intersection with this file). #5849's head lives in an external fork
branch that cannot receive in-branch commits, so the fix lands here.
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_5719-test-unshadow-e5 (7714bdf)

Latest build — install this exact version

npm install -g billion-context@0.0.8454-pr.5857.0051f8e

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
7714bdf billion-context@0.0.8454-pr.5857.0051f8e build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title test(session-resolve): un-shadow the #5719 msgid/store pins from the #5734 E5 checkpoint rung [PR] test(session-resolve): un-shadow the #5719 msgid/store pins from the #5734 E5 checkpoint rung Nov 7, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR #5857 review(2026-11-07_5719-test-unshadow-e5,head 7714bdf)

结论:可合并。 测试-only、最小 diff(单文件单 commit,+5/−1)、根因判断正确、负向边界已被 E5 自带套件钉住、本地定向 + pushed-head CI 双绿。未另开并行修复 PR(一 thread 一修 PR 规则满足,在原分支就地核对)。

查重:不重复——open issues/PR 无第二处针对本 thread 或 stale-pin 家族;#5851 只碰 src/session-resolve.ts,不同文件。

八问

  1. 是什么问题:master 出生即红——tests/issue5719-msgid-lane-identity.test.ts 的 T1/T8 在纯 master 上确定性失败,且 T5/T6 静默空转(pass 了但没真正走 store)。
  2. 什么原因导致的:[PR] fix: keep the live conversation on its raw lane when a full compaction lands with a persona-text drift (#5719) #5734 把 E5「自产 checkpoint 重锚」rung 放在 resolveSessionOrder tagChanged 分支最前(src/session-resolve.ts:398),命中即在 :408 early-return;而本文件要钉的 msgid/store rung(tryMsgIdRescue(),reason 串在 :386)只在 :488/:537/:557 被调,全在 E5 之后。共享 fixture incidentHistory() 首 user cell 内嵌了 bili 自己的 identity header(conv="<raw id>"),恰好命中 E5 精确匹配(selfCheckpointDeclares :182,首 user 且 conv===rawId)→ E5 抢跑,把下层 rung 全部短路。分层:E5 是合法新机制(非 bug);bug 在旧 pin 文件没随 fixture 更新,导致它测的不再是它声称测的对象。
  3. 影响范围与严重程度:仅测试面,生产行为零影响(fixture 不进 dist)。CI 影响 = 每个携带该文件的 shard 都红(ubuntu/windows 多 shard),属「CI 红风暴」级确定性噪音——会误导其他 PR 作者把自己的红误判成自己的代码问题;终端用户无感。严重度:p2(确定性 CI 噪音/成本,非可用性缺陷)。
  4. 怎么修复的:改一处 fixture——给 incidentHistory() 换外部 conv 声明(conv="${tag}-other")。E5 精确匹配随即 miss(等同任何外部引用),下层 rung 各归其位:T1 回 msgid-overlap 重锚 + 原始 reason 串,T5/T6 真走 store rescue,T8 store-null 退化回 byte-only fork。所有原始断言一字未动,pin 未弱化。设计要点:两个机制现在由两个 fixture 干净分离——own-checkpoint(E5)归 self-checkpoint-reanchor 套件,store/msgid 归本文件。
  5. 是否有回归问题:逐项过既有行为——
    • wire/缓存/持久化:未触碰(diff 无任何 src/、kernel/)。
    • E5 正例(own conv 命中):未动,仍由 self-checkpoint 套件 acceptance 1 钉住。
    • 「外部 conv 不得重锚」负向边界:未削弱——它在 E5 自带套件 acceptance 2(line 108,session-other-aaaa-bbbb→必须 fork)已独立钉住;本 fixture 改外部 conv 正是复用这条已钉边界,不留覆盖空洞。
    • 全仓仅 3 个 fixture 带该 marker(dsh-authored-compaction conv="s" 外部 / self-checkpoint conv="${ID}" 意图 own / 本文件现外部),无其他 pin 被 E5 连带 shadow,修法完整无遗漏。
    • 高危模式(语义漂移 / fail-fast 变吞错 / 阈值·时序·输出格式漂移):均不涉及。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及,纯测试卫生。
  8. 是否引入新配置:不涉及。

验证证据

  • 本地定向:fixed head 两文件 14/14 绿;pre-fix(pre-PR base bebc239f27)msgid 文件 6/8(T1/T8 fail,T5/T6 空转)= 总 12/14,与 PR 声明「was 12/14 with only T1/T8 failing」逐字吻合。
  • pushed-head CI:7714bdf 全绿(total=30 / failed=0 / pending=0)——test 全 shard(ubuntu 22/24 ×N、windows 22 ×N)、static-gates、mysql-contract、lane-guard、pi-subagents-guard、docs-sync、lifecycle-ledger-guard 均 success,e2e real-client lanes 按 env gate skipped(预期)。
  • 副证:floor 1 构建产物 tag pr.5857 印证真实 PR 号为 [PR] test(session-resolve): un-shadow the #5719 msgid/store pins from the #5734 E5 checkpoint rung #5857。

判定:可合并。 建议直接 merge;merge 后 #5849 的三个红 shard 会在其下次 CI 触发时转绿。

标签建议(判据 = 本 PR 自身 diff):bug + scope/wiring(session-resolve 顺序裁决域;若按交付物算也可 scope/ci)+ p2。跨车道机制,不打客户端车道标。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR #5857 审查完成,结论:可合并。

已做:

  • 独立核对 diff(单文件单 commit,test-only,+5/−1)与根因——E5「自产 checkpoint 重锚」rung(src/session-resolve.ts:398)在 tagChanged 分支最前 early-return(:408),短路了本文件要钉的 msgid/store rung(tryMsgIdRescue,:488/:537/:557);旧 fixture 内嵌 own conv 恰好命中 E5。修法(fixture 改外部 conv="${tag}-other")正确且完整,负向边界由 E5 自带套件 acceptance 2 钉住,全仓无其他 pin 被连带 shadow。
  • 本地定向复现:fixed head 两文件 14/14 绿;pre-fix base 12/14(T1/T8 fail),与 PR 声明逐字吻合。
  • pushed-head CI(7714bdf):total=30 / failed=0 / pending=0,全绿。

交付:八问结构化 review 已回帖;triage 标签 bug · p2 · scope/wiring 已打(保留 pr)。merge 为 owner-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

Labels

bug Something isn't working p2 scope/wiring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant