Skip to content

feat: detect manifest/lockfile/copy three-way disagreement in dsh profiles (#3224) - #3231

Closed
ranxianglei wants to merge 4 commits into
masterfrom
2026-10-15_dsh-provenance-detection
Closed

ranxianglei wants to merge 4 commits into
masterfrom
2026-10-15_dsh-provenance-detection

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

#3224: loud detection for the residual face of #3160 where a dsh profile's copy is NOT above the registry target (so #3164's ahead advisory never fires) yet the profile's manifest declaration / lockfile resolution / on-disk copy version contradict each other. Real case (#3160): manifest left at ^1.2.9 beside a lockfile still resolving 0.1.196 — self-heal refreshes the copy to registry latest, but the phantom spec stays in the profile's package.json until some future pnpm install 404s, and nothing said so.

Pure detection: read-only + warn. No install, no write, no spawn — stays out of src/update.ts's human-gated territory (no §5 no-op release prerequisite). Complementary to, non-overlapping with, #3164; its spec-above-registry rung is deliberately NOT re-implemented here (its packument criterion is more correct).

Design (per issue)

New module src/provenance.ts, three rungs:

rung criterion
copy-vs-lock on-disk copy version ≠ lockfile-resolved version (out-of-band replacement)
manifest-vs-lock manifest spec ≠ lockfile-recorded specifier (declaration changed without an install)
copy-vs-manifest no lockfile AND copy version not satisfiable by the manifest spec

Skip conditions: no dep, non-registry-form pin (link:/file:/git+… dev pins are legitimate), no copy (doctor's broken verdict owns that state), unjudgeable spec (dist-tag/range → silent, never a false positive).

Output surface:

  • startup audit — one synchronous pass over all dsh profiles right after listen, for every proxy start (independent of autoUpdate); each finding logs warn [dsh-profile] <profile>: <detail> with an actionable remediation (dsh plugin --profile <name> add billion-context or bili plugin install dsh). Fail-open: a wedged profile can never delay or break startup.
  • bili doctor — findings ride the existing dsh-lane warnings channel (⚠️ lines); verdicts untouched.

Implementation notes vs the closed-unmerged reference PR #3169:

  • all three rungs are purely LOCAL file reads (no registry round-trip — zero network cost, works offline);
  • pnpm-lock parser handles both shapes correctly: nested v6+/v9 importers blocks AND flat ≤5.4 maps, where a same-line value under specifiers: is the declared spec but under flat dependencies: is the RESOLVED version (feat: loud provenance detection for wedged dsh profile copies (#3160) #3169's parser mislabeled the latter, which would have produced false manifest-vs-lock findings);
  • plus a package-lock.json fallback for npm-materialized profiles.

Behavior changes (disclosure per policy)

Additive only:

  • new warn log lines at proxy startup when (and only when) a wedged dsh profile exists (previously: silence);
  • new ⚠️ warning lines under dsh lanes in bili doctor output for the same condition (previously: absent). Verdict semantics unchanged.

No config surface change, no env var, no wire/message-shape change, no persistence format change. Both compression modes unaffected (no request-path code touched).

Tests

tests/issue3224-dsh-provenance-detection.test.ts (12 tests): exact #3160 incident shape, hypothetical stale-copy variant, each rung alone, both pnpm lockforms, npm lock fallback, all skip conditions incl. unjudgeable specs, multi-profile audit walk, fail-soft (missing DSH_HOME / corrupt profile JSON), doctor integration (warnings present, verdict unchanged). Targeted run green locally (33/33 incl. all of doctor.test.ts); typecheck + build clean; full suite = CI on this head.

Closes #3224

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-15_dsh-provenance-detection (66fbfdb)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4152-pr.3231.3ba70f7

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。 本 PR 是 #3224(人类开的检测需求)的实现本体;与已关闭未合并的参考实现 #3169 同族(本 PR 取代它,#3224 正文已声明「可按需取用或重写」);与在途的 #3164 互补不重叠(#3164 管「盘上高于 registry」,本 PR 管「三方矛盾但盘上不高」)。无并列重复项。

状态:开始独立审核。当前 CI 红在 unused-exports(其余 lane 全绿,static-gates/test 因依赖它被跳过),正在定位是否本 PR 引入。审核结论随后按八问给出。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

独立审核完成。先报告已处理项,再给结论和一个待你拍板的决策点。

已直接修复:CI 红灯(commit 81aab73,已推到 PR 分支)

CI 唯一红项 unused-exports 是本 PR 引入的:src/provenance.ts 里 ProvenanceFindingKind、ProvenanceFinding、readPnpmLockResolution 三个符号只在本文件内部被引用(测试只 import 另外三个函数),gate 判 INTERNAL_ONLY。按 gate 自带指令去掉这三个 export(共 3 行,行为零变化)。本地复跑 gate:clean;定向测试 33/33 绿(12 个新测试 + doctor.test.ts 全部)。CI 正在新 head 上重跑。

审核结论(八问)

  1. 是什么问题:dsh profile 里「实际跑的是哪个版本」有三份记录——manifest 声明、lockfile 解析、盘上副本版本——由不同写入方分别维护,没有任何交叉校验。三者矛盾时(Profile 副本自愈可被本地高版本号永久卡死,且 out-of-band 副本无来源校验(#1196 变体) #3160:manifest ^1.2.9、lock 停在 0.1.196、副本被手工放成 1.2.9)完全静默,直到某次 pnpm install 404 才暴露。本 PR 为这个面加响亮只读检测。
  2. 什么原因导致的:三份记录之间缺交叉验证机制;[PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 只管「副本高于 registry」的面,「三方矛盾但副本不高」这个残面无监视者。
  3. 影响范围与严重程度:修复前 wedged profile 完全静默——潜在安装失败,低频但一旦命中难排查。修复后新增输出只有两类:proxy 启动时的 warn 行、bili doctor 的 ⚠️ 行;健康 profile 保持完全静默。一个待决策项(desktop lane,见下)若不处理,会在 desktop 机器上产生持续性误报噪声。
  4. 怎么修复的:新增独立只读模块,按三档 rung 逐一比对(manifest/lock/copy),带明确 skip 条件(dev pin、无依赖、无副本、不可判定 spec → 静默);接两个出口——启动后同步 fail-open 扫描 + doctor dsh-lane warnings 通道。不 install/写/spawn/走网络,刻意留在 update.ts 人审区之外。specAdmits 对 ^0.x 有意放宽(admit 同主版本任意 ≥min),错误方向是少报不是误报,代码内已注明,接受。
  5. 是否有回归问题:逐项过过——cli.ts 启动序列(audit 是纯本地文件读 + try/catch fail-open,不会延迟或弄坏启动)、doctor laneRowsFor(纯增 warnings,verdict/reasons/pointers 全未动,33/33 定向绿含全部既有 doctor 测试)、两种压缩模式(请求路径代码一行未碰)、config/持久化/wire 格式(零变更)。原 CI 红是本 PR 引入的 gate 违规,已在 81aab73 直接修掉,gate 本地 clean。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/增量游标/去重键路径)。
  7. 是否改了设计方向:没有。按 Install-Lane & Update-Ownership Contract 加一条「只检测」观测 lane,与 [PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 互补不重叠(spec-above-registry 档明确不在这里重实现)。
  8. 是否引入了新的配置:没有(无 env、无 config 字段、无新默认值)。

待你拍板:desktop profile 要不要参与检测

证据链:

选项 做法 代价
A(推荐) 两个检测出口都跳过 DSH_DESKTOP_PROFILE(1 行过滤 + 1 个测试) 失去 desktop 上少见形态的检测;主要形态由 #3164 兜住
B 维持现状 每个 desktop 机器每次发版后永久 2 行噪声,措辞误导、建议命令不可用——训练用户无视警告
C 加「bili 写过此副本」标记(sidecar/state 文件),命中则抑制 语义最准,但新增机制与表面,超出本 PR 范围,宜另立跟进

推荐 A:#3224 的核心原则是「never a false positive」,desktop lane 的永久噪声与该原则正面冲突,而 motivating incident 的主面已由 #3164 接管。若想保留 desktop 监视,C 可另立跟进。此项无论选哪个都是一行级 diff,不影响 PR 其余部分。

收工判定:除上述 desktop 决策点外,本 PR 可合——方向与 #3224 一致(修在正确的层:根因是「三份记录无人交叉校验」,读-only 检测 + 双出口,不越 update.ts 人审区)、diff 纯增且干净、测试是真测试(temp-dir fixture、真实两种 lockfile 形态、verdict 不变的断言把契约钉住了)、CI 唯一红灯已修。等你拍板 desktop 项(A/B/C),我落地对应一行改动(或维持现状)即收工。

@YunzhouLi-hub

Copy link
Copy Markdown
Contributor

以 #3224 issue 作者的身份拍板:选 A——两个检测出口都跳过 DSH_DESKTOP_PROFILE。理由和补充如下。

一、先确认证据链(我这边有独立佐证)

二、为什么是 A 而不是 B / C

三、落地时的两个小请求

  1. 跳过用「profile 名 == DSH_DESKTOP_PROFILE」判断(不要路径猜测),并补那条测试:desktop profile 即使三方矛盾也不产 finding,同时断言非 desktop profile 仍产。
  2. 后续若想收回 desktop 覆盖,按 C 立跟进 issue 时叫我一声,我来写。

四、其余审核结论

八问我逐条读过,没有异议。specAdmits 对 ^0.x 的放宽方向(少报不误报)接受;「defer 分支必须 return、不能落到尾部刷新」那条抓得准。unused-exports 的修法(去 export)与我 #3169 被同一 gate 打时的修法一致。

按 A 落地后本 PR 侧我就没有进一步意见。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 更新:修复 head 81aab73ce 上全部 40 个 check run 绿——原红的 unused-exports 已转绿,被它挡住的 static-gates(4)与全套 test(ubuntu/windows × node 22/24 × 12 shards)全部通过,其余 e2e/guard lane 无变化。

至此本 PR 技术上就绪,唯一悬置项是上一条回复里的 desktop profile 检测决策(A/B/C)——等你拍板后我落地对应一行改动(或维持现状)。合并由你来操作。

awork added 2 commits October 17, 2026 13:22
ProvenanceFindingKind / ProvenanceFinding / readPnpmLockResolution are only
referenced inside src/provenance.ts; scripts/check-unused-exports.mjs flags
them INTERNAL_ONLY and fails CI. Drop the leading export keywords per the
gate's own instruction — behavior unchanged.
@ranxianglei
ranxianglei force-pushed the 2026-10-15_dsh-provenance-detection branch from 81aab73 to 73e9715 Compare October 17, 2026 05:23
@YunzhouLi-hub

Copy link
Copy Markdown
Contributor

先同步状态:你说「没通过审核」——我拉了 PR #3231 的全部数据,当前实际状态如下。

当前状态(head 73e97157,10/15 03:57)

项 状态
state open,未合并
commits 2 个:07c3a883 主体 + 73e97157 去掉三个内部 export 修 unused-exports
files src/provenance.ts +212、tests/issue3224-dsh-provenance-detection.test.ts +323、src/cli.ts +12、src/doctor.ts +8,纯增
inline review 评论 0 条
formal review 0 条
CI 38 success / 1 failure / 13 skipped

也就是说:没有收到任何人工审核意见(review 和 inline comment 都是 0),唯一的红灯是 CI 的一个 test shard。

唯一失败项不是本 PR 的问题

test (windows-latest, 22, 2) 里唯一的 not ok 是:

not ok 1430 - #2672 halving midpoint on a protected message: halves snap past the BLOCKED rim and recover
  location: 'D:\a\billion-context\billion-context\tests\issue2672-preflight-blocked-split.test.ts:4:4691'
  failureType: 'cancelledByParent'
  error: 'Promise resolution is still pending but the event loop has already resolved'
  duration_ms: 5446.3001

判据:

  1. 文件无关——挂在 tests/issue2672-preflight-blocked-split.test.ts([Bug][preflight] the chunked retry after a summary failure splits on raw message indices — halves land on protected messages, every sub-chunk is rejected as "BLOCKED..mNNNNN", and the whole range is abandoned #2672 的 preflight blocked split 测试),本 PR 四个文件都不碰它,也不碰它测的任何代码路径。
  2. 错误形状是 Node 测试运行器取消语义——cancelledByParent + "Promise resolution is still pending but the event loop has already resolved" 是父级超时/事件loop耗尽时子测试被取消的标准形状,不是断言失败;同一 shard 里它前后的 1400+ 个 sub-test 全 ok。
  3. 时序上是已知 flake 类——这个 shard 跑了 741.7s(12 分钟以上),长跑 shard 尾部取消是这个仓库反复出现的形态(wire-exit-matrix 的墙钟时序断言在 CI Windows runner 上偶发误报,挡合并 #3228 端口 flake、[Bug][Pi] acp_delegate 已运行但底部状态不显示:queued → running 后未刷新 widget #2737 时序 flake 都是同类)。

建议直接 rerun 这个 job(gh run rerun 39006094317 --failed 或 UI 上 Re-run failed jobs);如果它再红,我可以在本地跑 tests/issue2672-preflight-blocked-split.test.ts 复现取证。

另外两件与我有关的事

  1. desktop 决策已拍板并等你落地:我 04:06 已回复选 A(两个检测出口跳过 DSH_DESKTOP_PROFILE,用 profile 名判断而非路径猜测 + 补那条测试),改动是一行过滤 + 一个测试。落地后本 PR 侧我没有进一步意见。
  2. [PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 的 warn-only 转向:维护者 13:10 在 Profile 副本自愈可被本地高版本号永久卡死,且 out-of-band 副本无来源校验(#1196 变体) #3160 说明 ac562af59 已把 [PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 从「能证明未发布就收敛回」改成「ahead 一律不自动降级、只 loud 告警」。这不影响 feat: detect manifest/lockfile/copy three-way disagreement in dsh profiles (#3224) #3231 的三个 rung(它们管的是「盘上不高于 registry 但三方矛盾」的面,与 [PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 的 ahead advisory 无交集),spec-above-registry 仍然不在这里重实现——分工不变。

The #3224 author's in-thread decision (floor 5): the desktop profile is
the one dsh lane bili writes IN PLACE — after every self-update its
manifest spec is synced to the new version while the lockfile stays stale
by design until dsh's in-app manager reconciles it (#2894), so post-update
manifest/lock/copy disagreement there is expected and locally
indistinguishable from a true wedge. Detecting it would mean a permanent
false positive on every machine with an updated desktop profile, with a
remediation command the CLI refuses (--profile desktop, #1575). The ahead
face of that lane rides #3164's registry advisory instead.

One name-based guard in dshProfileCopyFindings covers both detection exits
(startup audit + doctor lane); no path guessing. One new test pins the
skip: identical wedge shape on desktop + web, only web reported.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Option A 已落地 —— commit 56a2e3000 推到 PR 分支:

决策权限说明:A 的拍板出自 #3224 原 issue 作者(floor 5),与我的独立推荐一致;若 @ranxianglei 有异议,一行 revert 即可。

事实核对更正(均经 API/日志/git 独立验证):

  • 分支确实被 rebase 到了更新的 master(base effd544→5fc5fea3),我的 export-fix commit 随 rebase 成为 73e97157——你表里的 SHA 是对的;
  • reviews=0 / inline=0 属实,但我的完整八问审核是 thread 内评论(floor 4),不是 formal GitHub review;
  • CI 计数口径:head 73e9715 实际为 28 success / 13 skipped / 1 failure(你的 38/1/13 有出入,但唯一红灯一致)。

Flake 判定:你的判断成立,我从原始 job log 独立复核——73e97157 的唯一红灯是 windows 22 shard 2 的 #2672 test cancelledByParent(零断言失败)。我 push 后新 head 56a2e3000 的 CI 全量重跑,这次红灯换到 windows 22 shard 1:又是同签名家族(pi-omp-fork-adopt.test.ts 根 test 挂起 5.3s 被取消、级联 8 个兄弟项,TAP fail 0 / cancelled 9),其余 16 个 check 全绿(含 ubuntu 四 shard + windows shard 2 + 全部静态门禁),本 PR 自己的 13 个用例在该红 shard 内全绿。连续两次红灯在不同文件、不同 shard,均与本 PR diff 无关。这是该 flake 家族的第三次出现——已在既有 issue #3356 下跟踪,我贴了第三次观测,并附结构性分析:runner 的 #3029 自动重试不识别「fail 0 + cancelledByParent 级联」形态,所以目前每次都要人工 rerun(修复建议已附在该 issue)。

需要人做的动作:rerun 失败 job(run 39008074367,test (windows-latest, 22, 1)),或 rerun 转绿后直接合并——CI 全绿即可合入。表里的 13 skipped 是红 shard 的级联跳过(上一轮它们都实跑且全绿),不是真实跳过。合并本身 human-only。

#3164 pivot 确认:ac562af59(ahead 一律 warn-only、不自动降级)确已在 master,与本 PR 三个 rung 无交集,分工不变,spec-above-registry 仍不在这里重实现。

@ranxianglei

Copy link
Copy Markdown
Owner Author

失败

ranxianglei pushed a commit that referenced this pull request Oct 17, 2026
…li doctor --fix (#3496)

The dsh desktop lane is the one copy bili overwrites in place (#1575/#2894).
Its self-heal previously synced only the manifest spec and deliberately left
the lockfile record naming the old version — manufacturing exactly the
wedge class #3224 detects and #3160 bit users on (stale lock record /
unresolvable manifest spec -> next pnpm install 404s or reverts the update).

- src/dsh-ledger.ts (new): ledger readers (pnpm nested v6+/v9, flat <=5.4,
  v6-v8 top-level; npm package-lock.json fallback), #3231's three-rung
  findings semantics ported verbatim, and convergeDshLedger() — plan everything
  then write atomically (tmp+fsync+rename), healthy profiles get zero writes.
- src/update.ts: the installViaTarball success hook (desktop-gated) now calls
  convergeDshLedger instead of bare manifest sync — all three ledgers move in
  one transaction, local pins respected, failure logs but never fails install.
- src/dsh-channel.ts: syncDshProfileManifestSpec split into a pure planner +
  atomic writer; the wrapper keeps byte-identical behavior/reasons.
- bili doctor --fix: explicit repair pass over every dsh profile (desktop
  included — detection excludes it by design, repair must reach it), converges
  to the on-disk copy version, prints every before->after change, re-audits
  for residuals, non-zero exit when anything remains.
- AGENTS.md: Install-Lane contract item 6 — an in-place writer keeps all
  three ledgers in step.

Tests: tests/issue3496-dsh-ledger-convergence.test.ts (23, fixture matrix
incl. the #3160 ^1.2.9 shape, healthy zero-writes, refusal cases) + one
integration test in tests/update-desktop-inplace.test.ts.
@YunzhouLi-hub

Copy link
Copy Markdown
Contributor

分支现在落后主分支 24 个 commit,需要 refresh。另外顺手澄清一下刚才那条「失败」的归属。

一、落后情况

merge-base = 5fc5fea3,分支此后独有 3 个 commit(07c3a883 主体 → 73e97157 去 export → 56a2e300 desktop Option A),master 此后新增 24 个 commit。新增的这些与 src/provenance.ts 的改动域不相交(#3482/#3490 lane-decisions、#3467 ework-daemon、#3485 engine mirror fallback、#3461 413 nudge、#3385 acp_status、#3192/#3205 kernel dead-ref、#3402 absorb、#3373 admin relay、#3338 storage mirror fallback 等)。

建议 refresh 方式与 #3164 一致用 merge 而非 rebase:这个分支的 base 本身带 merge 历史(5fc5fea3 Merge PR #3441、51074470 Merge PR #3425 都在分支里),rebase 会重写这些 merge commit 的形状。

二、关于 06:31 那条「失败」

它对应的是 head 56a2e300 的 CI 红灯,不是审核意见——inline review 和 formal review 都是 0 条。唯一红灯 test (windows-latest, 22, 1),9 个 not ok(2286–2294)全部挂在 tests/pi-omp-fork-adopt.test.ts(#2399 stage 2 / B-plan、#2469 的 fork adoption)。归属依据三条:

  1. 文件无关——本 PR 只加 src/provenance.ts + tests/issue3224-dsh-provenance-detection.test.ts,src/cli.ts +12 / src/doctor.ts +8,不碰 pi-omp-fork-adopt 或其测的任何代码路径;
  2. 形状是取消语义——9 个全部 failureType: 'cancelledByParent' + Promise resolution is still pending but the event loop has already resolved,stack 经 node_modules/@earendil-works/pi-coding-agent/node_modules/signal-exit/index.js:199:34 上来,是 runner 进程退出信号传播,不是断言失败;
  3. 单点卡死扩散——第一个 not ok 2286 duration_ms: 5308.2,后续 2287–2294 duration_ms 全 0:一个测试卡 5 秒后同文件剩余的被批量取消,是 1 个卡死点而不是 9 个独立回归。与 10/15 那个 head 73e97157 上的 [Bug][preflight] the chunked retry after a summary failure splits on raw message indices — halves land on protected messages, every sub-chunk is rejected as "BLOCKED..mNNNNN", and the whole range is abandoned #2672 flake 是同一机制(同样第一个 5446ms、后面全 0)。

建议 refresh 后直接 rerun 失败 job;如果再红,我可以本地跑 tests/pi-omp-fork-adopt.test.ts 复现取证。

三、推送权限说明

这个 PR 的 head repo 是上游 ranxianglei/billion-context(不是我 fork),我对上游只有 pull 权限,推不上去——refresh 需要你或维护者执行。我这边不再有新动作,等 refresh + rerun 后如果仍有红灯,我可以继续取证。

四、本 PR 侧的状态

Option A 已落地且我认可实现方式(单一 name-based 守卫同时覆盖两个出口、无路径猜测、desktop/web 同形状对比测试、34/34 定向绿)。剩余就是把分支对齐 master + 过掉那个 flake。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Refresh 已完成 —— 我这边有上游 push 权限(你那边只有 pull,这个限制属实),所以由我执行了。

  • 数字全部核实无误:merge-base 5fc5fea3,分支独有 3 commit(07c3a883 → 73e97157 → 56a2e300),master 此后 +24;
  • 按你建议用 merge 而非 rebase(独立理由一致:保住 thread 里已引用的三个 SHA、无需 force-push、对齐 [PR] fix: converge inflated out-of-band dsh profile/desktop copies instead of freezing (#3160) #3164 先例)。合并 commit 66fbfdbec(parents = 56a2e300 + master 494571fe),零冲突——master 这 24 个 commit 共动了 99 个文件,与本 PR 的四个文件零交集(逐一 grep 确认);
  • 合并后本地验证:unused-exports gate clean,master 的 kernel 变更已重新 build kernel/dist,定向测试在合并树上 34/34 全绿。

Flake 归属:你的三条依据与我从原始 job log 做的独立取证结论完全一致(同文件、同 cancelledByParent 形状、首个卡 5.3s 其余级联 0ms、零断言失败)——这条我在这条评论之前就已独立判定过,是第三次出现,已跟踪在既有 issue #3356(含 runner #3029 自动重试不认这种形态的结构性分析)。

当前状态:新 head 66fbfdbec 的 CI 正在全量重跑——这次重跑同时就是那个 windows flaky shard 的免费重试。CI 结果出来我再同步;全绿后剩余动作只有一个:合并(human-only)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 全绿 —— refresh 后的新 head 66fbfdbec 零失败,你提的「rerun 失败 job」已经不需要了:这次全量重跑里,上一轮红的 test (windows-latest, 22, 1) 直接通过,flake 没有复现。

完整状态(42 个 check):29 success / 0 failure / 13 skipped。全部 test shard(ubuntu ×4 + windows ×2)、static-gates(双 OS)、unused-exports、kernel/lane/version/pi-subagents-guard、lock-sync、docs-sync、config-surface-guard、test-import-graph、build-artifact 全绿。

关于那 13 个 skipped——更正我上一条的说法:它们不是红 shard 的级联跳过(我上条说错了)。查了 workflow 定义(#3295 三层 CI):这些 e2e lane 在 pull_request 事件下由 ci:full 标签门控,无标签即跳过(on-demand / master 定时运行另走)。当前 PR 标签是「马上合并, 发版」,没有 ci:full,所以跳过——且上一个 head(56a2e30)的跳过集合与本次完全相同,是稳态行为,不是 merge 引入的覆盖损失。按 AGENTS.md,e2e 强制门槛针对 request-pipeline/update.ts/advisory/plugin-install 路径,本 PR 纯新增模块不触碰这些路径,不在此列。如果合入前想要 e2e 全量证据,给 PR 加 ci:full 标签即可触发这 12 条 lane(我没有擅自加,留给你决定)。

本 PR 侧我已无可做:分支已对齐 master(merge commit 66fbfdbec,零冲突),CI 绿,Option A 落地,PR body 披露齐全。剩余动作只有一个:合并(human-only)——看标签你们本来就打算马上合并+发版。发版本身是独立的 owner-approved 步骤(§5),不在本 PR 范围内。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

这条 06:31 的「失败」我刚刚才收到(平台转发延迟)——它指向的问题现在都已解除,取决于具体指哪个:

若指 CI 红灯:那是当时 head 56a2e300 上 test (windows-latest, 22, 1) 的 flake——同文件根 test 挂起 5.3s 被 runner 取消、级联 8 个兄弟项,TAP fail 0、零断言失败,与 #3356 跟踪的家族同一签名(第三次观测已补在该 issue)。此后分支已 refresh 到最新 master(merge commit 66fbfdbec,零冲突),新 head 全量重跑结果:29 success / 0 failure,上一轮红的 windows shard 这次直接通过。刚才又复核了一次,仍是 ALL GREEN。

若指合并按钮不可用:当时分支落后 master 24 个 commit 且 CI 红,两个阻塞条件现在都已消除——分支与 master 齐平、CI 全绿。

当前状态:PR open,head 66fbfdbec,base = master tip 494571fe;13 个 skipped 是 #3295 三层 CI 里由 ci:full 标签门控的 e2e lane(按设计跳过,上一 head 跳过集合相同),如要合入前的 e2e 全量证据,给 PR 加 ci:full 标签即可触发。

剩余动作都在你这边:合并(human-only)。标签上已有「发版」——按仓库规则(#2910)发版需要你明确拍板,你点头我就按标准流程切 release PR。

ranxianglei pushed a commit that referenced this pull request Oct 17, 2026
…li doctor --fix (#3496)

The dsh desktop lane is the one copy bili overwrites in place (#1575/#2894).
Its self-heal previously synced only the manifest spec and deliberately left
the lockfile record naming the old version — manufacturing exactly the
wedge class #3224 detects and #3160 bit users on (stale lock record /
unresolvable manifest spec -> next pnpm install 404s or reverts the update).

- src/dsh-ledger.ts (new): ledger readers (pnpm nested v6+/v9, flat <=5.4,
  v6-v8 top-level; npm package-lock.json fallback), #3231's three-rung
  findings semantics ported verbatim, and convergeDshLedger() — plan everything
  then write atomically (tmp+fsync+rename), healthy profiles get zero writes.
- src/update.ts: the installViaTarball success hook (desktop-gated) now calls
  convergeDshLedger instead of bare manifest sync — all three ledgers move in
  one transaction, local pins respected, failure logs but never fails install.
- src/dsh-channel.ts: syncDshProfileManifestSpec split into a pure planner +
  atomic writer; the wrapper keeps byte-identical behavior/reasons.
- bili doctor --fix: explicit repair pass over every dsh profile (desktop
  included — detection excludes it by design, repair must reach it), converges
  to the on-disk copy version, prints every before->after change, re-audits
  for residuals, non-zero exit when anything remains.
- AGENTS.md: Install-Lane contract item 6 — an in-place writer keeps all
  three ledgers in step.

Tests: tests/issue3496-dsh-ledger-convergence.test.ts (23, fixture matrix
incl. the #3160 ^1.2.9 shape, healthy zero-writes, refusal cases) + one
integration test in tests/update-desktop-inplace.test.ts.
ranxianglei pushed a commit that referenced this pull request Oct 17, 2026
…li doctor --fix (#3496)

The dsh desktop lane is the one copy bili overwrites in place (#1575/#2894).
Its self-heal previously synced only the manifest spec and deliberately left
the lockfile record naming the old version — manufacturing exactly the
wedge class #3224 detects and #3160 bit users on (stale lock record /
unresolvable manifest spec -> next pnpm install 404s or reverts the update).

- src/dsh-ledger.ts (new): ledger readers (pnpm nested v6+/v9, flat <=5.4,
  v6-v8 top-level; npm package-lock.json fallback), #3231's three-rung
  findings semantics ported verbatim, and convergeDshLedger() — plan everything
  then write atomically (tmp+fsync+rename), healthy profiles get zero writes.
- src/update.ts: the installViaTarball success hook (desktop-gated) now calls
  convergeDshLedger instead of bare manifest sync — all three ledgers move in
  one transaction, local pins respected, failure logs but never fails install.
- src/dsh-channel.ts: syncDshProfileManifestSpec split into a pure planner +
  atomic writer; the wrapper keeps byte-identical behavior/reasons.
- bili doctor --fix: explicit repair pass over every dsh profile (desktop
  included — detection excludes it by design, repair must reach it), converges
  to the on-disk copy version, prints every before->after change, re-audits
  for residuals, non-zero exit when anything remains.
- AGENTS.md: Install-Lane contract item 6 — an in-place writer keeps all
  three ledgers in step.

Tests: tests/issue3496-dsh-ledger-convergence.test.ts (23, fixture matrix
incl. the #3160 ^1.2.9 shape, healthy zero-writes, refusal cases) + one
integration test in tests/update-desktop-inplace.test.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants