Repository navigation
[PR] feat: conflict report covers non-dsh clients — codex compaction log signatures + observed client hints - #4650
ranxianglei wants to merge 14 commits into
Conversation
…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
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9359-pr.4650.e4cebbaThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4650.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 重复 —— 与 PR #4651 同机制(两者都 独立审核结论:#4650 应让位于 #4651。 我对两个 diff 各自独立读过(未照抄 issue 或对方结论),#4650 有三处实质短板,而 #4651 恰好都补上了:
另有一处非阻塞小瑕疵:#4650 描述写「first-seen order」,但 为什么不建议「修完 #4650 再合」:①②③ 都要动,等于把 #4651 已做对的三件事重做到一个注定被弃用的分支上,浪费调度;直接保 #4651 收敛更快。#4650 唯一的相对优势是「不加新模块、复用 clientHint」更省代码,但这份简洁是以丢掉发布边界脱敏为代价换来的——最小但不安全的修复劣于略多代码但正确的修复。 建议处置(待 owner 拍板,我不执行关闭):保留 #4651、关闭 #4650。若你更看重 #4650 的最小化实现,也可反过来把 #4651 的三条修正(脱敏网 + 第 4 签名 + 记录模型)搬进 #4650 后弃用 #4651——但前者返工更少。 结构化八问(针对 #4650):
判定:#4650 不建议合并——与 #4651 重复,且在发布边界脱敏、证据签名完整性、记录健壮性三点上均弱于 #4651。建议由 owner 关闭 #4650、推进 #4651;关闭动作留给你。 |
(ai: vllm-qwen/qwen3.8-27b) CI 红了,但不是这个 PR 的锅——全部是 master 继承性失败。已把最新 ci-fixes 合入分支,残余红需要 owner 决策,本自动修复车道到此交判定。 做了什么:把 逐 shard 失败清点(10 个红 job 全读日志,静态门禁全绿)——共 9 个失败签名,全部在 #4599 有档可查,无一触及本 PR 改动面(
八问:
收工判定:本车道已完成其职责(cifixes 合入 + 推送 + #4599 报备),判定为继承性失败,停止等待重跑结果。重跑后预期残余红 = 存储车道 7 项(需 owner 在 #4599 拍板 A/B/C)+ plugin-fork flake;这两类都不属于本自动修复车道可处理的小修范畴。若 owner 拍板后存储簇进 ci-fixes,再走一轮 help-merge 即可转绿。 |
…help-merge sweep)
…help-merge sweep)
…help-merge sweep)
…help-merge sweep)
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.
(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
Note for the reviewer: this PR's main #4649 work is already on master via #4651 — the only net-new content is the 八问(中文结论)
判定:冲突已解决,PR 可合并。 提醒:本 PR 主体 #4649 已由 #4651 合入,净新增仅 zombie-reap 签名 + #4688 测试;master 变动快,人工合并前 PR 可能再次显示 behind,但冲突本身已清。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(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"toCONFLICT_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 greppedsrc/— that is the onlyzombie fold reapline (thezombieStreaklines insrc/session-self-heal.tsare 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-enrichment7/7 andweb-storage-diagnostics-redaction5/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.
结构化八问
- 是什么问题:orphan-reap(僵尸折叠块回收)类冲突报告里「recent conflict-related log lines」段恒为空——报告自己报的事件,它的日志证据段却一条都抓不到,triage 只能回头手工捞日志。
- 什么原因导致的:
CONFLICT_LOG_PATTERNS里没有任何能匹配zombie fold reap日志行(src/session.ts:1987)的签名,conflict tail 对该行天然失明。 - 影响范围与严重程度:仅影响 web 面板生成的 orphan-reap 冲突报告的可诊断性(效率/体验问题,不影响压缩正确性、不影响用户可用性);触发条件 = 纯 orphan-reap 账本(无 plugin 事件、无 dsh/codex 框架)的报告。p3 级。
- 怎么修复的:向
CONFLICT_LOG_PATTERNS追加一条稳定子串"zombie fold reap"(与src/session.ts:1987的日志行逐字对应),让 conflict tail 能抓到该行;并加一个定向测试钉住「回收判决行 + OpenAI 车道 codex 检测行被捕获、无关行被排除」两个方向。 - 是否有回归问题:无。纯追加一条 pattern,不动任何既有 pattern,不改 wire/协议/配置/缓存/kernel;
redactForPublish的发布脱敏纪律不变,redaction 套件 5/5 仍绿。 - 是否破坏缓存:不涉及(诊断 blob 组装,无缓存/重试/游标/去重键)。
- 是否改了设计方向:不涉及(仅宿主侧
src/web/报告面,无架构/边界/数据流转向)。 - 是否引入了新的配置:不涉及(无新 env/config/默认值)。
判定:可合(代码正确、安全、有测试钉住;PR 正文过期,建议作者收敛到实际范围,但不阻塞)。
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Verdict: APPROVE — posted as a COMMENT review (GitHub blocks What this PR actually changes (2 files, +38/-0): adds Verified: the pattern is a stable substring of the one real log line ( 结构化八问
判定:可合(代码正确、安全、有测试钉住;PR 正文过期,建议作者收敛到实际范围,但不阻塞)。 |
[ework] CI fix verified green ✓ |
Closes #4649
Background
The #3611 diagnostics enrichment was dsh-only:
CONFLICT_LOG_PATTERNSheld no codex signature and thehost client versionssection 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
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.
Observed client hints (
hostClientVersionLines): the section now also lists the distinctsession.metadata.clientHintvalues 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:
--- host client versions ---listed dsh profiles only; on non-dsh machines the section ended at "no profiles under DSH_HOME".observed client hints (N distinct, live sessions): …is appended whenever live sessions carry clientHints; byte-identical output otherwise.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
tests/web-diagnostics-enrichment.test.ts8/8 (two new Conflict report blob only recognizes dsh clients — codex reports ship without client version or log evidence #4649 tests pin both directions: pattern match + negative exclusion, dedupe, no-profile case),tests/web-storage-diagnostics-redaction.test.ts5/5,npm run typecheckclean. Full suite = CI on this head.feat-class change (new reporting surface) → human review lane, not auto-merge.