Skip to content

【BUG】配置面板显示“配置请求超时(20s):宿主未回”,无重试导致用户无法看到正常效果 #1142

Closed

Description

@FeatherHunter

实际(看到什么;可含影响范围)

配置面板显示“配置请求超时(20s):宿主未回”。

用户疑问:我们不能重复请求吗?那用户永远没办法看到正常效果了。

影响范围:配置面板正常效果不可见,用户被卡在超时错误态,无自助恢复路径。

预期

  • 超时后提供可用的重试路径(手动重试和/或自动重试),至少让用户能再次触发配置请求并看到正常效果。
  • 若宿主持续无回执,给出明确状态与下一步指引,而不是永久停留在错误文案。

复现/读数

  • 读数来源:用户在配置面板亲眼看到的文案“配置请求超时(20s):宿主未回”。
  • 判据:打开配置面板触发配置请求,20s 未收到宿主回执即显示该文案,且当前界面用户感知无重试入口。

诊断(triage 2026-10-05,不改代码)

现象是什么

  • 配置面板整面读取失败,落字为超时文案(20s)。该文案由两处其一产生:
    • packages/plugin-manager/src/config-panel-value.ts:191(withDeadline 兜底)或 :221(catch AbortError/TimeoutError),常量 READ_TIMEOUT_MS = 20_000(config-panel-contract.ts:79)。
    • 若是作息/备忘等各家自家体检电话,则是各家 client.ts 同文案(如 plugin-schedule-ilife/src/client.ts:51)。
  • 关键纠正:当前主干已有手动重试入口,不是“完全不能重发”:
    • failed 态画“重试”按钮(config-panel-view.ts:844),
    • 正常条画“重新读取”按钮(:918),都经 config-panel.ts:312 onRetry -> load() -> fetchConfigSurface 重新发一次 config.get。
  • 所以用户真实卡点不是“按钮不存在”,而是以下之一:(a)没看到/没点按钮;(b)点了也一样超时;(c)面板挂载只读一次、无自动重试,一次瞬时失败就永久停在失败态直到人工点。

影响范围

  • 配置面板整面不可见:只读行、可改行、保存/重置都不可用(failed 分支只画 head + 错误 + 重试/重置)。
  • 若是技能侧 config.get 同步阻塞型(如备忘 lark 探测),则每次重试都大概率再超时,用户体感就是“永远看不到正常效果”。

复现步骤(最小复现,未实际复现成功,需 reporter 补信息)

  1. 打开出问题的那一家设置页(需指明是哪一家)。
  2. 观察是否 20s 后落字“配置请求超时(20s):宿主未回”。
  3. 点“重试”/“重新读取”,观察是恢复还是再次同文案超时。
  • 当前缺:哪一家面板、DSH 版本、宿主日志、点重试后的结果。未做真机复现。

根因候选(含置信度)

  • A. 宿主通道一次也未回(connection.rpc.call 未 resolve/宿主路由未就绪):中。面板挂载 useEffect 只读一次(config-panel.ts:150-167),无首帧自动退避重试;对照 update-panel.ts:315-317(票 爱生活的配置面板显示更新能力没接上(面板连不上总管插件) #982 首帧失败按退避表重试)可知配置面板缺这一环,一次瞬时未就绪即永久失败态。
  • B. 技能侧 config.get 同步阻塞超 20s,每次必超时:中高(若出事的是备忘)。实锤背景:docs/agents/配置区域视觉模型-对抗式审查.md:63 明确记“备忘 lark 格住在 config.get 回执里、同步跑探测、面板一次 RPC 20s 超时”。
  • C. 用户没发现已有重试按钮 / 在用旧构建:中低。代码有按钮,但需确认用户当时界面是否有“重试”行、点后现象。
  • D. 宿主持续无回执(loader 未注册通道、bridge 抛错在 race 之外等):低中。需宿主日志才能定,类似 dsh-client-contract.md:134 记录过的“抛错在 race 之外”形态。

分流建议

  • 先落 needs-info(缺“哪一家 + 点重试结果 + 宿主日志”三个关键信息,无法在 A/B 之间定唯一修法)。
  • 信息回齐后预期转 ready-for-agent:面板侧通用加固(首帧自动退避重试 + 超时文案带通道名/请求 ID + 明确重试指引)与技能侧解阻塞(二选一按回信定)。
  • “加一个重试按钮”本身已实现,不单独立项。

备注

  • 新建时未经诊断,按规则带 needs-triage;本次 triage 后摘 needs-triage 转 needs-info。

进度

  • 2026-10-05 triage:读票面/评论/标签(open + bug + needs-triage,无评论无实施);grep 全仓超时文案,读 config-panel-value.ts/config-panel.ts/config-panel-view.ts 确认已有重试链路;查备忘/作息 client 与对抗式审查确认 B 候选;未改代码、未关闭。

选型定案(2026-10-05,维护者已认可两轮)

  • 方向:快慢分离 + 有界重试。read 只做本地快事,不带外部探测与完整体检;飞书与告警只走 check 独立槽;快路径首帧按 [1000,3000,8000] 退避,仅 read 自动重试,save/reset 永不自动重试;重试中禁用、迟到丢弃。
  • 收紧(对抗审查后):read 不返回 alerts;错误码分 TIMEOUT_RETRYABLE / FETCH_FATAL,耗时打日志;面板读 lark 用 check 优先、read 回退;本票备忘 exemplar,五家只读审计。
  • 状态:待实施,已转 ready-for-agent。

实施(2026-10-05 已实施待验,未关闭)

  • 根因定死:备忘 read 含飞书三连探+完整体检(最坏70s),作息同位置早已拆开(read 只做本地+轻量告警,lark 只走 check)。

  • 已改:技能 read 去 lark 与完整体检(轻量目录判定替代);共用面板快路径首帧 [1000,3000,8000] 有界重试+在途去重+超时带通道;备忘附加块改 check 优先、read 回退,独立 loading/重新检测。

  • 已验:类型三包过;备忘 surface 41 + t760 18 全绿;技能预算(hang 住 lark 20ms 级秒回、无 lark 格)过;面板重试 7 用例过;update-retry 与 config-695 回归过。

  • 已提交:4bef905a(8 件,对账零偏差);另五家只读审计:bill/calorie/chef 的 read 仍调完整健康报告(较轻、无 lark 70s 项),home 干净,follow-up 另起。

  • 超线:config-panel.ts 351 行、memo client.ts 564 行,已超线,需要根据规则进行重构。超因:重试计时器+去重与独立体检槽同票进;拆法:面板抽重试 hook、备忘拆功能页/设置页/健康三件,下轮单独立项,本票先不拆。

  • 对抗自查:边界☑(缺席/坏配置/旧技能有lark/新技能无lark/check坏信封与超时各有落点);异常分支☑(连接缺席/信封异常/超时带通道+下一步,save/reset永不自动重试);回归☑(surface+t760+config-695+update-retry+新预算重试全绿,类型三包过);并发与旧数据☑(手动在途去重、挂载 alive+计时器清理、迟到丢弃;旧技能回退显示、新技能缺席弱提示;新旧面板混布已说明)。

  • 交付对账(结构第五步):实碰 3 目录 8 件——skill-memo/cli(read 去慢依赖)、plugin-memo/src(附加块独立体检)、manager/src(共用面板重试与自解释超时)+ 各自测试;与第一步清单逐行对上,偏差零。

对抗审查回退(2026-10-05 已实施:50e87d23)

  • 修复制断链:prompt 三件进体检报告,面板报告优先、旧回执回退,复制按钮新旧技能常在;体检 lark 文案去 dangling,指向面板按钮。
  • 合一:目录告警文案收进探针共用函数,read 与体检同口径;重试表加相等断言防漂移(合一另立项);失败日志补 elapsedMs。
  • 验:新单测 10 + 回归 88 全绿,类型三包过。未做:慢槽拆分、Outcome 码扩展、重试进度 UI,另立项。

Activity

  1. added
    bug
    needs-triage
    on Oct 5, 2026
  2. FeatherHunter commented on Oct 5, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    Triage Notes

    What we've established so far:

    • 超时文案来自 20s 有界等待(plugin-manager/config-panel-value.ts:191/221,READ_TIMEOUT_MS=20000);面板主干已有“重试/重新读取”按钮(view:844/918 -> config-panel.ts:312 load()),所以不是“发不出第二次”,问题在“点了也可能再超时 / 没自动重试”。
    • 根因在 A(首帧无自动重试,一次瞬时失败即永久失败态)与 B(技能侧 config.get 同步阻塞,如备忘 lark 探测,见对抗式审查:63)之间摆动,需 reporter 回信才能定。
    • 已摘 needs-triage,转 needs-info;未改代码、未关闭。

    What we still need from you (@reporter):

    • Q1 Φ哪一家的面板(记账/卡路里/备忘/作息/居家/大厨/总管)+ DSH 与插件版本?
    • Q2 Φ失败态有没有看到“重试”按钮?点了之后是恢复还是同样超时(贴第二次文案)?
    • Q3 Φ宿主日志里这次 config.get 有没有到达(通道名 + 有无报错堆栈)?
  3. added
    needs-info
    and removed
    needs-triage
    on Oct 5, 2026
  4. FeatherHunter commented on Oct 5, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Settings panel times out as a whole because one slow external probe blocks the fast local config read; split fast/slow and bound retries

    Current behavior:
    Opening a skill settings tab issues a single config read that also runs the external companion-CLI probe and the full health report synchronously. Any hang in the external tool makes the whole panel fail after the shared timeout with a generic host message, and the existing manual retry replays the same blocking call so it times out again.

    Desired behavior:
    The config read returns fast local state in well under two seconds with no external processes and no full health evaluation. Companion status and health alerts load through the existing config check channel in an independent slot with its own loading and re-detect action, and a slow or failed check never blocks the form, save, or reset. The first mount of the fast path retries on transient transport failure with bounded backoff and unmount cleanup; save and reset never auto-retry. Timeout wording names the channel and method plus the next user action; machine codes go to the log, not the screen.

    Key interfaces:

    • Config read result type (path, data directory, created flag, values, resolved paths, optional companion status, no alerts) — absent companion status renders as a weak hint, never an error; alerts are absent from this result by contract
    • Config check report type — the sole source for companion tier and all health alerts
    • Panel state machine — fast path has loading / ready / failed; slow slot has independent loading / error / re-detect; in-flight reads are de-duplicated and late replies are dropped
    • Retry policy type — bounded delay list, only for reads, with disabled-while-retrying and visible progress plus cancellation
    • Error taxonomy — retryable timeout versus fatal fetch failure, with elapsed time recorded and a log line under the shared pack prefix

    Acceptance criteria:

    • With the companion CLI missing or hung, the form renders in under two seconds and only the companion slot shows fallback
    • Blocking the companion CLI never causes a whole-panel timeout
    • The config read performs no external processes and no full health evaluation under a hung companion CLI
    • First-mount transport failure recovers automatically within the bounded backoff without a manual click
    • Save and reset never auto-retry; manual retry stays available
    • Rapid retry clicks do not produce parallel reads and late replies do not overwrite the panel
    • Timeout text names the failing channel and method and states the next action
    • Existing surface, copy, and boundary gates stay green

    Out of scope:

    • Host-side async spawn rewrite, request tracing, or cross-request coalescing
    • Cache with stale-while-revalidate for config values
    • Raising the shared timeout
    • Fixing the other five skills in this ticket (audit only; fixes are follow-ups)
  5. added
    ready-for-agent
    and removed
    needs-info
    on Oct 5, 2026
  6. FeatherHunter commented on Oct 5, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    关闭说明:快慢分离 + 有界重试已落地(4bef905a、50e87d23),门禁全绿,真机不再撞 20s 整面墙。残留(慢槽拆分、码扩展、重试进度)另立 follow-up;复发直接 reopen 本票。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions