Repository navigation
Description
English
Context
#3427 established one context-aware, user-controlled diagnostics pipeline for on-demand capture, operation failures, Renderer recovery, and pre-Renderer native dialogs. Its review identified two non-blocking P2 gaps, while the PR deliberately left crash-survivability and demonstrated inline-only coverage gaps outside its clipboard-only, no-storage scope.
The two review gaps are now closed by #3465, #3478, and #3489. The remaining work must stay split by evidence owner and lifecycle rather than grow the live diagnostics pipeline into a general crash-reporting subsystem.
Completed follow-ups
1. Guard default-Host projection completion and ordering
- Reuse a shared Host-identity completion guard for default-Host-backed Skills, managed-source, bundled-catalog, scheduled-task, and Project refreshes (fix(desktop): guard Host projections and fallback reports #3465).
- Capture the resolved
{ profileId, hostId }for each request and commit its result only while that identity is still the current default (fix(desktop): guard Host projections and fallback reports #3465). - Keep only the latest-started same-Host refresh authoritative for each affected projection, with focused ordering coverage (fix(desktop): keep same-Host projection refreshes latest-wins #3477, fix(desktop): keep module refreshes latest-wins #3478).
- Suppress obsolete error feedback from a superseded refresh while preserving current-generation failures (fix(desktop): suppress superseded refresh errors #3489).
Sources: #3427 (comment) and follow-up review threads on #3465/#3478.
2. Bound the browser-only diagnostics fallback
- Reuse one Renderer-report formatter for the non-Electron fallback instead of concatenating unrestricted fields (fix(desktop): guard Host projections and fallback reports #3465).
- Define explicit UTF-8 budgets for individual fields and the final report, including oversized
data:URLs (fix(desktop): guard Host projections and fallback reports #3465). - Cover the contract with focused oversized-error/location tests without introducing another diagnostics authority (fix(desktop): guard Host projections and fallback reports #3465).
Source: #3427 (comment).
Remaining work
3. Close evidence gaps that outlive or bypass the current process surface
- Expose bounded Desktop diagnostics and one native recovery decision when the main Renderer disappears while Electron main remains alive (feat(desktop): expose diagnostics when the main Renderer process disappears #3490, fix(desktop): recover from main Renderer loss #3495).
- Define bounded next-launch evidence after Electron main itself dies (discussion(desktop): define bounded next-launch evidence for hard main-process crashes #3491).
- Audited inline-only Renderer failures against current reports and open user issues; no demonstrated evidence gap currently justifies a general capture layer. Reopen only for a concrete user path.
- Preserve bounded local Runtime Host exit evidence without inventing cross-deployment persistence; the demonstrated Desktop path is tracked by Desktop conversation reads fail while the local Runtime Host stays unavailable after transport EOF #3333.
- Split by lifecycle owner: feat(desktop): expose diagnostics when the main Renderer process disappears #3490 (live Electron main), discussion(desktop): define bounded next-launch evidence for hard main-process crashes #3491 (hard main-process loss), and existing Desktop conversation reads fail while the local Runtime Host stays unavailable after transport EOF #3333 (local Runtime Host exit).
Constraints
- Keep evidence user-controlled, bounded, and redacted.
- Do not add automatic upload, telemetry, raw/unbounded export, or fallback to an unrelated Runtime Host.
- Reuse the diagnostics authority established by feat(desktop): make diagnostics context-aware and available on demand #3427; avoid a second report pipeline.
- Evaluate the combined design, not only each local fix, so the follow-ups do not accumulate into a larger diagnostics subsystem than supported paths require.
AI use
OpenAI Codex assisted with consolidating the review follow-ups and maintaining this tracking issue. The human contributor remains responsible for the scope and decisions.
简体中文
背景
#3427 为主动采集、操作失败、Renderer 恢复界面和 Renderer 启动前的原生弹窗建立了一条上下文感知、由用户主动控制的统一诊断链路。Review 留下了两个非阻塞 P2,同时有意将需要跨进程存活的崩溃证据和经证实的内联错误覆盖盲区排除在当前“仅写入剪贴板、不新增存储”的范围之外。
两个 review 问题现已由 #3465、#3478 和 #3489 闭合。剩余工作必须按证据 owner 与生命周期拆分,不能把现有实时诊断链路继续膨胀成通用崩溃上报系统。
已完成的后续工作
1. 保证默认 Host projection 的完成时 authority 与刷新顺序
- 为依赖默认 Host 的 Skills、managed source、bundled catalog、scheduled task 和 Project 刷新复用共享的 Host identity 完成检查(fix(desktop): guard Host projections and fallback reports #3465)。
- 每个请求捕获已经解析的
{ profileId, hostId },仅在该 identity 仍是当前默认 Host 时提交结果(fix(desktop): guard Host projections and fallback reports #3465)。 - 对每个受影响 projection,仅允许同一 Host 上最后启动的刷新提交,并加入定向时序覆盖(fix(desktop): keep same-Host projection refreshes latest-wins #3477、fix(desktop): keep module refreshes latest-wins #3478)。
- 屏蔽已被取代刷新的过期错误反馈,同时保留当前 generation 的真实失败(fix(desktop): suppress superseded refresh errors #3489)。
来源:#3427 (comment) 以及 #3465/#3478 的后续 review thread。
2. 限制纯浏览器诊断 fallback 的大小
- 非 Electron fallback 复用统一的 Renderer 报告 formatter,不再直接拼接无限长字段(fix(desktop): guard Host projections and fallback reports #3465)。
- 为各字段和最终报告定义明确的 UTF-8 预算,包括超长
data:URL(fix(desktop): guard Host projections and fallback reports #3465)。 - 用超长 error/location 定向测试覆盖契约,不增加第二个诊断 authority(fix(desktop): guard Host projections and fallback reports #3465)。
剩余工作
3. 补足当前进程界面消失后或绕过现有入口的证据盲区
- Electron main 仍存活时,主 Renderer 丢失会提供有界的 Desktop 诊断和一次原生恢复决策(feat(desktop): expose diagnostics when the main Renderer process disappears #3490、fix(desktop): recover from main Renderer loss #3495)。
- 定义 Electron main 自身终止后的有界下次启动证据(discussion(desktop): define bounded next-launch evidence for hard main-process crashes #3491)。
- 已对照当前报告和开放用户 issue 审计 Renderer 内联失败;目前没有经证实的证据缺口值得引入通用采集层。仅在出现具体用户路径后重开。
- 为本地 Runtime Host 退出保留有界证据,不引入跨部署通用持久化;已证实的 Desktop 路径由 Desktop conversation reads fail while the local Runtime Host stays unavailable after transport EOF #3333 跟踪。
- 已按生命周期 owner 拆分:feat(desktop): expose diagnostics when the main Renderer process disappears #3490(Electron main 仍存活)、discussion(desktop): define bounded next-launch evidence for hard main-process crashes #3491(main process 硬终止)及现有 Desktop conversation reads fail while the local Runtime Host stays unavailable after transport EOF #3333(本地 Runtime Host 退出)。
约束
- 证据必须由用户主动控制、保持有界并经过脱敏。
- 不增加自动上传、遥测、原始或无界导出,也不回退到无关 Runtime Host。
- 复用 feat(desktop): make diagnostics context-aware and available on demand #3427 建立的诊断 authority,不形成第二条报告链路。
- 按整体方案而不是逐个局部修复评估复杂度,避免 follow-up 累积成超出真实支持路径所需的诊断子系统。
AI 使用
OpenAI Codex 协助汇总 review follow-up 并维护本 tracking issue;范围和决策仍由贡献者本人负责。
Activity