Skip to content

[PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh - #7148

Open
ranxianglei wants to merge 3 commits into
masterfrom
2026-11-18_dsh-desktop-maturity-gate
Open

ranxianglei wants to merge 3 commits into
masterfrom
2026-11-18_dsh-desktop-maturity-gate

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #7139

What this fixes

The dsh desktop profile is a pnpm-managed project whose host can pin a package-maturity policy (minimumReleaseAge + minimumReleaseAgeExclude, e.g. the strict 1440-minute window in the report). The desktop in-place refresh (refreshDshDesktopCopy) installs the selected release's tarball directly and converges the profile ledger (manifest spec + lockfile specifier/version), bypassing pnpm's resolver — so a fresh release could land in the profile before its maturity window elapsed. The manifest then requests a version the lockfile's store sections cannot resolve, and every subsequent pnpm operation on the profile (even for unrelated packages) fails with ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY / ERR_PNPM_RESOLUTION_POLICY_VIOLATIONS_UNHANDLED until the release matures.

This is distinct from #7125 / #7137 (post-convergence lockfile store sections): even with that repair, the direct installer can still pick a release the host's policy does not yet allow.

How

A maturity gate on the auto-refresh path (new src/release-maturity.ts, checked inside refreshDshDesktopCopy after the backoff check, before any registry traffic for the tarball):

  1. Policy resolution mirrors pnpm's own precedence, per key, first definition wins: env pnpm_config_* > env npm_config_* > project pnpm-workspace.yaml > project .npmrc > user ~/.npmrc > global $XDG_CONFIG_HOME/pnpm/config.yaml > $PREFIX/etc/npmrc. A null/empty file value is "not provided" (pnpm semantics) and does not shadow a positive value in a lower-precedence source; only an explicit number (including 0 = policy off) wins. Excludes travel with the source that defined them.
  2. Exclude matching follows pnpm's version-policy grammar: bare name or wildcard name without a version part = whole package excluded; name@1.0.0 || 2.0.0 = exact version union; */? name globs; a wildcard name combined with a version part is a pnpm config error → surfaced as a parse error.
  3. Publish time comes from the registry packument's time map — the same field pnpm's resolver reads (the tarball's Last-Modified is not reliable: measured 12 s off). The full packument is tens of MB, so it is fetched at most once per target version: the extracted time map is cached under cacheDir() (.registry-time-<pkg>.json) and a hit means zero registry traffic on later checks; an in-process memo bounds traffic when the cache dir is unwritable.
  4. Verdicts: no-policy / excluded / mature → proceed; immature → defer this cycle without a strike (the release matures on its own, retry every check cycle); undatable (registry failure, no time field, malformed/unreadable policy) → fail closed: defer, record a strike with a dedicated lane hint, and never bypass or silently exclude against the host policy.

Behavior change (old → new)

  • Old: the desktop in-place auto-refresh installed the selected release unconditionally, regardless of the profile's pnpm maturity policy.
  • New: an immature release is deferred until it matures (info log per cycle, no strike); an undatable policy/publish-time fails closed (warn + strike, copy/manifest/lockfile untouched).
  • Direction: respect the host's explicit package-maturity policy; the issue's acceptance criteria require deferral + fail-closed, not bypass.
  • Out of scope, deliberately: the advisory/panel forced-install path (forceInstallVersion) — it targets already-mature older versions and is a manual action, not the auto-update lane the issue names. Documented in the refreshDshDesktopCopy doc comment.

Config surface

None new. The gate reads the host's pnpm configuration (env + project/user/global files); no bili config key, env var, or CLI flag is added.

Tests

  • tests/release-maturity.test.ts (new, 19): policy precedence across all seven sources, per-source value forms (yaml flow/block lists, null, inline comments, quotes; npmrc comments/semicolons), malformed values fail closed, the full exclude grammar (bare/scoped/exact/union/wildcards/glob/?/error cases), gate verdicts (no-policy no-fetch, excluded no-fetch, mature, immature, no-time, missing version, fetch failure, HTTP 404, malformed policy before any traffic), time-cache single-fetch behavior.
  • tests/update-desktop-inplace.test.ts (+7): immature release defers with the installed copy, manifest, and lockfile byte-identical and no strike; whole-package exclude proceeds (zero registry traffic); an exclude for a different version does not lift the gate; a mature release proceeds and converges the ledger (store sections still untouched, per dsh 车道自动更新改全:自愈同步三本账(manifest/lockfile/副本)+ 存量漂移显式修复,自动更新后必须还能用 #3496); no-time packument / network failure / malformed policy each fail closed with a strike and the copy untouched.
  • Adjacent suite tests/issue2082-desktop-boot-smoke.test.ts (drives refreshDshDesktopCopy end-to-end) stays green.
  • Local: npm run typecheck clean; the three suites above green. Full-suite verdict = remote CI on this head.

Review notes

  • src/update.ts is load-bearing (auto-merge gate §7.4 excludes it) — this PR needs human review. The gate is additive: it only ever defers the refresh; the existing fetch/install/converge flow is untouched on the proceed path.
  • No kernel/ or pi-subagents/ changes; no new runtime dependencies (the module uses node builtins + existing repo helpers only); no wire/message-shape change.
  • Docs updated in-PR: reference/architecture.md file map, docs/architecture/update.{md,zh-CN.md} (new "Maturity gate" section), CHANGELOG.md (Fixed entry with the old→new disclosure). node tools/check-architecture-docs.mjs green.

@ranxianglei ranxianglei added bug Something isn't working dsh p2 scope/wiring labels Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-18_dsh-desktop-maturity-gate (9b68c56)

Latest build — install this exact version

npm install -g billion-context@0.0.10944-pr.7148.50efe26

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
9b68c56 billion-context@0.0.10944-pr.7148.50efe26 build
59d5660 billion-context@0.0.10906-pr.7148.8207bb9 build
44d5e5d billion-context@0.0.10808-pr.7148.b3f233c build
36f9656 billion-context@0.0.10802-pr.7148.3f580ed build
cf41346 billion-context@0.0.10800-pr.7148.f361b98 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh Nov 18, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-verified live state first — the reported failure is already fixed; no new work needed this run.

The unused-exports failure in this event was on head cf413468. The branch head has since moved to 36f9656d ("fix(update): keep MaturityVerdict module-internal (unused-exports gate)", pushed 19:53:38 +0800 — a previous run of this lane, seconds before this wake).

Verified the fix is sound:

  • src/release-maturity.ts:51 — export type MaturityVerdict → type MaturityVerdict (1-line diff). git grep on the head tree confirms the type is only used as the inferred return type of checkReleaseMaturity (src/release-maturity.ts:157); nothing in src/, tests/, or scripts/ imports it, so dropping export changes no behavior.
  • Live CI on 36f9656d: unused-exports = success; all guard/gate checks (kernel-guard, version-guard, lock-sync, architecture-docs, config-surface-guard, …) = success; the full test matrix is running (in progress / queued). The head commit carries no [ework:ci-held] marker — it is the branch's final head and its single full CI pass.

This run: verification only, no pushes. If a test lane goes red on 36f9656d, that is a fresh event for the next wake.


结构化八问(中文)

  1. 是什么问题:PR [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh #7148 的 unused-exports CI 门禁红——新增的 src/release-maturity.ts 导出了 MaturityVerdict 类型,但没有任何模块 import 它(死导出面)。
  2. 什么原因导致的:PR 作者把一个仅在模块内用作 checkReleaseMaturity 推断返回值的类型加了 export,门禁正确识别为 INTERNAL_ONLY 死面。
  3. 影响范围与严重程度:仅 CI 门禁层面,无运行时影响(纯类型级导出);严重度 = 阻塞合并的 CI 红。
  4. 怎么修复的:本次运行未做修复——本车道的上一轮运行已推送 36f9656d(去掉 export 关键字,单行改动)。本次运行做的是验证:git grep 确认无外部 import(修法正确)、新 head 的门禁检查全部转绿(状态属实)。
  5. 是否有回归问题:无。去掉一个从未被 import 的类型上的 export,不改变任何行为;类型在模块内仍正常使用。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

结论:事件报告的红项已由上一轮运行修复并推送为最终 head(无 ci-held 标记,正在跑全量 CI);本次运行仅核实,未推送。等 test 车道结果即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。 open+closed 按 minimumReleaseAge / maturity-gate 检索,只有源 issue #7139 与本 PR,无并行修复。

Review verdict: direction correct, pnpm semantics faithful (verified against pnpm source, not just docs), mergeable once the CI test shards go green.

① 原 issue(方向) — #7139: the dsh desktop profile is a pnpm-managed project, and refreshDshDesktopCopy (src/update.ts:1261) swaps the release tarball directly + converges the ledger, bypassing pnpm's resolver — so the profile's own minimumReleaseAge policy (1440 in the report) is silently violated: a fresh release lands before it matures, the manifest then requests a version the lockfile cannot resolve, and every pnpm operation on the profile (even unrelated packages) fails until maturity. The PR fixes this at the true decision point (a pre-swap gate at src/update.ts:1292), not a mask — right layer. All four acceptance criteria are covered and each is pinned by tests: (1) immature → defer, copy/manifest/lockfile byte-identical, no strike (retries every cycle; cache hit = zero traffic); (2) exclude → per the effective pnpm policy, zero registry traffic; (3) mature → normal update + convergence; (4) undatable → fail closed with a strike (backoff arms).

② 回归审查(既有行为) — the no-profile / up-to-date / backoff-cooldown early returns in refreshDshDesktopCopy all sit BEFORE the gate — untouched. The proceed path (no-policy / excluded / mature) falls through to the exact same code as before; the gate only adds early returns for immature/undatable. Machines without an explicit policy get no-policy → identical behavior to before (faithful to pnpm: its built-in default age is non-strict). No wire change (update lane, not the request pipeline — both compression modes N/A), no config-surface change (it reads the host's pnpm config, not bili's), no new env var, no new runtime dep (node:fs/os/path + existing internal modules), no kernel/ or pi-subagents/ change. CHANGELOG carries the old→new disclosure; docs/architecture/update.{md,zh-CN.md} + reference/architecture.md updated (architecture-docs lane green). Intentionally out of scope (documented in the PR): the forceInstallVersion advisory/panel path is not gated.

③ 代码审查 — pnpm fidelity, source-verified:

  • Boundary: pnpm's release_policy.rs installable_under_policy = published_at <= cutoff with cutoff = now − minAge — identical to the PR's Date.now() - publishedMs >= minAgeMinutes*60_000 (src/release-maturity.ts:171), including the >= boundary.
  • Exclude grammar: pnpm's version-policy crate — bare name / wildcard-without-version = whole package, name@v1 || v2 exact union, wildcard name + version part = config error → the PR matches, failing closed on parse errors.
  • Precedence: pnpm's config-override layer documents "CLI > yaml > .npmrc > defaults"; the PR's order (env pnpm_config_* > npm_config_* > project yaml > project .npmrc > user ~/.npmrc > global config.yaml > $PREFIX/etc/npmrc) is faithful; additionally honoring npm_config_* is a conservative superset.
  • Two deliberate conservative divergences (both safe direction, flagged here for the record): (a) minimumReleaseAgeStrict: false is NOT read — the gate always defers immature; on such a machine pnpm would install, bili defers up to the maturity window (delays an update, never breaks); (b) missing registry time field → fail closed (strike + backoff) where pnpm's default minimumReleaseAgeIgnoreMissingTime: true skips the check — mandated by DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139's acceptance criteria ("fail closed rather than silently bypassing"); the lane hint documents the escape hatches (minimumReleaseAge: 0 or an exclude entry).
  • One defect found in review, fixed in-thread (my commit 44d5e5d253, pushed to the PR branch): a null YAML minimumReleaseAgeExclude: (key present, no list) was modeled as an empty string, which SHADOWED a lower-precedence exclude list — contradicting both the module's own documented contract ("null/empty = not provided") and pnpm semantics (serde null = None = unset). In that corner bili would SKIP the gate where pnpm applies it — i.e. exactly the DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139 breakage direction. Fix (src/release-maturity.ts:274): null = not provided (falls through to the next source); an explicit [] stays "provided" and clears the excludes (gate still applies). 4 new tests: 2 regression (verified to fail on the old code) + 2 pinning the [] semantics.
  • The earlier CI red (unused-exports: MaturityVerdict exported but referenced nowhere outside the module) was already fixed upstream in 36f9656d75 — verified clean locally; no duplicate fix pushed.

④ 测试有效性 — teeth confirmed: byte-identical copy/manifest/lockfile assertions on defer, zero-traffic assertions (fetch stub that rejects), strike counts read from disk, unique version per gate test (in-process memo discipline), hermetic policy env so no machine pnpm policy leaks into the 3 pre-existing tests. Gate discipline #3617: both directions asserted — triggers when it should (immature → defer) and does NOT when it should not (no-policy / excluded / mature → proceed).

⑤ diff 整洁度 — clean: every line serves the PR's purpose; the two follow-up commits are each a single concern (export fix; null-exclude semantics + tests).

CI (live): on 36f9656d75: 0 failed — 16 success + 11 skipped, 3 test shards in progress (all static gates, architecture-docs, docs-sync, docs-coverage, config-surface-guard, lock-sync, mysql-contract green). My fix commit 44d5e5d253 retriggered the run; local verification on it: typecheck clean, unused-exports gate clean, 43/43 across the three affected suites (release-maturity 23, update-desktop-inplace 17, issue2082-boot-smoke 3). Labels already in place on issue + PR (bug, p2, dsh, scope/wiring) — no label action needed.

§7.4: touches src/update.ts (load-bearing) + adds a new module → human merge, no auto-merge.


八问(中文):

  1. 是什么问题:dsh 桌面 profile 是 pnpm 管理的项目,bili 的原地自动更新直接换 tarball 并收敛 ledger,绕过了 pnpm 解析器——profile 自己配置的 minimumReleaseAge(如 1440 分钟)被静默绕过:新版本在成熟期前落地,manifest 请求了 lockfile 无法解析的版本,此后 profile 上所有 pnpm 操作(包括无关包)都失败,直到该版本成熟。
  2. 什么原因导致的:更新车道的安装路径从不查询宿主的 pnpm 策略——该策略只在 pnpm 解析器内部执行,而这条车道按设计绕过了解析器(直接装 tarball + ledger 收敛),于是策略在车道侧完全失效。
  3. 影响范围与严重程度:仅影响「profile 显式配置了 minimumReleaseAge」的 dsh 桌面原地自动更新(内置默认值非严格,未显式配置的机器不受影响)。严重度 p2:profile 的 pnpm 操作坏到版本成熟为止(1440 = 最长 24h),应用本身可用且有绕行(等待/手动修),属「能用但有明显问题」。
  4. 怎么修复的:在决策点(换装之前)执行策略——按 pnpm 自身优先级解析生效策略(env pnpm_config_* > npm_config_* > 项目 yaml > 项目 .npmrc > 用户 ~/.npmrc > 全局 config.yaml > $PREFIX/etc/npmrc;逐 key 先定义者胜,null/空 = 未提供),再用 registry packument 的 time map(带缓存)判定目标版本的发布时间是否过窗。immature → 推迟(不计 strike,每轮重试,缓存命中零流量);excluded → 放行(零流量);mature/no-policy → 放行(与旧流程逐字节一致);undatable → fail-closed 计 strike(触发 backoff)。
  5. 是否有回归问题:逐项审过既有行为——无 profile / 已是最新 / backoff 冷却三个早退分支都在 gate 之前,未动;放行路径与 PR 前流程逐字节一致;无策略机器零行为变化;无 wire / 配置面 / 持久化 / kernel 变更。两处有意的保守偏离(均安全方向,已在上文标出):① 不读 minimumReleaseAgeStrict: false——此类机器的更新最多推迟一个成熟窗口(推迟更新,绝不弄坏);② registry 缺 time 字段 → fail closed(严于 pnpm 默认 ignoreMissingTime: true;issue 验收标准明确要求,逃逸手段已写进车道提示)。review 中发现并当场修复一处缺陷(commit 44d5e5d):null 的 YAML exclude 列表会遮蔽低优先级列表(pnpm 语义 null = 未设置)——该角落会在 pnpm 会执行策略的地方跳过策略,即 DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139 的坏向。
  6. 是否破坏缓存:不。gate 自带 time-map 缓存(packument time 字段 append-only,文件缓存 + 进程内 memo),命中即零 registry 流量;不触碰任何既有缓存/重试/游标/去重机制。既有 backoff 状态复用不变(immature 不计 strike,undatable 计 1 strike)。
  7. 是否改了设计方向:没有。更新车道架构不变(直接装 tarball + ledger 收敛),gate 是 refreshDshDesktopCopy 内一个加性的换装前检查。forceInstallVersion 建议/面板路径有意不在范围内(PR 中已注明)。
  8. 是否引入了新的配置:无新 bili 配置/env。gate 读取的是宿主既有的 pnpm 配置(minimumReleaseAge / minimumReleaseAgeExclude),无需迁移。

判定:可合 —— 等 CI 测试分片转绿(本地 44d5e5d 上 43/43 + 全部静态 gate 干净)。按 §7.4(src/update.ts 属 load-bearing + 新增模块),需人工合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Status follow-up (full review is the previous comment, floor 6).

What is done:

  • Full review of PR [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh #7148 posted (direction / regression / code / tests / diff, with pnpm semantics verified against pnpm source).
  • One defect found in review and fixed in-thread: null YAML minimumReleaseAgeExclude: was shadowing a lower-precedence exclude list (pnpm: null = unset) — pushed as commit 44d5e5d253 on the PR branch with 4 tests (2 regression, verified to fail on the old code).
  • The earlier CI red (unused-exports) was already fixed upstream in 36f9656d75 — no duplicate fix.

What is verified (local, on final head 44d5e5d253): typecheck clean, unused-exports gate clean, 43/43 across the three affected suites (release-maturity 23, update-desktop-inplace 17, issue2082-boot-smoke 3). PR is current with master (no rebase needed). Labels in place (bug, p2, dsh, scope/wiring).

What remains: CI on 44d5e5d253 — 0 failed so far; 13 lanes queued + 1 in progress (runner pool congested; the queue has not moved in ~20 min). No code-side action possible until the shards run.

Risk: low — every static gate passed on the previous head, the delta since is a 1-line parser semantics fix + tests, and the affected suites are green locally. If any test shard goes red, it is a fresh event for the next wake.

Verdict unchanged: 可合 once CI green; human merge required (§7.4 — src/update.ts is load-bearing + new module).

@ranxianglei
ranxianglei force-pushed the 2026-11-18_dsh-desktop-maturity-gate branch from 44d5e5d to 59d5660 Compare November 18, 2026 22:41
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved — branch rebased onto current master and force-pushed.

What I did this run:

  1. Verified live state first: PR head was 44d5e5d2 (3 commits on top of old master 548e3960); master had advanced to a446a3c1 (~30 commits, incl. the batch11-wave11 merge) — the conflict was real and current.
  2. Rebased the 3 PR commits onto upstream/master. Exactly one conflict: CHANGELOG.md — both sides had added entries at the top of the ### Fixed section. Resolved by keeping both entries (PR's DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139 entry first as newest, master's compress-receipt entry second). No other file overlapped (src/, tests/, docs/ touched by the PR were untouched by master in this window).
  3. Verified locally on the rebased head: npm ci → typecheck clean → build clean → targeted suites tests/release-maturity.test.ts + tests/update-desktop-inplace.test.ts 40/40 pass → scripts/check-unused-exports.mjs clean (the gate that failed in the previous event stays green).
  4. Re-fetched remote heads immediately before pushing (no concurrent pushes since my base), then force-pushed the rebased branch — the one force-push this conflict-rebase task explicitly authorizes. New head: 59d5660b (commits 2d82d032 → b116d990 → 59d5660b, same subjects as before).
  5. Re-verified live after push: PR head = 59d5660b, mergeable: true (conflict gone). mergeable_state: blocked is the branch-protection posture (required checks/reviews pending), not a conflict — CI is now running its full pass on the new head.

No content changes beyond the CHANGELOG conflict resolution; the PR's code and tests are byte-identical to what was already reviewed.


结构化八问(中文)

  1. 是什么问题:PR [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh #7148 与 master 冲突(merge state: dirty)——分支基于旧 master(548e3960),master 已前进到 a446a3c1,两边都在 CHANGELOG 的 ### Fixed 节顶部加了条目。
  2. 什么原因导致的:PR 分支落后 master 约 30 个提交(期间合入了 batch11-wave11 等大批 PR),CHANGELOG.md 是典型的「多 PR 同节顶部插条目」热点文件,文本冲突不可避免;代码文件无重叠。
  3. 影响范围与严重程度:仅合并阻塞——冲突不解 PR 无法合并;无运行时影响(冲突只在 CHANGELOG 文档行)。
  4. 怎么修复的:rebase 到最新 master(保留 3 个 PR 提交的线性历史),唯一冲突按「两条都保留、PR 条目在前(最新)」解决;本地验证 typecheck/build/定向测试(40/40)/unused-exports 门禁全过后,force-push(本任务明确授权的冲突 rebase 场景)。
  5. 是否有回归问题:无。rebase 不改 PR 代码字节(8 个文件 diff 与 rebase 前一致);CHANGELOG 只增不删(master 的条目原样保留);定向测试全绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

结论:冲突已解,新 head 59d5660b 的 CI 全量跑批中;等 test 车道结果即可,无其他待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Stale event — the conflict was already resolved by the previous run; verified live, no work needed.

Live verification this run:

  • PR head = 59d5660b (the rebased head pushed in the previous run); base = a446a3c1 (current master, unchanged since the rebase).
  • GitHub API: mergeable: true — no conflict. mergeable_state: blocked is the branch-protection posture (checks/reviews pending), not a dirty tree.
  • Structural check: master a446a3c1 is an ancestor of the PR head, so a conflict is impossible in the current state.
  • The event's dirty state came from the pre-rebase head (44d5e5d2); the mirror cache for this PR is still showing that old sha (last refreshed 13:03 UTC) — it simply hasn't caught up with the force-push.
  • CI on 59d5660b: 16 success / 11 skipped / 6 in-progress-or-queued / 0 failures.

No pushes, no changes. Waiting on the remaining test lanes.


结构化八问(中文)

  1. 是什么问题:事件报告 PR [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh #7148 与 master 冲突(dirty)——实为过期事件:冲突已由上一轮运行的 rebase + force-push 解决,事件数据取自 rebase 前的旧 head(44d5e5d2)。
  2. 什么原因导致的:镜像缓存尚未刷新到 force-push 后的新 head(仍显示旧 sha),系统据此生成了冲突事件;GitHub 实时状态已无冲突。
  3. 影响范围与严重程度:无实际影响——PR 当前可合并(mergeable: true),CI 0 失败;仅事件误报。
  4. 怎么修复的:本次运行未做任何修改——先实时核实(GitHub API mergeable 状态 + master 为 PR head 祖先的结构检查 + CI check-runs 汇总),确认冲突已不存在,按「已绿即确认即停」纪律收工。
  5. 是否有回归问题:不涉及(无改动)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

结论:冲突已解(上一轮完成),本轮仅核实;等剩余 test 车道跑完即可。

ci-check added 3 commits November 19, 2026 14:33
… in the in-place auto-refresh (#7139)

The dsh desktop profile is a pnpm-managed project whose host can pin a
package-maturity policy (minimumReleaseAge + minimumReleaseAgeExclude).
The desktop in-place refresh (refreshDshDesktopCopy) installs the selected
release's tarball directly and converges the profile ledger, bypassing
pnpm's resolver — so a fresh release could land before its maturity window
elapsed, leaving the manifest requesting a version the lockfile cannot
resolve and breaking every pnpm operation on the profile until it matured.

Add a maturity gate (new src/release-maturity.ts) on the auto-refresh path:
- resolve the profile's effective pnpm policy with pnpm's own precedence
  (env pnpm_config_* > env npm_config_* > project pnpm-workspace.yaml >
  project .npmrc > user ~/.npmrc > global config.yaml > $PREFIX/etc/npmrc,
  per-key first definition wins; a null file value is 'not provided' and
  does not shadow a lower-precedence positive value);
- match minimumReleaseAgeExclude with pnpm's version-policy grammar
  (bare/wildcard name = whole package, name@v1 || v2 = exact union,
  * / ? name globs);
- read the target release's publish time from the registry packument's
  time map (fetched at most once per version; cached under cacheDir(),
  in-process memo as fallback);
- verdicts: no-policy / excluded / mature -> proceed; immature -> defer
  without a strike (it matures on its own); undatable policy or publish
  time -> fail closed (defer + strike, the host policy is never bypassed
  or silently excluded).

The advisory/panel install path (forceInstallVersion) is out of scope: it
targets already-mature older versions. No new bili config keys — the gate
reads the host's pnpm config.

Regression tests: tests/release-maturity.test.ts (19: policy precedence,
source forms, malformed values fail closed, exclude grammar, gate verdicts,
time cache) and 7 new cases in tests/update-desktop-inplace.test.ts
(immature defers with copy/manifest/lockfile byte-identical, excluded
proceeds, other-version exclude does not lift the gate, mature proceeds,
no-time / network-failure / malformed-policy fail closed).
The verdict type is only consumed through the inferred return type of
checkReleaseMaturity; nothing imports it, so the export is dead surface.
…list

pnpm treats a null list value as unset (serde None), so a bare
'minimumReleaseAgeExclude:' with no items must fall through to the
next source — the parser modeled it as an empty string, which shadowed
a lower-precedence exclude list (contradicting the module's own
documented contract: null/empty = 'not provided'). An explicit empty
list '[]' stays 'provided' and clears the excludes.

4 tests: 2 regression (fail on the old code), 2 pinning the '[]'
semantics (the gate must still apply — the #7139 breakage direction).
@ranxianglei
ranxianglei force-pushed the 2026-11-18_dsh-desktop-maturity-gate branch from 59d5660 to 9b68c56 Compare November 19, 2026 06:34
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict re-resolved — master advanced again since the last rebase, so this one was real. Branch rebased onto current master and force-pushed.

What I did this run:

  1. Verified live state first: PR head was 59d5660b (last rebase); master had advanced a446a3c1 → 04ecbb42 (4 new commits, incl. [PR] compress.reasoning.tail: drop reasoning of any closed round in the protected window (#7144 follow-up) #7252 and [PR] fix: completely prohibit inheritance compression for presets registered at dsh runtime (wrapped by agentPresets.register | fix: dsh 运行时注册的 preset 继承压缩完全禁止(agentPresets.register 包裹) #7242 merges). GitHub API confirmed mergeable: false, mergeable_state: dirty — a genuine new conflict, not a stale event.
  2. Rebased the 3 PR commits onto upstream/master. Same single hot-spot conflict as before: CHANGELOG.md (both sides added entries at the top of ### Fixed — master's new dsh runtime-registered presets are not covered by the compression-disable gate: per-step 422 storm during compression + | dsh 运行时注册的 preset 不受压缩禁用闸门覆盖:压缩每步 422 风暴 + 换模型死锁 + 落地 checkpoint 反噬折叠(#7062/#7169/#7178 同源) #7190 preset-compaction entry vs this PR's DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139 entry). Resolved by keeping both entries, PR's DSH desktop auto-update can bypass pnpm minimumReleaseAge #7139 entry first as newest. No other file overlapped.
  3. Verified locally on the rebased head: npm ci (no dependency changes) → typecheck clean → build clean → targeted suites tests/release-maturity.test.ts + tests/update-desktop-inplace.test.ts 40/40 pass → scripts/check-unused-exports.mjs clean.
  4. Re-fetched remote heads immediately before pushing (no concurrent pushes since my base), then force-pushed — the one force-push this conflict-rebase task authorizes. New head: 9b68c560 (commits b40efea9 → fd6acca8 → 9b68c560, same subjects).
  5. Re-verified live after push: PR head = 9b68c560, mergeable: true (conflict gone); mergeable_state: blocked = branch-protection posture (checks/reviews pending), CI running its full pass on the new head.

No content changes beyond the CHANGELOG conflict resolution; the PR's code and tests are byte-identical to what was already reviewed.


结构化八问(中文)

  1. 是什么问题:PR [PR] fix(update): respect the dsh desktop profile's pnpm minimumReleaseAge in the in-place auto-refresh #7148 再次与 master 冲突——master 在上轮 rebase 后又前进了 4 个提交(a446a3c1 → 04ecbb42,含 [PR] compress.reasoning.tail: drop reasoning of any closed round in the protected window (#7144 follow-up) #7252/[PR] fix: completely prohibit inheritance compression for presets registered at dsh runtime (wrapped by agentPresets.register | fix: dsh 运行时注册的 preset 继承压缩完全禁止(agentPresets.register 包裹) #7242 合入),两边又都在 CHANGELOG ### Fixed 节顶部加了条目。
  2. 什么原因导致的:CHANGELOG.md 是「多 PR 同节顶部插条目」的热点文件,master 活跃期任何 rebase 后又有新 PR 合入都会再次文本冲突;代码文件依旧无重叠。
  3. 影响范围与严重程度:仅合并阻塞(mergeable: false);无运行时影响(冲突只在 CHANGELOG 文档行)。
  4. 怎么修复的:rebase 到最新 master(保持 3 个 PR 提交线性历史),唯一冲突按「两条都保留、PR 条目在前(最新)」解决;本地验证 typecheck/build/定向测试(40/40)/unused-exports 门禁全过后 force-push(本任务明确授权的冲突 rebase 场景)。
  5. 是否有回归问题:无。PR 代码字节未变(8 文件 diff 与上轮一致);CHANGELOG 只增不删(master 新条目原样保留);定向测试全绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

结论:冲突已解,新 head 9b68c560 的 CI 全量跑批中;等 test 车道结果即可。

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DSH desktop auto-update can bypass pnpm minimumReleaseAge

1 participant