Skip to content

[PR] fix(dsh): upstream banner — soften chrome + ✕ dismiss until the failing set changes (#5701) - #5703

Open
ranxianglei wants to merge 6 commits into
masterfrom
2026-11-05_dsh-upstream-banner-polish
Open

ranxianglei wants to merge 6 commits into
masterfrom
2026-11-05_dsh-upstream-banner-polish

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #5701

What the issue reported (bili 0.1.212, DSH desktop-runtime)

The shell.overlay upstream-unavailable pill: (1) hard-saturation red chrome clashing with host themes, (2) "does not auto-dismiss", (3) overlaps host UI in the corner.

Root-cause split (version-first triage at v0.1.212 + master)

  • "Does not auto-dismiss" has two producers, both now covered:
    • Zombie alert rows — the client already returns null on an empty report (if (rows.length === 0) return null), and the server clears a host's alerts on any successful fetch to that host ([Feature] Web UI 主动提示上游连接失败(全局 banner),而不是只埋日志 #1682). A dead port (e.g. a loopback shim rebound to a fresh ephemeral port) can never succeed, so the success-clear never fired. Fixed by [PR] fix: expire stale upstream alert rows after 5 min (DSH overlay stuck on dead loopback port) #5574 (fix: expire stale upstream alert rows after 5 min, commit 8b05d23, ALERT_STALE_MS = 5*60_000 lazy prune) — shipped in v0.1.213 (133f352), verified against the shipped dist by @chuilian.
    • Quiet open circuits — [PR] fix: expire stale upstream alert rows after 5 min (DSH overlay stuck on dead loopback port) #5574 pruned alerts only; getUpstreamHealthReport merged every OPEN circuit unconditionally, and circuit entries are removed only by a success or MAX_CIRCUITS eviction. A host that tripped its circuit (3 consecutive pre-response failures) and then stopped being hit rendered in the banner forever, with firstSeen/lastSeen synthesized from openedAt/lastFailure.at (repro confirmed on v0.1.213 by @chuilian: VPN drop, internal gateway connect-timeout ×3, then no traffic to that host — row survived app relaunch because the proxy is a detached process). Fixed in this PR (second commit): the same staleness bound applied to the circuit's last activity, in the report projection only — the circuit state machine is untouched (fail-fast / half-open probes unchanged; a fresh failure re-surfaces the row on the very next read). Both directions pinned in tests/upstream-alerts.test.ts.
  • Hardcoded chrome + no way to acknowledge — still present on master. Fixed here (first commit).
  • Overlap with host corner UI — shell.overlay placement is DSH desktop-runtime (host-side) territory; bili only controls its own box. Flagged, not fixed here.

Changes

Commit 1 — client-only (dsh lane)

src/agent/dsh-native-client.ts:

  • Softened chrome: border alpha 0.5→0.35, background 0.1→0.08, radius 8→10px, padding 8px 12px→10px 14px, subtle shadow. Text color deliberately kept inherited from host tokens (no new hardcoded colors).
  • New ✕ control: hides the banner until the failing set changes (per-row host+kind+code). Count ticks / retry-ETA churn of the same set never re-show it; any new or changed failure re-surfaces it. Auto-dismiss on recovery (empty report ⇒ null) unchanged.

tests/dsh-settings-ui.test.ts: regression test "#5701 …" pins the softened values, the dismiss click, churn-stays-hidden, and changed-set re-surface through the existing mountClient vm-realm harness.

Commit 2 — server-side status projection (src/upstream-alerts.ts)

  • getUpstreamHealthReport: an open circuit whose last activity (lastFailure.at ?? openedAt) predates now - ALERT_STALE_MS drops out of /__bili/upstreams, mirroring the existing pruneStaleAlerts lazy-prune discipline ([PR] fix: expire stale upstream alert rows after 5 min (DSH overlay stuck on dead loopback port) #5574). The circuit state machine keeps the entry — upstreamCircuitBlockReason fail-fast, half-open probe scheduling, and the getOpenUpstreamCircuits() diagnostic surfaces are all unchanged.
  • tests/upstream-alerts.test.ts: two new tests — a quiet-for-window open circuit drops out of the report while getOpenUpstreamCircuits() still lists it (proving the filter is projection-only); a still-failing circuit re-surfaces immediately regardless of age.

Behavior changes (old → new, disclosed per policy)

Property Old New
border rgba(217,63,11,0.5) rgba(217,63,11,0.35)
background rgba(217,63,11,0.1) rgba(217,63,11,0.08)
borderRadius 8 10
padding 8px 12px 10px 14px
boxShadow none 0 2px 8px rgba(0,0,0,0.15)
dismissal recovery only recovery OR user ✕ (until failing set changes)
/__bili/upstreams rows for open circuits every open circuit, until success or MAX_CIRCUITS eviction only open circuits whose last activity is within the same 5-min window as alert rows; a fresh failure re-adds the row on the next read

No config surface added. No wire/protocol/request-path change: commit 1 is host-process UI only; commit 2 filters a loopback-gated status-endpoint projection only — relay/egress behavior (fail-fast, probes, Retry-After) is byte-identical.

Tests

@ranxianglei ranxianglei changed the title fix(dsh): upstream banner — soften chrome + ✕ dismiss until the failing set changes (#5701) [PR] fix(dsh): upstream banner — soften chrome + ✕ dismiss until the failing set changes (#5701) Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-05_dsh-upstream-banner-polish (1e44cd5)

Latest build — install this exact version

npm install -g billion-context@0.0.9136-pr.5703.961b64e

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
1e44cd5 billion-context@0.0.9136-pr.5703.961b64e build
670f9fb billion-context@0.0.8922-pr.5703.e026748 build
7adc000 billion-context@0.0.8651-pr.5703.736cdde build
8fc410c billion-context@0.0.8637-pr.5703.d69be29 build
12663a2 billion-context@0.0.8199-pr.5703.1155554 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5703.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

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

查重:不重复 —— 检索了 open/closed issue 与 PR(按主题 "dsh upstream banner / shell.overlay pill" 及失败签名):没有其他在途 PR 触碰这块 UI;本线程也没有并列的第二条修复 PR(one-fix-PR-per-thread 满足)。相关但已分别处理的前置项:#5572(僵尸行 5 分钟过期,已在 master 8b05d237c,未发版)、#1682(成功即清)、#4254(pill 本体)。

标签: bug / dsh / scope/ui / p3(缺陷类、dsh 车道、纯宿主进程 UI 面、体验瑕疵级)。

初审进行中,先报已核实的部分:

  1. PR body 的版本级 triage 属实 —— 在 v0.1.212/master 两个面上都查过:「不自动消失」的僵尸行机制确已由 fix: expire stale upstream alert rows after 5 min(master,src/upstream-alerts.ts 的 ALERT_STALE_MS = 5*60_000 lazy prune)修掉、只是还没进 release tag;本 PR 只处理硬编码 chrome + ✕ 确认关闭,切分正确。与宿主角标 UI 的重叠明确划给 DSH 桌面运行时侧,未越界。
  2. 代码审读完成:hook 顺序安全(新 state 在所有条件返回之前);签名用 \u0000/\u0001 分隔且排序,字段碰撞/行序无关都免疫;i18n 中英双字典齐;按钮带 type="button" + aria-label/title;文本色刻意继承宿主 token,没有新增硬编码颜色。测试双向都有断言(churn 不重显 + 集合变化重显),符合 gate 纪律。
  3. CI 状态(head 12663a270):多个 test shard 红(ubuntu 22/24 的 1–3 号、windows 22 的多个),static-gates 绿。正在按 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 协议判定是继承性红还是本 PR 引入——diff 只有 17 行 UI 代码 + 测试文件,跨平台多 shard 同时红的形态更像继承,但要看失败签名才下结论。

完整八问结论随后补上。

@ranxianglei ranxianglei added bug Something isn't working dsh p3 scope/ui labels Nov 5, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 自动修复 attempt 1/3 结论:10 个红分片全部是继承自 master 的既有红项,零 PR 自致;分支已含 ci-fixes 全部内容,本轮无可推改动。

核查过程(证据链):

结构化八问:

  1. 是什么问题:PR 的 10 个 test 分片全红,但没有任何一个失败源于本 PR 的改动——全是 master 0aace2f 自身携带的三个已知红项。
  2. 什么原因导致的:①② 请求管道时序/负载 flake(BLOCKED-ref、watermark fastpath),干净 master 本地可复现,与代码内容无关;③ master 合入 single-shot sidecar gate 后行为与既有 [Bug] dsh 车道切模型 fork 出的 _sub: 会话不继承父会话 fold 块:上游上下文从 ~83K 瞬间膨胀到 794K、命中归 0、节省转负(0.1.187/0.1.188) #2817 回归钉的逐回合计数契约直接冲突,合入即确定性红(floor 934 插桩证据:turn 1 走 verbatim side lane 不计 stats.requests)。
  3. 影响范围与严重程度:仅影响本 PR(及其他在途 PR)的红绿信号判定,无用户侧功能影响;[Bug] dsh 车道切模型 fork 出的 _sub: 会话不继承父会话 fold 块:上游上下文从 ~83K 瞬间膨胀到 794K、命中归 0、节省转负(0.1.187/0.1.188) #2817 为确定性(固定三片必红),另两族随 runner 负载波动。
  4. 怎么修复的:分支侧本轮不修——branch 已含全部可得修复(ci-fixes 全量),三个红项的归属全在 master 侧:两族 flake 已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 登记跟踪;[Bug] dsh 车道切模型 fork 出的 _sub: 会话不继承父会话 fold 块:上游上下文从 ~83K 瞬间膨胀到 794K、命中归 0、节省转负(0.1.187/0.1.188) #2817 的选项已在 floor 934 列出(A 推荐:把回归钉断言对齐作者显式声明的残差行为,test-only;B 收紧 gate;C 改记账语义),归属哨兵/ci-fixes 车道等 owner 拍板。按自动修复车道纪律,我未在本 PR 里抢改回归钉语义(若最终选 B/C 该改动就是错的),也未重复立决策项。
  5. 是否有回归问题:无——本轮对 PR 分支零提交,代码未动。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无。
  8. 是否引入新配置:无。

收工判定:分支本身 ready,红状态纯继承;master 侧处置落地(#2817 选项拍板 + 哨兵收敛进 ci-fixes/master)后,本 PR rebase/重触发即绿。已按协调政策在 #4599 留一行报备,未开任何新 issue。

@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 —— 独立端到端审读通过,可合。(本结论为独立产出,未照抄前序楼层;代码路径、测试 harness、#5572 归属均重新核过一遍。注:本账号即 PR 作者,GitHub 禁止对本人 PR 提交正式 approval,故以评论形式给出结论;如需正式 approval 状态请由其他账号点 Approve。)

结构化八问:

  1. 是什么问题:DSH 桌面运行时的「上游不可用」横幅(shell.overlay 槽位)样式过硬、且用户没有确认/关闭手段——高饱和红边框背景与宿主 token 打架,持续故障期间只能一直挂着。
  2. 什么原因导致的:chrome 是硬编码 rgba(217,63,11,...),不读宿主 token;组件只在「报告为空」时返回 null,没有任何用户可触发的隐藏态。另一半「恢复后仍不消失」是僵尸行问题,已由 master 上的 #5572(ALERT_STALE_MS=5*60_000 lazy prune)修掉——我验证了该 commit(8b05d237c)确在 PR base 的祖先里,本 PR 不涉及,切分正确。
  3. 影响范围与严重程度:仅 dsh desktop-runtime 宿主进程内 UI(Electron shell.overlay),不碰代理请求路径/线协议/存储/内核。触发条件 = DSH 宿主 + ≥1 不可达上游。严重度 = 体验瑕疵(p3),无数据丢失、无能力不可用。
  4. 怎么修复的:① 降饱和(border alpha 0.5→0.35、bg 0.1→0.08、radius 8→10、padding 8px12px→10px14px、加轻阴影);文字色刻意保持继承宿主 token——比 issue 建议的硬编码 rgba(217,63,11,0.8) 更贴合「复用宿主 token」的本意。② 新增 ✕:用 dismissedSig 记住已确认的故障集合签名(每行 host+kind+code,NUL/SOH 字节分隔并排序 → 顺序无关的集合语义)。点 ✕ 后同集合保持隐藏,计数/重试 ETA 抖动不重显,任何新增/变化的故障行重显;恢复(空报告⇒null)逻辑不变。(src/agent/dsh-native-client.ts:1083-1102)
  5. 是否有回归问题:逐项过既有行为——(a) React hook 顺序安全:3×useState + 2×useEffect 全在两个 early-return 之前调用,条件分支不会跳过任何 hook;(b) 既有 #4254 测试的注册行为(slots.inject/register)未动,只改渲染内部结构,header 被包进一层 flex div 并加 ✕,但 collectText 递归所有子节点,「N 个上游不可用」文本仍可命中,slotsOrder/optionsBySlot 断言不受影响;(c) rows.map 的 key=r.host 未变,无 key 回归;(d) 高危模式排查:无语义漂移、无 fail-fast→吞错、无阈值/时序/输出格式漂移(纯客户端 UI,不动 wire)。结论:无回归。
  6. 是否破坏缓存:不涉及(纯宿主进程 UI,不碰前缀缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:无架构转向,仅在既有 pill 上加了一个自洽的小行为扩展(用户可确认)。FYI(非缺陷、无需处理):dismissedSig 永不在恢复时清除,故「恢复后又以完全相同 host+kind+code 再失败」会被继续抑制,直到集合变化或组件重挂——这与文档化契约「until the failing set changes」自洽;典型僵尸场景端口每次都会变,所以照样会重显。若要改成「恢复即重置确认」属 needs-decision 范畴,本 PR 不改。
  8. 是否引入新配置:不涉及(无新 env/config/CLI flag;config-surface-guard 绿印证)。

测试有效性:新用例经 vm-realm 打包真实 agent/dsh-native-client 入口驱动真实组件(非 stub/mock),对降饱和值逐字段断言,对 ✕ 状态机做「点击隐藏 → churn 保持隐藏 → 集合变化重显 → unmount 取消轮询」全链路双向断言,有牙,能兜住 chrome 回退与 dismiss 逻辑回归。

CI(head 12663a2):镜像缓存 summary {total:30, failed:0, pending:0},kernel-guard / config-surface-guard / version-guard / lock-sync / gate×2 等全绿;早先 10 个 test 分片红已由 CI 车道判定为继承自 master 的三个已知红家族、与本 PR diff 零交集,当前状态已转绿。

判定:可合(APPROVE)。 低风险 dsh 客户端 UI 精修,行为漂移已按政策披露旧值→新值,测试有牙,未触碰 kernel/config/wire。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

✅ review-worker-r1 审毕:PR #5703 = APPROVE(可合)。 独立端到端八问通过:低风险 dsh 客户端 UI 精修,无回归、无 kernel/config/wire 触碰、测试有牙;CI 当前绿(镜像 {total:30,failed:0,pending:0}),早先 10 个红分片已由 CI 车道判定为继承自 master、与本 PR diff 零交集。无 kernel-change 声明 → 不触发授权卡点。无小问题需顺手修。因本账号即 PR 作者、GitHub 禁止自我批准,正式 approval 以评论形式给出:#5703 (review)

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)
🔶 需要决策

背景一句话:PR #5703(dsh 上游横幅视觉软化 + ✕ 关闭)代码本身审完没问题、可合;但它的 CI 全矩阵是红的——追查下来这是 master 上已存在的继承性回归:PR #5687(「generic dsh single-shot sidecar gate」,11-05 01:18 合入,commit 01fcc5d68)弄坏了 5 个钉住的测试;而 master 自 2026-11-01 起按你的 ci.yml 决策不再跑全矩阵探针,所以一直潜伏,直到这个 PR 触发全矩阵才炸出来。

待决问题:#5687 回归怎么修(它决定后续所有 PR 的 CI 能否转绿):


结构化八问(PR #5703 本体审查结论)

  1. 是什么问题:dsh desktop-runtime 的「上游不可用」横幅硬编码高饱和红色 chrome、与宿主主题冲突,且出现后无法手动关闭(只有故障恢复才消失)。
  2. 什么原因导致的:chrome 值是 src/agent/dsh-native-client.ts 里的硬编码常量;组件只在 rows 为空时返回 null,不存在用户确认态。(原单另一半「不自动消失」是死端口永远不成功导致 success-clear 不触发的僵尸行,已由 master 上的 [DSH] Upstream-down overlay sticks forever on a dead loopback shim port (×1, circuit null, no TTL/dismiss) #5572 五分钟 stale prune 修复,只是还没进发布版。)
  3. 影响范围与严重程度:看到横幅的 dsh desktop 用户;外观/UX 级(p3),无功能影响。与宿主角落 UI 重叠属 DSH 宿主侧 placement,bili 管不到自己的盒子以外,已标记未修。
  4. 怎么修复的:两件事——① chrome 软化(border/background alpha 降低、圆角 8→10、padding 加大、加淡阴影;文字色刻意继承宿主 token,不新增硬编码色);② 新增 ✕ 按钮,记录当前失败集合指纹 sig(host+kind+code 排序集):集合不变时 count/重试倒计时抖动永不重新弹,任何新失败或变化立即重新出现;恢复自动消失不变。
  5. 是否有回归问题:没有。diff 只碰宿主进程 UI 渲染 + i18n 字符串,无 wire/请求路径/配置/kernel 变更;无新 import(dist external 面不变);唯一消费者是它自己的测试文件。既有行为逐项清点:轮询循环、slot 注册(shell.overlay id/order)、恢复自动消失、行渲染——全部原样保留。一个刻意的语义边缘(与披露契约一致):同一失败集合在完全恢复后再次出现时会保持隐藏(latch 持续到挂载结束)——符合「until the failing set changes」措辞,非缺陷,知会一下。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:没有。
  8. 是否引入新配置:没有。

验证证据

已做 / 未做

收工判定:PR #5703 代码审查通过、on merit 可合;现在合(接受继承红)还是等 #5687 回归修复落地后重跑再合,由你定。

ci-check and others added 2 commits November 8, 2026 20:11
… set changes (#5701)

The shell.overlay upstream-unavailable pill shipped with hard-saturation chrome (rgba(217,63,11,0.5) border / 0.1 background, 8px radius) that clashed with host themes, and offered no way to acknowledge it short of waiting for recovery.

- Soften the chrome: border alpha 0.5->0.35, background 0.1->0.08, radius 8->10px, padding 8px 12px->10px 14px, subtle shadow; text color stays inherited from the host tokens.
- Add a ✕ control that hides the banner until the FAILING SET changes (host+kind+code per row). Count ticks / retry-ETA churn of the same set never re-show it; any new or changed failure re-surfaces it. Auto-dismiss on recovery (empty report => null) is unchanged — the zombie-row case is already bounded server-side by the 5-min staleness prune (#5572).

Regression test: tests/dsh-settings-ui.test.ts "#5701" pins the softened values, the dismiss click, churn-stays-hidden, and changed-set re-surface.
…ction (#5701)

#5574 made alert rows age out after 5 min, but getUpstreamHealthReport
merged every OPEN circuit unconditionally — a host that tripped its
circuit and then stopped being hit rendered in the DSH banner forever
(rows synthesized from openedAt/lastFailure.at), because circuit entries
are only removed by a success or MAX_CIRCUITS eviction.

Filter the projection only, mirroring pruneStaleAlerts: an open circuit
whose last activity (lastFailure.at ?? openedAt) predates the same
ALERT_STALE_MS bound drops out of /__bili/upstreams. The state machine
keeps the entry — traffic resuming into it still fails fast / probes,
and a fresh failure re-surfaces the row on the very next read. Both
directions pinned in tests/upstream-alerts.test.ts.
@ranxianglei
ranxianglei force-pushed the 2026-11-05_dsh-upstream-banner-polish branch from 12663a2 to 8fc410c Compare November 8, 2026 12:16

@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 (round 2) — clean re-review of updated head 8fc410c57; mergeable. Posted as a COMMENT because formal self-approval is blocked (this account is the PR author; GitHub forbids approving your own PR). Independent analysis, not copied from prior floors.

What changed since round 1. The branch was rebased onto newer master (3ac3e95c0, was 0aace2f20) and a second commit was added:

  • Commit f06e363fb — the original dsh banner chrome-softening + ✕ dismiss. git diff 12663a270 f06e363fb -- src/agent/dsh-native-client.ts tests/dsh-settings-ui.test.ts is empty: byte-identical to the code approved in round 1; only the base moved, so that approval carries over unchanged.
  • Commit 8fc410c57 (new) — fix(upstreams): expire quiet open circuits in the health-report projection (#5701). Server-side: src/upstream-alerts.ts (+18/-2) + tests/upstream-alerts.test.ts (+58). This is the substantive new work I focused on.

The new commit — what it does. In getUpstreamHealthReport (src/upstream-alerts.ts:406-419), the loop over open circuits previously attached every open circuit unconditionally. Now it skips a circuit whose last activity (state.lastFailure?.at ?? state.openedAt) is older than ALERT_STALE_MS (5 min), mirroring pruneStaleAlerts (src/upstream-alerts.ts:87-93) exactly — same constant, same cutoff expression, same strict <. Root cause: #5574 aged out alert rows after 5 min, but the report still merged every open circuit unconditionally, so a host that tripped its circuit and then stopped being hit rendered in the DSH banner forever (its row's firstSeen/lastSeen were synthesized from openedAt/lastFailure.at). The fix filters the projection only.

Why it's safe (no regression). The report has exactly one production consumer: src/server/admin.ts:252 (loopback-gated /__bili/upstreams). No request-routing or fail-fast path imports it. Fail-fast and Retry-After read the circuit state machine directly — upstreamCircuitRetryAfterSeconds (src/upstream-alerts.ts:262) reads the circuits map; getOpenUpstreamCircuits filters on openedAt !== null independent of staleness. The filter never deletes from circuits nor mutates e.state, so fail-fast / probe scheduling are untouched. Active (fresh) circuits behave exactly as before; only quiet/stale ones are newly omitted. Types are clean (openedAt:number|null, lastFailure:{…,at}|null) — no as any.

Tests. Two new cases in tests/upstream-alerts.test.ts drive the real code through a monkey-patched clock (withClock, +1000ms steps, restored in finally; recordUpstreamCircuitFailure stamps Date.now() so the patched clock controls timestamps). Case 1: a quiet open circuit drops out of the report after 301 ticks while getOpenUpstreamCircuits() still returns it (state machine intact). Case 2: a host that keeps failing stays visible after aging, and one fresh failure re-surfaces it. Both directions pinned (Gate Test Discipline #3617), fully deterministic (no timers/ports). I traced both by hand against the implementation — they pass.

Behavior change (disclosed). /__bili/upstreams (and therefore the DSH frame-level banner) — OLD: listed every open circuit regardless of recency → a host that went quiet after tripping its circuit stayed visible indefinitely. NEW: an open circuit quiet for > ALERT_STALE_MS (5 min) is omitted until a fresh failure re-surfaces it. WHY: align the circuit source with the alert source under one staleness rule; a host that stopped being hit is not evidence of a current outage. Scope: DSH banner + admin endpoint only; state machine / routing unchanged.

CI (mirror cache, head 8fc410c57). At review time: total 30, failed 0, success 6 (static-gates win+ubuntu, mysql-contract, test-import-graph, lock-sync, plan), skipped 13 (env-gated e2e lanes), in_progress 11 (full test matrix shards across windows/ubuntu × node 22/24 × shards — still running). Zero failures; the new tests run inside those in-progress shards. Full-suite verdict lands on remote CI.

Small findings / NO OPEN ENDS. No mechanical findings found in either commit (no typo / stale comment / wrong predicate / missing obvious test). One pre-existing nuance carried from round 1, stated for closure (not a defect of this change): dismissedSig is never reset on recovery, so a recovered-then-identically-refailing host stays banner-suppressed until the failing set changes — consistent with the documented "until the failing set changes" contract and orthogonal to this commit; no action taken here. Nothing to fix in place, nothing converted to a decision.

Authorization boundaries. No kernel/ touch, no kernel-change declaration, no config-surface change, no wire-protocol change → no 🔶 需要决策 gate (kernel-guard / config-surface-guard green on CI).


结构化八问(中文,供人工 reviewer)

  1. 是什么问题:DSH 顶栏的「上游不可用」横幅会永久卡住——某个上游触发熔断后如果不再被请求(变安静),它的行会从 openedAt/lastFailure.at 合成出来一直显示在报告里,永远不消失。根因是 #5574 只让告警行按 5 分钟老化,却没让熔断行跟着老化。

  2. 什么原因导致的:getUpstreamHealthReport 把所有 open 状态的熔断无条件合并进报告,而告警行走的是 pruneStaleAlerts 的 5 分钟老化。两个数据源用了两套陈旧判定——熔断侧缺了同一套老化规则。修法:给投影加与告警完全一致的老化过滤(同一个 ALERT_STALE_MS=5*60_000、同一个 cutoff、同一个严格 <)。

  3. 影响范围与严重程度:仅影响 DSH 帧级横幅 + 回环门控的 /__bili/upstreams 管理端点的展示;不影响任何请求路由 / fail-fast / 重试退避。严重度 = 体验瑕疵(横幅误报「已恢复的上游仍不可用」),非可用性缺陷。触发条件:某上游熔断后停止被命中超过 5 分钟。

  4. 怎么修复的:只在读投影处过滤(src/upstream-alerts.ts:406-419)——open 熔断若 lastFailure?.at ?? openedAt 早于 now - ALERT_STALE_MS 就跳过;状态机里的条目原样保留,所以流量重新打进来仍会 fail-fast / 探测,下一次新鲜失败立即让该行重新出现。UI 部分(chrome 柔化 + ✕ 关闭)与 round 1 逐字节相同,未改动。

  5. 是否有回归问题:无。逐项核对既有行为——(a) 唯一生产消费者是 admin.ts:252,无路由路径引用它;(b) fail-fast / Retry-After 直接读 circuits 状态机(upstreamCircuitRetryAfterSeconds :262、getOpenUpstreamCircuits :346),与本投影解耦,未受影响;(c) 活跃(新鲜)熔断行为与旧代码完全一致(旧代码也是全部纳入),只有安静 / 过期熔断新增被剔除;(d) 无类型逃逸(无 as-any)。有意的输出变更已披露:/__bili/upstreams 从「列出所有 open 熔断」变为「安静超 5 分钟的 open 熔断暂时不列,新失败再冒出」(见上 Behavior change)。高危模式(fail-fast 变吞错 / 阈值漂移 / 时序漂移)逐项过:均不涉及。

  6. 是否破坏缓存:不涉及。本改动不触碰 prompt cache / KV / 增量游标 / 去重键;上游熔断老化是每主机独立的状态,与客户端前缀缓存无关。

  7. 是否改了设计方向:不改架构 / 边界 / 数据流。只是把已有的「单一陈旧规则」从告警源补齐到熔断源(#5572/#5701 注释里已声明两源共享一条规则),属于收敛而非转向。

  8. 是否引入了新的配置:不涉及。无新 env / config / 默认值;复用的既有常量是 ALERT_STALE_MS(=5min,早已存在)。


判定:可合(APPROVE)。 两个提交都干净、低风险、测试有牙且双向钉死;新提交为纯展示层修复,状态机不受影响,CI 零失败(测试矩阵分片运行中)。无需人工决策门禁(不碰 kernel/config/wire)。如需正式 approval 状态请由其他账号点 Approve。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

✅ review-worker-r1 二轮审毕(PR #5703 新 head 8fc410c57)= APPROVE(可合)。分支已 rebase 到新 master + 新增一个服务端提交:① UI 部分(chrome 柔化 + ✕ 关闭)与一轮逐字节相同,审批沿用;② 新提交 8fc410c57 修「安静熔断在健康报告投影里不过期」——只在读投影处按 ALERT_STALE_MS(5min) 过滤 open 熔断,状态机 / fail-fast / Retry-After 完全不受影响,纯展示层(唯一消费者 admin.ts:252),两个新测试双向钉死、确定性可手推通过。无 kernel/config/wire 触碰 → 无需人工决策门禁;CI 零失败(测试矩阵分片运行中)。已顺手核过无任何需就地修的机械小问题。(本账号即 PR 作者,GitHub 禁止自我批准,故以评论形式给出 APPROVE:#5703 (review) )

# Conflicts:
#	tests/dsh-settings-ui.test.ts
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed — merge commit 7adc0007c5 on 2026-11-05_dsh-upstream-banner-polish (single clean push 8fc410c574..7adc0007c5, no force-push, remote head had not moved when I pushed).

What I did this run:

  1. Diagnosed the conflict live: master advanced to f1a4af4eeb (pulling in [PR] fix(dsh): hide the host composer seat while the Context tab is open (#4406) / 打开上下文标签页时隐藏宿主 composer 座位 #5837 / the [Feature][dsh] The "Compression Agent" tab should not render the host composer (input field / task list / goal box) | [Feature][dsh] 「压缩代理」标签页不应渲染宿主 composer(输入框 / 任务列表 / goal 框) #4406 context-tab composer-hide work) while the PR branch carried the [Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701 banner work. Both lines touched src/agent/dsh-native-client.ts AND appended new test blocks at the exact same EOF position of tests/dsh-settings-ui.test.ts — that file was the only textual conflict.
  2. Chose merge over rebase — concurrency-safe under the push-discipline rule (no force-push needed, other agents may share the branch).
  3. Resolved by union: both sides' test additions are independent (#5701: shell.overlay upstream pill — softened chrome… vs #4406: the Context tab marks the conversation scroll container…); kept both verbatim. dsh-native-client.ts auto-merged; I verified it against BOTH parents — vs the PR head it contains exactly master's [Feature][dsh] The "Compression Agent" tab should not render the host composer (input field / task list / goal box) | [Feature][dsh] 「压缩代理」标签页不应渲染宿主 composer(输入框 / 任务列表 / goal 框) #4406 additions (data-bili-surface marker + scoped CSS), vs master exactly our [Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701 banner changes (dismissedSig state, softened chrome values, ✕ button, i18n keys) — clean union, no semantic cross-contamination.
  4. Verified locally (targeted, per local-testing discipline): fresh npm ci → npm run typecheck exit 0 → ran tests/dsh-settings-ui.test.ts standalone: 28/28 pass, including both previously-conflicting tests.
  5. Live state after push (checked just now, not from memory): PR open, mergeable: true, mergeable_state: blocked = waiting on checks/approvals, no longer a conflict. head 7adc0007c5, base f1a4af4eeb.

Expectation for the triggered CI runs: this PR's own code is green locally; any remaining reds will be the known inherited master-reds already reported in #4599 (floor 934) — #2817 deterministic ×3 shards (options A/B/C pending owner), the BLOCKED-ref flake family, and #5418 watermark ×3 shards. None are caused by this branch.


八问(中文结构化结论)

  1. 是什么问题:PR 分支与目标分支产生合并冲突(merge state dirty)——master 新合入的 [PR] fix(dsh): hide the host composer seat while the Context tab is open (#4406) / 打开上下文标签页时隐藏宿主 composer 座位 #5837/[Feature][dsh] The "Compression Agent" tab should not render the host composer (input field / task list / goal box) | [Feature][dsh] 「压缩代理」标签页不应渲染宿主 composer(输入框 / 任务列表 / goal 框) #4406(Context tab 隐藏 composer)与本 PR 的 [Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701 banner 改动同时触碰 src/agent/dsh-native-client.ts,并在 tests/dsh-settings-ui.test.ts 同一 EOF 位置各自追加了独立测试块。
  2. 什么原因导致的:两条独立工作线在同一文件同一位置并发追加内容,git 无法自动合并;属正常并发开发争用,不是语义冲突。
  3. 影响范围与严重程度:仅影响本 PR 的可合并性,用户侧行为零影响——两组代码语义独立、并集共存互不干扰。
  4. 怎么修复的:选 merge 而非 rebase(免 force-push、并发安全);唯一冲突文件按并集解决,两侧测试原样全保留;自动合并的 dsh-native-client.ts 对两个父提交分别 diff 验证为干净并集。
  5. 是否有回归问题:无。本地 typecheck 通过(exit 0);定向跑 tests/dsh-settings-ui.test.ts 28/28 全过(含冲突双方用例)。本次纯冲突合并,未改任何行为、阈值、默认值或输出格式。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/增量游标逻辑)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已解、已推送、mergeable=true(现 blocked 仅等 check/审批);新 CI 若再红即 #4599 已报备的 master 继承红项(#2817 待 owner 拍板 A/B/C),与本分支无关。

@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 — independent end-to-end review of head 7adc0007c (round 3); mergeable.

Round 3 is a clean rebase/merge of the branch onto newer master (f1a4af4ee). It introduces no new PR-authored code. Verified three ways:

  • The true PR contribution on the new base (git diff f1a4af4ee..7adc0007c) touches only the same 4 files and is byte-identical to what I approved in rounds 1–2:
    • src/agent/dsh-native-client.ts: softened banner chrome + dismissedSig ✕-dismiss-until-the-failing-set-changes + i18n upstreams_dismiss (zh+en).
    • src/upstream-alerts.ts → getUpstreamHealthReport(): quiet open circuits older than ALERT_STALE_MS are excluded from the display projection only (state machine untouched).
    • tests/dsh-settings-ui.test.ts (+75/-2): the #5701 banner test; tests/upstream-alerts.test.ts (+58): two deterministic circuit-expiry tests.
  • The ~900 lines of extra churn vs round 2 (src/server.ts, fetch-util.ts, responses-ws.ts, log-mask.ts, the #4406 Context-tab/composer-seat UI, etc.) are master's own merged work pulled in by the merge commit 7adc0007c (#5837/#4406, #5947, #5939, #5883, #5879 ci-fixes). Confirmed: base f1a4af4ee already contains all of it, and zero of those lines appear as additions in this PR's diff — so none of it is this PR's review scope.
  • Merge hygiene: the PR's own hunks survived verbatim (no conflict-resolution corruption); the react import correctly unions to { createElement, useEffect, useLayoutEffect, useRef, useState } (the extra two are master's #4406 need, harmless here).

CI on head 7adc0007c (mirror cache): fully green — 30 checks, 0 failed, 0 pending (16 success + 14 env-gated skips). Better than round 2, where 11 test-matrix shards were still running.

No kernel/, config-surface, or wire/request-path change → no authorization gate, no 🔶需要决策. No small mechanical findings to fix in place.


结构化八问

  1. 是什么问题:DSH overlay 上游横幅有三处收尾——(a) 视觉太扎眼需软化;(b) 用户想临时关掉它(✕,且故障集合不变时保持隐藏);(c) 一个 host 触发熔断后若不再被请求,会一直挂在横幅里(#5574 只清了 alert 行、没清 circuit 行)。前两项在上一轮已审通过,(c) 是本 PR 的实质新增。本轮 head 相对上一轮只是 rebase 到更新的 master,PR 自身贡献逐字节未变。
  2. 什么原因导致的:横幅常驻的根因是 getUpstreamHealthReport() 无条件把每个 OPEN circuit 合成一行,而 circuit 只在「成功」或 MAX_CIRCUITS 驱逐时才移除;host 停止被请求后既无新失败也无成功,circuit 永不老化,于是永远显示。
  3. 影响范围与严重程度:仅 DSH 客户端 UI + 回环内 /__bili/upstreams 管理端点的展示层;不触及请求路由 / fail-fast / 缓存。严重度=体验瑕疵(横幅该消失时没消失),无数据丢失、无不可用。
  4. 怎么修复的:展示投影里对每个 open circuit 取 lastActivity = lastFailure?.at ?? openedAt,早于 now - ALERT_STALE_MS(5 min)的一律跳过——与 alert 行的 pruneStaleAlerts 共用同一套老化规则、同一常量、同一严格 < 比较。只过滤投影、不动状态机:fail-fast / Retry-After 直读 circuits map,getOpenUpstreamCircuits 独立按 openedAt!==null 过滤,均不受影响。UI 侧 ✕ 用「故障集合签名」(host+kind+code,NUL/SOH 分隔后排序)记忆 dismissed:集合不变则保持隐藏,一变即重新浮现。
  5. 是否有回归问题:逐项过既有行为——fail-fast 与 Retry-After 路径(直读状态机)不变;active open circuit(lastActivity 新鲜)行为与旧代码完全一致(旧代码本就包含所有 open);只有「安静」stale open circuit 新增地被排除。高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序漂移 / 输出格式变化)均未命中。测试双向钉死(安静即消失 + 仍在失败则保留),确定性时钟、无真实定时器/端口。
  6. 是否破坏缓存:不涉及——无缓存 / 重试游标 / 去重键改动;x-bili-pf-* 水位头与 prefix cache 均不受影响。
  7. 是否改了设计方向:不改架构 / 边界 / 数据流;仅把「alert 行老化」规则对称地补到「circuit 行展示」这一处投影上(#5572/#5701 归一到同一 staleness 规则)。
  8. 是否引入了新的配置:不涉及——无新 env / config / 默认值;复用既有 ALERT_STALE_MS(5 min)。

判定:可合(APPROVE)。 本轮为 rebase 到 master,PR 贡献未变且前两轮已审通过;CI 全绿(0 failed / 0 pending)。无 kernel/config/wire 触碰,无决策项,无小修待补。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 review-worker-r1 round 3 done: PR #5703 head 7adc000 = APPROVE (mergeable). Round 3 is only a rebase onto newer master f1a4af4ee — the PR's own contribution is byte-identical to approved rounds 1–2 (dsh banner chrome + ✕ dismiss-until-set-changes + getUpstreamHealthReport circuit-row aging); the ~900 extra lines vs round 2 are master's own merged work (#4406/#5837 etc.), not this PR's. CI fully green (30 checks, 0 failed, 0 pending). No kernel/config/wire change, no decision items, no small fixes left open. Review posted as comment #5703 (review) (formal self-approval blocked — PAT is the author).

# Conflicts:
#	src/upstream-alerts.ts
#	tests/upstream-alerts.test.ts
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed — merge commit 670f9fb23f on 2026-11-05_dsh-upstream-banner-polish (single clean push 7adc0007c5..670f9fb23f, no force-push; remote head had not moved when I pushed).

What I did this run:

  1. Diagnosed live: master advanced f1a4af4eeb → 4dea18eabf (269 files) since my last merge. The new conflict sits in a specific spot: master pulled in The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026 "age idle open upstream circuits out of status reports" (+ the half-open probe-slot lease fix) — which fixes the same defect as this PR's companion commit 8fc410c574 ("expire quiet open circuits in the health-report projection", the upstream half of [Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701), but more completely. Two conflicting implementations of one mechanism → 5 conflicted hunks across src/upstream-alerts.ts (2) and tests/upstream-alerts.test.ts (3).
  2. Resolved by taking master's side in every hunk. Master's The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026 is a strict superset: shared isOpenCircuitStale() helper applied to BOTH projections (getUpstreamHealthReport AND getOpenUpstreamCircuits/acp_status), with a stricter anchor (nextProbeAt ?? lastFailure?.at ?? openedAt — the probe lease keeps actively-managed circuits fresh) and its own pinned tests. Keeping our parallel inline filter would be redundant dead code, and one of our test assertions (stale circuit still listed in getOpenUpstreamCircuits) directly contradicts master's shipped behavior — so our two superseded test cases were dropped; their coverage (quiet ages out / still-failing never does / re-surface on fresh failure) is fully carried by master's three The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026 tests.
  3. Verified the outcome: the two files are now byte-identical to origin/master (diff empty). The PR's net diff vs master is exactly its dsh banner work: src/agent/dsh-native-client.ts (+17/−2) and tests/dsh-settings-ui.test.ts (+75/−4).
  4. Local verification (targeted): fresh npm ci (workdir deps had been wiped between runs) → typecheck exit 0 → tests/upstream-alerts.test.ts 15/15 pass, tests/dsh-settings-ui.test.ts 28/28 pass.
  5. Live state after push (checked just now): PR open, mergeable: true, mergeable_state: blocked = waiting on checks/approvals, no longer a conflict. head 670f9fb23f, base 4dea18eabf.

Behavior note (convergence, disclosure per policy): on this branch the upstream-circuit staleness rule changes from our #5701 version (anchor lastFailure?.at ?? openedAt, filtering the health report only) to master's #6026 version (anchor nextProbeAt ?? lastFailure?.at ?? openedAt, filtering both the health report and the acp_status listing). That is convergence onto behavior master already ships — nothing new introduced by this PR. Expectation for the triggered CI runs: any remaining reds will be the known inherited master-reds reported in #4599 (floor 934 — #2817 deterministic ×3 shards pending owner A/B/C, BLOCKED-ref flake family, #5418 watermark ×3), not this branch.


八问(中文结构化结论)

  1. 是什么问题:目标分支再次前进后合并冲突复发——这次冲突点是本 PR 伴随提交([Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701 的 upstream-alerts 部分)与 master 新合入的 The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026 对同一缺陷的两套不同实现。
  2. 什么原因导致的:在途重复修复——PR 评审期间 master 落地的 The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026(空闲 open 熔断从状态报告老化剔除)+ 半开探测租约修复,是同一机制更完整的实现(共享 helper、覆盖两个投影面、自带测试);git 无法自动合并两套并存实现。
  3. 影响范围与严重程度:仅影响本 PR 分支内容;用户侧行为零影响——解决后保留的正是 master 已发布行为 + 本 PR 自己的 dsh banner 改动。
  4. 怎么修复的:选 merge(免 force-push);5 处冲突全部取 master 侧——The DSH upstream header is permanently occupied by the cooled OPEN circuit. | DSH 上游横幅被已冷却的 OPEN circuit 永久占据 #6026 是 [Bug] DSH client upstream health banner has styling issues and does not auto-dismiss | [Bug] DSH 客户端上游健康横幅样式异常且不自动消失 #5701 实现的严格超集,保留我们的并行内联过滤会是冗余死代码,且我们一条测试断言与 master 已发布行为直接矛盾故移除(其覆盖被 master 三个用例完整承接)。净效果:两文件与 origin/master 逐字节一致,PR 有效 diff 收敛为纯 dsh banner 改动。
  5. 是否有回归问题:无。typecheck exit 0;定向跑两个受影响测试文件本地 15/15、28/28 全过。未引入任何新行为,只对齐 master 已发布实现。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及(方向未变,仅实现收敛到 master 更完整的版本)。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已解、已推送、mergeable=true(blocked 仅等 check/审批);新 CI 若再红即 #4599 已报备的 master 继承红项(#2817 待 owner 拍板),与本分支无关。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

本 run 的完整报告已在上文(floor 23,09:07Z)——这条提醒似乎与那次发帖撞了时序。摘要重述,不重复全文:

@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 — independent end-to-end review of head 670f9fb23 (round 4); mergeable.

Round 4 is a rebase onto newer master (4dea18eab). The meaningful change this round is that the PR's scope shrank from 4 files to 2, and I verified that is correct, not a regression:

  • The server-side half — "age idle open circuits out of the status report" — was independently shipped to master via dcbe8ff24 "fix: age idle open upstream circuits out of status reports (#6026)", using a named isOpenCircuitStale(e, now) predicate in getUpstreamHealthReport(). That is functionally the same report-only staleness filter this PR previously carried (rounds 2–3). Once the branch merged the newer master (670f9fb23), the PR's redundant src/upstream-alerts.ts hunk collapsed to zero net change — master's version stands. So there is no duplicate and no lost fix: the "idle open circuit lingers in the banner/report" bug stays fixed on master (#6026).
  • The PR now carries exactly its titled scope — DSH upstream banner UI only — across 2 files, byte-equivalent to what I approved in rounds 1–3:
    • src/agent/dsh-native-client.ts (+17/-2): i18n key upstreams_dismiss (zh+en); dismissedSig state; sig = per-row host+kind+code (NUL/SOH separators, sorted) with if (dismissedSig === sig) return null; softened chrome (border rgba(217,63,11,0.5)→0.35, background 0.1→0.08, borderRadius 8→10, padding 8px 12px→10px 14px, added boxShadow); ✕ button (type="button", title/aria-label = t("upstreams_dismiss"), onClick → setDismissedSig(sig), text color inherited).
    • tests/dsh-settings-ui.test.ts (+75/-2): updated #4254 comment (slot registration still not user-hidable) + new deterministic #5701 test driving the real bundled component — asserts the concrete chrome values and the full dismiss state machine (click→null; count/ETA churn of the same set stays null; a changed set re-surfaces with "2 个上游不可用" + the new host; unmount cancels the poll loop). Fake timers, no real ports — has teeth.
  • Coexistence with master is clean: the PR delta shows #6026 only as context (already-merged lines), never as an addition; no conflict-resolution corruption of the PR's own hunks.

CI on head 670f9fb23 (mirror cache): fully green — 30 checks, 0 failed, 0 pending (16 success + 14 env-gated skips).

No kernel/, config-surface, or wire/request-path change → no authorization gate, no 🔶需要决策. No small mechanical findings; no open ends.


结构化八问

  1. 是什么问题:DSH overlay 上游横幅的 UI 收尾——软化视觉(低饱和边框/背景、更大圆角与内边距、轻投影)+ 加一个 ✕ 按钮,点掉后在「故障集合」变化前保持隐藏(同一批 host/kind/code 的计数与重试 ETA 抖动不会让它重新冒出来,任何新增或变化的故障会再次浮现)。本轮 head 是 rebase 到更新的 master;PR 范围从 4 文件缩到 2 文件,因为服务端那半已被 master 自己通过 #6026 合入。
  2. 什么原因导致的:横幅常驻且扎眼是纯展示层问题。其服务端根因(getUpstreamHealthReport 无条件把 open circuit 合成一行、空闲 circuit 永不老化)已由 master 的 dcbe8ff24(#6026)独立修复并合入;本 PR 只负责客户端 UI 这一半。
  3. 影响范围与严重程度:仅 DSH 客户端 UI(shell.overlay 插槽渲染),不触及请求路径 / fail-fast / 缓存 / 存储。严重度=体验瑕疵。无数据丢失、无不可用。
  4. 怎么修复的:客户端用「故障集合签名」(每行 host+kind+code,NUL/SOH 分隔后排序)记忆 dismissedSig;集合不变则 return null,一变即重新浮现。chrome 降饱和:border 0.5→0.35、background 0.1→0.08、radius 8→10、padding 8px12px→10px14px、加 boxShadow;文字颜色继续继承 host token。
  5. 是否有回归问题:逐项过——#4254 既有测试只更新注释,插槽注册行为不变(仍不可被用户隐藏);新增测试双向钉死(点掉→null / 同集合抖动保持 null / 集合变化重新浮现并带新 host);确定性假定时器、无真实端口。React hook 顺序安全(全部 useState/useEffect 早于两个 early-return)。高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序漂移 / 输出格式变化)均未命中。
  6. 是否破坏缓存:不涉及——无缓存 / 重试游标 / 去重键改动。
  7. 是否改了设计方向:不改架构 / 边界 / 数据流;纯展示层增量。本轮把范围收敛回 PR 标题所述(banner UI),服务端半交给 master #6026,边界更干净而非转向。
  8. 是否引入了新的配置:不涉及——无新 env / config / 默认值。

判定:可合(APPROVE)。 本轮为 rebase 到 master,PR 贡献收敛为纯 UI(与前几轮已审通过部分逐字节一致),服务端半由 master #6026 承接、未丢失;CI 全绿(0 failed / 0 pending)。无 kernel/config/wire 触碰,无决策项,无小修待补。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 review-worker-r1 round 4 done: PR #5703 head 670f9fb23 = APPROVE (mergeable). Round 4 is a rebase onto newer master 4dea18eab; the PR shrank 4→2 files because master independently shipped the server-side circuit-aging fix via #6026 (dcbe8ff24), so this PR now carries only its titled UI scope — banner chrome softening + ✕ dismiss-until-the-failing-set-changes + deterministic test — byte-equivalent to approved rounds 1–3, and nothing was lost (the server half lives on master). CI fully green (30 checks, 0 failed, 0 pending). No kernel/config/wire change, no decision items, no open ends. Review comment #5703 (review) (formal self-approval blocked — PAT is the author).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Round 4 on PR #5703 is fully done and verified — nothing outstanding. Verdict: APPROVE (head 670f9fb23). What's verified: (1) the 4→2-file shrink is correct, not a regression — master independently shipped the server-side circuit-aging fix via #6026 (dcbe8ff24), so this PR now carries only its titled UI scope (banner chrome softening + ✕ dismiss-until-the-failing-set-changes + deterministic test), byte-equivalent to approved rounds 1–3, and nothing was lost; (2) CI fully green on this head (30 checks, 0 failed / 0 pending); (3) no kernel/config/wire change → no decision gate, no small findings, no open ends. Nothing remains; no residual risk. Review comment posted at #5703 (review) — ready for merge.

@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 — independent end-to-end review of head 1e44cd5ef (round 5); mergeable.

Round 5 is a rebase onto newer master (dc041dd1ab) plus one new, well-scoped commit: 1e44cd5ef "make the upstream banner click-through except its ✕ button". I read the full delta — everything except that fix is byte-identical to what I approved in rounds 1–4.

The new change (and why it's correct):

  • The shell.overlay slot floats above host chrome, so the banner body — a <div> with background/border/padding — was capturing pointer events meant for the host controls underneath it, blocking clicks. The fix sets pointerEvents: "none" on the banner root and pointerEvents: "auto" on the ✕ button only.
  • This is the standard CSS overlay pattern: a child's pointer-events: auto overrides an ancestor's none, so exactly one element (the ✕) stays interactive while the rest of the banner lets clicks pass through. The row lines are display-only text, so making them click-through has no downside; the ✕ was the only interactive element, so nothing is lost. Keyboard focus/activation of the ✕ is unaffected by pointer-events, so accessibility is intact.
  • A comment documents the rationale (overlay sits above host chrome; body must stay click-through).

Test: adds both directions at the right level for this vm-realm harness (no real hit-testing possible, so it asserts the exact style values): st.pointerEvents === "none" (banner body click-through) and the ✕ button's style.pointerEvents === "auto" (re-enabled). Concrete, would catch a regression if either setting were dropped. The rest of the #5701 test (chrome values + full dismiss state machine) is unchanged from round 4.

CI on head 1e44cd5ef (mirror cache): 0 failed; 8 test-matrix shards still queued at review time (13 skipped + 9 success completed), consistent with prior rounds where the matrix finished green. No red anywhere.

No kernel/, config-surface, or wire/request-path change → no authorization gate, no 🔶需要决策. No small mechanical findings; no open ends.


结构化八问

  1. 是什么问题:DSH overlay 上游横幅是浮在宿主界面之上的插槽,其主体(带背景/边框/内边距的 div)会挡住下层宿主控件的点击。本轮在已批准的「软化视觉 + ✕ 关闭」之上,新增让横幅主体点击穿透、仅 ✕ 按钮可点。(另:本轮 rebase 到更新的 master dc041dd1ab。)
  2. 什么原因导致的:overlay 插槽渲染在宿主 chrome 之上,横幅主体默认 pointer-events:auto,覆盖区域吞掉了本应落到宿主按钮上的指针事件。
  3. 影响范围与严重程度:仅 DSH 客户端 UI(shell.overlay 插槽),不触及请求路径 / fail-fast / 缓存 / 存储。严重度=交互体验缺陷(横幅盖住时点不到下层控件)。无数据丢失、无不可用。
  4. 怎么修复的:横幅根节点设 pointerEvents:"none"(整体穿透),✕ 按钮单独设 pointerEvents:"auto"(子级 auto 覆盖父级 none,标准 CSS overlay 模式);行内容是纯展示文本,穿透无副作用;✕ 是横幅唯一交互元素,未丢功能;键盘焦点/激活不受 pointer-events 影响,无障碍不受损。
  5. 是否有回归问题:逐项过——新增测试双向钉死(横幅体 none + ✕ 按钮 auto);其余部分(i18n / dismissedSig / 签名抑制 / 降饱和 chrome / #5701 状态机)与前几轮已审通过逐字节一致;React hook 顺序安全。高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序漂移 / 输出格式变化)均未命中。
  6. 是否破坏缓存:不涉及——无缓存 / 重试游标 / 去重键改动。
  7. 是否改了设计方向:不改架构 / 边界 / 数据流;纯展示层增量,且是让浮层不遮挡宿主的正确做法。
  8. 是否引入了新的配置:不涉及——无新 env / config / 默认值。

判定:可合(APPROVE)。 新增的点击穿透修复正确、聚焦、双向有测试;其余与前几轮已审部分逐字节一致。CI 0 failed(8 个测试矩阵分片评审时仍在排队,与此前各轮最终全绿一致)。无 kernel/config/wire 触碰,无决策项,无小修待补。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 review-worker-r1 round 5 done: PR #5703 head 1e44cd5ef = APPROVE (mergeable). Round 5 adds one new commit on top of the approved banner work — makes the floating overlay banner click-through except its ✕ button (banner root pointerEvents:"none", ✕ button pointerEvents:"auto"), so it no longer blocks the host controls underneath it; standard CSS overlay pattern, both directions asserted in the test. Everything else is byte-identical to approved rounds 1–4. CI 0 failed (8 test-matrix shards still queued at review time, consistent with prior rounds finishing green). No kernel/config/wire change, no decision items, no open ends. Review comment #5703 (review) (formal self-approval blocked — PAT is the author).

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

1 participant