Skip to content

[PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints - #4650

Open
ranxianglei wants to merge 14 commits into
masterfrom
2026-10-25_conflict-report-client-coverage
Open

ranxianglei wants to merge 14 commits into
masterfrom
2026-10-25_conflict-report-client-coverage

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #4649

Background

The #3611 diagnostics enrichment was dsh-only: CONFLICT_LOG_PATTERNS held no codex signature and the host client versions section listed only dsh profile bundles (DSH_REPORT_PACKAGES). A conflict report from a codex client (#4648) therefore shipped zero log-evidence lines and no client version — triage stalled on manual data collection.

Changes

  1. Conflict tail now matches the codex compaction evidence chain (src/web/diagnostics.ts, CONFLICT_LOG_PATTERNS):

    • codex compaction_trigger request not intercepted (passthrough — src/server/handle.ts)
    • codex compact intercepted (successful intercept, both forms)
    • codex compact forge failed (degradation signal)

    Stable substrings of existing tee-log lines; the dsh patterns are unchanged.

  2. Observed client hints (hostClientVersionLines): the section now also lists the distinct session.metadata.clientHint values over live sessions (cap 8, first-seen order). For UA-carried clients like codex the hint IS the raw UA string (codex_cli_rs/<ver> — the version evidence); label-hint clients (claude/opencode) surface their labels. The line appears even when no dsh profile exists on the machine (the old early return hid everything behind an empty dsh list).

No new UA registry/classifier: reuses the per-session hint already recorded on first request (sniffScanClient(headers) ?? ua.slice(0,120)).

Behavior-change disclosure (output format)

The diagnostics blob format changes additively:

  • OLD: --- host client versions --- listed dsh profiles only; on non-dsh machines the section ended at "no profiles under DSH_HOME".
  • NEW: an additive line observed client hints (N distinct, live sessions): … is appended whenever live sessions carry clientHints; byte-identical output otherwise.
  • The conflict tail (recent conflict-related log lines) can now also match the three codex signatures above; for codex reports it was always (no matching lines …) before.

No wire/protocol/config/cache/kernel impact.

Verification

feat-class change (new reporting surface) → human review lane, not auto-merge.

…ignatures + observed client hints (#4649)

The #3611 diagnostics enrichment was dsh-only: CONFLICT_LOG_PATTERNS held no
codex signature and the host-client-versions section listed only dsh profile
bundles, so a codex conflict report shipped zero log evidence and no client
version (#4648 stalled on manual data collection).

- conflict tail now matches the codex compaction evidence chain: not-
  intercepted passthrough, intercept success (both forms), forge failure
- versions section lists the live pool's distinct session clientHints —
  for UA-carried clients like codex the hint IS the version string
  (codex_cli_rs/<ver>); the line appears even when no dsh profile exists
  (the old early-return hid it)
- targeted tests pin both directions incl. dedupe and the no-profile case
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-25_conflict-report-client-coverage (469af9a)

Latest build — install this exact version

npm install -g billion-context@0.0.9359-pr.4650.e4cebba

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
469af9a billion-context@0.0.9359-pr.4650.e4cebba build
f9969f7 billion-context@0.0.9357-pr.4650.b4c8836 build
da6ae14 billion-context@0.0.9340-pr.4650.dc59b23 build
fb48039 billion-context@0.0.6161-pr.4650.2c2b8a6 build
502667f billion-context@0.0.6074-pr.4650.828b09d build
4e03e2b billion-context@0.0.5975-pr.4650.3686989 build
83538ee billion-context@0.0.5885-pr.4650.2dc0408 build
6ae6d77 billion-context@0.0.5818-pr.4650.4c2a214 build
381a495 billion-context@0.0.5732-pr.4650.8266404 build
9880c06 billion-context@0.0.5694-pr.4650.d5adc5b build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints [PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints Oct 25, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 重复 —— 与 PR #4651 同机制(两者都 Closes #4649)。 两个 PR 修的是同一个缺陷(#3611 诊断增强只覆盖 dsh 车道),症状、机制、失败域完全一致,只是实现路径不同。按「一个 issue 至多一个 PR」的 loop guard,#4650/#4651 只能合一个。标签: duplicate(指向 #4651)+ pr。我未关闭任何条目——关闭权在 owner。

独立审核结论:#4650 应让位于 #4651。 我对两个 diff 各自独立读过(未照抄 issue 或对方结论),#4650 有三处实质短板,而 #4651 恰好都补上了:

  1. 发布边界脱敏缺失(安全面,[PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650 的真缺陷):observedClientHintLines() 把原始 clientHint(客户端自报 UA,最长 120 字符)直接拼进 blob;而 sink 端 sendDiagnostics(src/server/admin.ts:1100)对整包没有统一脱敏——只有 conflictLogTail 与 configSectionLines 各自内部跑了 maskUrlsForPublish(redactSecretsInText(...))。本模块 PUBLISH DISCIPLINE 头注释(src/web/diagnostics.ts:20-26)明确「blob 会进公开 GitHub issue 正文,host/凭据形状无条件脱敏,即使 BILI_LOG_MASK_HOSTS=0」。UA 是受信网络内任意客户端可伪造的自由字节(bili 无鉴权),一条带 host / 凭据形状的恶意 UA 会原样落进公开正文。[PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650 的两条新测试也没钉住这条性质;[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 显式走 redactForPublish 网并有一条 "credential-shaped bytes inside a UA never reach the blob" 测试。对正常客户端(codex_cli_rs/<ver> / claude / opencode)脱敏是 no-op,不改变合法输出。
  2. 漏掉第 4 条 codex 证据签名:codex local auto-compaction detected(src/server/prepare-responses.ts:270,本地自动压缩 + ACP rebase 成功路径,[bug] Codex local auto-compaction can destroy existing bili fold substrate instead of rebasing #2372)。这是裁定「bili 是否正确处理了 codex 本地压缩」的核心证据行,[PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650 的三条模式覆盖不到;[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 四条齐全。
  3. 记录模型更弱:clientHint 只在首请求记一次且挂在会话 metadata 上,只遍历存活池(listSessions());会话被 GC / 重启后版本证据就没了。冲突报告常常事后生成,[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 的每请求进程级有界注册表(24×8 + LRU + 120 截断)对事后报告更稳。

另有一处非阻塞小瑕疵:#4650 描述写「first-seen order」,但 listSessions() 实际按 lastSeen 降序(src/session.ts:1143),其测试注释也正确写的是 lastSeen——纯措辞不准,不影响行为。

为什么不建议「修完 #4650 再合」:①②③ 都要动,等于把 #4651 已做对的三件事重做到一个注定被弃用的分支上,浪费调度;直接保 #4651 收敛更快。#4650 唯一的相对优势是「不加新模块、复用 clientHint」更省代码,但这份简洁是以丢掉发布边界脱敏为代价换来的——最小但不安全的修复劣于略多代码但正确的修复。

建议处置(待 owner 拍板,我不执行关闭):保留 #4651、关闭 #4650。若你更看重 #4650 的最小化实现,也可反过来把 #4651 的三条修正(脱敏网 + 第 4 签名 + 记录模型)搬进 #4650 后弃用 #4651——但前者返工更少。


结构化八问(针对 #4650):

  1. 是什么问题:web 面板冲突报告只认 dsh 客户端——codex 等客户端的报告里日志证据段恒为空、没有客户端版本,无法自证。
  2. 什么原因导致的:Compression conflict banner (bili v0.1.198, node v22.23.2, linux-x64) #3611 做诊断增强时整段按 dsh 车道写死——CONFLICT_LOG_PATTERNS 无 codex 签名,host 版本段只读 dsh profile bundle 且无 profile 时 early-return 把后续内容全藏掉。
  3. 影响范围与严重程度:所有非 dsh 客户端(当前主要是 codex)的冲突报告都无法自证,触发条件 = 这类客户端用户点报告按钮。内部排障工具缺陷(p3),不影响压缩行为本身、无用户可见功能回归;有手工绕行(向用户要日志 + 版本号)。
  4. 怎么修复的(策略层):不新建 UA 识别器,复用每会话 clientHint(首请求即记,codex 这类 UA 自带版本);模式表加 3 条 codex 稳定子串 + 版本段追加一行 observed client hints 并去掉藏内容的 early-return。
  5. 是否有回归问题:诊断包格式纯增量(dsh 模式表逐字保留),无 wire/config/cache/kernel 影响;但引入一处新的发布边界泄露面(见上 ①,原始 client-supplied UA 未经既有脱敏网出站)——单独看这是可就地几行修掉的点,不是致命项;它在这里的作用是加重了「[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 更优」的判断。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及(纯报告面增量)。
  8. 是否引入了新配置:不涉及(上限为内部常量)。

判定:#4650 不建议合并——与 #4651 重复,且在发布边界脱敏、证据签名完整性、记录健壮性三点上均弱于 #4651。建议由 owner 关闭 #4650、推进 #4651;关闭动作留给你。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

duplicate of #4651 —— 同症状、同机制、同根因:两者都修 src/web/diagnostics.ts 冲突报告 blob 只认 dsh 客户端的问题(issue #4649),同 base master@bd29924d4,提交时间仅差 4 分钟(本 PR 13:30:43,#4651 13:34:26)。

按「先来后到」本 PR 更早、应保留后到的关闭;但逐行对比后判定 #4651 是严格更强的实现,推荐保留 #4651、关闭本 PR:

  1. 模式覆盖:[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 有 4 条 codex 签名盖住全部 5 个日志站点;本 PR 只有 3 条,缺 codex local auto-compaction detected(prepare-responses.ts 的 bili 对 Codex 原生压缩的拦截分支在本会话没进入(貌似自己截断自己了) #3008/[bug] Codex local auto-compaction can destroy existing bili fold substrate instead of rebasing #2372 rebase 行)——那正是 orphan-reap 场景(Compression conflict banner (bili v0.1.202, node v22.22.1, linux-x64) #4648)判定「哪种压缩形态未被识别」的关键证据。
  2. 版本证据:本 PR 复用 per-session clientHint(首请求记录、只列 live 会话);[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 用进程级有界 UA 注册表(每请求记录、会话死亡后仍存活)。Compression conflict banner (bili v0.1.202, node v22.22.1, linux-x64) #4648 的目标场景恰恰是会话已被 reap——live-sessions-only 的取法在该场景下可能输出空。
  3. issue Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 自己的建议修法写的就是「服务端按客户端家族记录最近观察到的 UA(有界 map)」,即 [PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 的设计。
  4. 测试:[PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 7 个定向测试 vs 本 PR 2 个。

功能上 #4651 ⊇ 本 PR,关本 PR 不丢任何独有内容。关闭权在 owner——若你坚持严格先来后到,替代路径是把第 4 条模式 + UA 注册表移植进本分支再关 #4651(我不推荐:等于换分支名重做)。详见 #4651 的审查评论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 红了,但不是这个 PR 的锅——全部是 master 继承性失败。已把最新 ci-fixes 合入分支,残余红需要 owner 决策,本自动修复车道到此交判定。

做了什么:把 origin/ci-fixes 当前 head(12a210874)合入本 PR 分支并推送,新 head = 9880c066a。注意:此前哨兵已往本分支合过一版旧代 ci-fixes(2302db02a,基于 a11e170f7),缺最近两个修复(stale-dist mtime re-stamp、windows EBUSY teardown),本次集成后严格包含完整当前 ci-fixes。相对原 PR head(e6409e37e)的全部差异 = 恰好 7 个 ci-fixes 文件(6 个测试 + scripts/ci-pretest-cache.mjs,+102/-20),一行业务代码都没动。

逐 shard 失败清点(10 个红 job 全读日志,静态门禁全绿)——共 9 个失败签名,全部在 #4599 有档可查,无一触及本 PR 改动面(src/web/diagnostics.ts 冲突报告/client hints):

失败簇 命中 性质
issue3013 refusal(A1/A3×2) 3 shards born-red,ci-fixes 已修(本次带入)
issue2915 escalation latch 3 shards born-red,ci-fixes 已修(本次带入)
preflight cancelled auto-fold 3 shards born-red,ci-fixes 已修(本次带入)
epoch-confirm #4260 all-missing 3 shards born-red,ci-fixes 已修(本次带入)
seq-ledger-pr3(windows EBUSY teardown) 1 shard CI 基建缺陷,ci-fixes 已修(本次带入)
storage-render golden(chat) 1 shard stale kernel dist(CI cache HIT 不刷新 mtime,#4360×#3325),ci-fixes 已修(本次带入)
存储车道 7 项(full-mode restart ×4 wire / rollback / corrupt index.db / orphan cold load) 3+ shards 待 owner A/B/C 决策(#4599 floor 90),不在 ci-fixes
plugin-fork survive-new-proxy 3 shards 已知 flake(#4599 floor 98:本地两棵树均过)

八问:

  1. 是什么问题:本 PR 的 test 车道 10 个 shard 全红,但逐一核对日志后确认没有一项由本 PR 代码引起。
  2. 什么原因导致的:master(bd29924d4)自身就是红的——born-red 测试簇 + 两个 CI 基建缺陷(cache HIT 带出旧 kernel dist、windows 拆卸 EBUSY);修复都收敛在 ci-fixes 哨兵分支上,而本分支此前只合到旧代 ci-fixes。
  3. 影响范围与严重程度:影响所有从该 master 切出的在途 PR(不止这一个);对本 PR 功能零影响(静态门禁全绿,失败无一落在改动面)。严重程度:CI 暂不能作为合并门禁,直到存储簇有 owner 决策。
  4. 怎么修复的:按 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 既定收敛流程 merge 当前 ci-fixes head 进 PR 分支并推送;本分支不做任何自修(禁止在自身分支重复修 master 级失败)。
  5. 是否有回归问题:无。带入的差异纯为测试与 CI 脚本,不改业务行为、不改默认值/阈值/输出格式。
  6. 是否破坏缓存:不影响前缀缓存与会话存储策略;改的是 CI 侧 dist mtime 处理(修掉的正是「cache HIT 载入旧 dist」这个失效源)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

收工判定:本车道已完成其职责(cifixes 合入 + 推送 + #4599 报备),判定为继承性失败,停止等待重跑结果。重跑后预期残余红 = 存储车道 7 项(需 owner 在 #4599 拍板 A/B/C)+ plugin-fork flake;这两类都不属于本自动修复车道可处理的小修范畴。若 owner 拍板后存储簇进 ci-fixes,再走一轮 help-merge 即可转绿。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

补了两个提交(分支已同步到当前 master,此前 behind):

  1. 94f4070c5 — merge origin/master(无冲突,纯追平);

  2. 381a49577 — fix(web): conflict report captures the orphan-reap verdict and OpenAI-lane codex detection (Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649, Compression conflict banner (bili v0.1.207, node v24.21.0, win32-x64) #4688):新来的家族报告 Compression conflict banner (bili v0.1.207, node v24.21.0, win32-x64) #4688(纯 orphan-reap、clients 未解析)暴露了本 PR 覆盖范围内的一个残留缺口——CONFLICT_LOG_PATTERNS 没有收录 [Bug][proxy] unframed host-side history deletion leaves zombie fold blocks rendering carriers forever — one carrier flaps in/out every turn (persistent prefix-cache churn) #2695 收割日志签名 zombie fold reap,所以纯 orphan-reap 的报告即使日志里有该行,证据段也恒为空。本提交补两条签名:

    同提交带回归测试(tests/web-diagnostics-enrichment.test.ts 新增一条:两个签名均被捕获 + 无关行仍被排除,双向断言)。

    验证:定向套件 9/9 绿(本地),typecheck 干净;全量以 CI 为准。属 Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 同一失败域(报告证据覆盖),不另开 issue/PR。合并本 PR 后,Compression conflict banner (bili v0.1.207, node v24.21.0, win32-x64) #4688 这类报告将自带收割证据行 + observed client hints,triage 不再需要用户手挖日志。

ci-check added 3 commits November 12, 2026 22:44
PR #4650 and the already-merged #4651 both modified the same #4649 lines
(non-dsh client conflict-report coverage). Resolution:
- #4649 content resolved to master's UA-registry implementation
  (observedUaLines / recentClientUas / OBSERVED_UA_LINES) — the PR's
  clientHint-based variant is superseded by #4651.
- Preserved this PR's unique contribution: the client-agnostic
  'zombie fold reap' (#2695) signature in CONFLICT_LOG_PATTERNS (#4688)
  and its regression test (converted to the now-async buildDiagnostics API).
- Dropped the two clientHint #4649 tests (redundant with master's
  dedicated tests/issue4649-conflict-report-client-coverage.test.ts) and
  the now-unused session import.

Net diff vs master: the #4649 doc comment + zombie-reap pattern + #4688 test.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed. PR #4650 is now clean against master (merge state no longer dirty).

What I did

  1. Merged origin/master into the PR branch 2026-10-25_conflict-report-client-coverage. The conflict was in exactly 2 files: src/web/diagnostics.ts (5 regions) and tests/web-diagnostics-enrichment.test.ts (1 region).
  2. Root cause: this PR ([PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650) and the already-merged [PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 both modified the same Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 lines (non-dsh client conflict-report coverage). [PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651's version is what's currently on master.
  3. Resolution:
  4. Master churned 3× while I worked (9674cfa → 0d94a8a → 259cd87, ~85 commits). None of the new commits touched my 2 files, so I merged the latest master in cleanly each time. Final PR contribution vs master = 2 files, +38 lines only.
  5. Verified: targeted tests 14/14 green (web-diagnostics-enrichment + issue4649-conflict-report-client-coverage), typecheck clean. CI on the first push (da6ae14) already passed all 30 checks (0 failed, 0 pending).

Note for the reviewer: this PR's main #4649 work is already on master via #4651 — the only net-new content is the zombie fold reap pattern + #4688 test. Master is churning fast, so the PR may show "behind" again before a human merges it; the conflict itself is resolved.


八问(中文结论)

  1. 是什么问题:PR [PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650 与 master 冲突(merge state dirty),无法合并。
  2. 什么原因导致的:本 PR([PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints #4650)与已合入 master 的 [PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 改了同一批 Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 行(非 dsh 客户端冲突报告覆盖),两边实现不同(clientHint vs UA-registry),产生文本冲突。
  3. 影响范围与严重程度:仅阻塞本 PR 合并;不影响任何线上行为。严重程度:低(纯合并阻塞,非功能缺陷)。
  4. 怎么修复的:把 master 合入 PR 分支;Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 内容一律取 master 的 UA-registry 实现(本 PR 的 clientHint 版被 [PR] fix(web): conflict reports cover non-dsh clients — codex log signatures + observed client UAs #4651 取代);保留本 PR 唯一独有贡献——zombie fold reap([Bug][proxy] unframed host-side history deletion leaves zombie fold blocks rendering carriers forever — one carrier flaps in/out every turn (persistent prefix-cache churn) #2695)签名 + Compression conflict banner (bili v0.1.207, node v24.21.0, win32-x64) #4688 回归测试(转成 master 的 async buildDiagnostics API);删掉与 master 专属测试文件重复的 2 个 clientHint 测试和失效的 session import。
  5. 是否有回归问题:无。Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 实现完全采用 master 版本(零行为漂移);新增仅一行日志签名 + 一个测试,不触碰既有路径。定向测试 14/14 绿、typecheck 干净、CI 全绿。
  6. 是否破坏缓存:不涉及(纯 web 诊断报告 + 测试,无缓存/重试/游标/去重键)。
  7. 是否改了设计方向:不涉及(沿用 master 既有 UA-registry 设计,未引入新方向)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。

判定:冲突已解决,PR 可合并。 提醒:本 PR 主体 #4649 已由 #4651 合入,净新增仅 zombie-reap 签名 + #4688 测试;master 变动快,人工合并前 PR 可能再次显示 behind,但冲突本身已清。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

APPROVE — the actual diff is small, correct, and safe. One flag: the PR body is stale and over-describes the scope (details below).

What this PR actually changes (2 files, +38/-0)

  • src/web/diagnostics.ts: adds "zombie fold reap" to CONFLICT_LOG_PATTERNS (+ doc comments).
  • tests/web-diagnostics-enrichment.test.ts: adds one test (#4688 orphan-reap report carries the reap verdict and the OpenAI-lane codex detection).

The codex compaction signatures and the "observed client hints" section that the body's headline describes are already on master — they landed via a separate PR (#4651); this branch's history shows the rebase that absorbed it (da6ae143 merge origin/master: resolve #4649 conflict with already-merged #4651). So this PR's real remaining contribution is the zombie fold reap pattern, which fixes the empty evidence section for orphan-reap conflict reports (#4688).

Correctness

  • "zombie fold reap" is a stable substring of the one real log line: src/session.ts:1987 (… zombie fold reap: removed … block(s) (…) from ACP state; blockContents retained, refs pruned to live ids (#2695)). I grepped src/ — that is the only zombie fold reap line (the zombieStreak lines in src/session-self-heal.ts are a different mechanism: plugin-lane degradation, not orphan-reap).
  • The new test pins both directions (reap line + OpenAI-lane codex line captured; unrelated [acp-usage] line excluded). I ran it locally on this head: web-diagnostics-enrichment 7/7 and web-storage-diagnostics-redaction 5/5 pass.

Regression

None. Adding a pattern is purely additive — it only makes the conflict tail match one more line. No existing pattern is touched; no wire/protocol/config/cache/kernel impact. The redactForPublish publish discipline is unchanged.

⚠️ Stale PR body (flag for the author, not a code defect)

The body's "Changes" / "Behavior-change disclosure" present the codex signatures + client hints as this PR's work, and "Verification" claims "8/8" + "two new #4649 tests." None of that matches the actual diff: the codex signatures and the recentClientUas/hostClientVersionLines section are already on master (via #4651); the enrichment file has 7 tests (not 8); the diff adds one #4688 test (not two #4649 tests). This doesn't block the merge (the code is correct and the described behavior is already shipped), but the body should be trimmed to the actual scope so the next reviewer isn't misled. I can't edit the PR body from the review lane, so flagging here.


结构化八问

  1. 是什么问题:orphan-reap(僵尸折叠块回收)类冲突报告里「recent conflict-related log lines」段恒为空——报告自己报的事件,它的日志证据段却一条都抓不到,triage 只能回头手工捞日志。
  2. 什么原因导致的:CONFLICT_LOG_PATTERNS 里没有任何能匹配 zombie fold reap 日志行(src/session.ts:1987)的签名,conflict tail 对该行天然失明。
  3. 影响范围与严重程度:仅影响 web 面板生成的 orphan-reap 冲突报告的可诊断性(效率/体验问题,不影响压缩正确性、不影响用户可用性);触发条件 = 纯 orphan-reap 账本(无 plugin 事件、无 dsh/codex 框架)的报告。p3 级。
  4. 怎么修复的:向 CONFLICT_LOG_PATTERNS 追加一条稳定子串 "zombie fold reap"(与 src/session.ts:1987 的日志行逐字对应),让 conflict tail 能抓到该行;并加一个定向测试钉住「回收判决行 + OpenAI 车道 codex 检测行被捕获、无关行被排除」两个方向。
  5. 是否有回归问题:无。纯追加一条 pattern,不动任何既有 pattern,不改 wire/协议/配置/缓存/kernel;redactForPublish 的发布脱敏纪律不变,redaction 套件 5/5 仍绿。
  6. 是否破坏缓存:不涉及(诊断 blob 组装,无缓存/重试/游标/去重键)。
  7. 是否改了设计方向:不涉及(仅宿主侧 src/web/ 报告面,无架构/边界/数据流转向)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。

判定:可合(代码正确、安全、有测试钉住;PR 正文过期,建议作者收敛到实际范围,但不阻塞)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Verdict: APPROVE — posted as a COMMENT review (GitHub blocks APPROVE on a self-authored PR; the token is the author). Full review + 8问 in the Reviews tab: #4650 (review)

What this PR actually changes (2 files, +38/-0): adds "zombie fold reap" to CONFLICT_LOG_PATTERNS (src/web/diagnostics.ts) + one test (tests/web-diagnostics-enrichment.test.ts, the #4688 orphan-reap empty-evidence fix). The codex compaction signatures + "observed client hints" the body's headline describes are already on master via #4651 — the branch history shows the rebase that absorbed it (da6ae143 merge origin/master: resolve #4649 conflict with already-merged #4651). So this PR's real remaining contribution is the zombie fold reap pattern.

Verified: the pattern is a stable substring of the one real log line (src/session.ts:1987; grepped src/ — it's the only such line); targeted suites pass locally on this head (enrichment 7/7, redaction 5/5); no regression (purely additive pattern — no wire/protocol/config/cache/kernel impact, redactForPublish discipline unchanged).

⚠️ Flag for the author (not a code defect, doesn't block): the PR body is stale — it presents the already-shipped codex/client-hint work as this PR's, and "Verification" claims "8/8" + "two new #4649 tests" when the enrichment file has 7 tests and the diff adds one #4688 test. The body should be trimmed to the actual scope. I can't edit the PR body from the review lane, so flagging here.


结构化八问

  1. 是什么问题:orphan-reap(僵尸折叠块回收)类冲突报告里「recent conflict-related log lines」段恒为空——报告自己报的事件,它的日志证据段却一条都抓不到,triage 只能回头手工捞日志。
  2. 什么原因导致的:CONFLICT_LOG_PATTERNS 里没有任何能匹配 zombie fold reap 日志行(src/session.ts:1987)的签名,conflict tail 对该行天然失明。
  3. 影响范围与严重程度:仅影响 web 面板生成的 orphan-reap 冲突报告的可诊断性(效率/体验问题,不影响压缩正确性、不影响用户可用性);触发条件 = 纯 orphan-reap 账本(无 plugin 事件、无 dsh/codex 框架)的报告。p3 级。
  4. 怎么修复的:向 CONFLICT_LOG_PATTERNS 追加一条稳定子串 "zombie fold reap"(与 src/session.ts:1987 的日志行逐字对应),让 conflict tail 能抓到该行;并加一个定向测试钉住「回收判决行 + OpenAI 车道 codex 检测行被捕获、无关行被排除」两个方向。
  5. 是否有回归问题:无。纯追加一条 pattern,不动任何既有 pattern,不改 wire/协议/配置/缓存/kernel;redactForPublish 的发布脱敏纪律不变,redaction 套件 5/5 仍绿。
  6. 是否破坏缓存:不涉及(诊断 blob 组装,无缓存/重试/游标/去重键)。
  7. 是否改了设计方向:不涉及(仅宿主侧 src/web/ 报告面,无架构/边界/数据流转向)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。

判定:可合(代码正确、安全、有测试钉住;PR 正文过期,建议作者收敛到实际范围,但不阻塞)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

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

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence

1 participant