Uh oh!
There was an error while loading. Please reload this page.
fix(runtime-host): report startup recovery failures - #2906
Conversation
Preserve the primary recovery failure through Host shutdown and carry a bounded, non-sensitive classification through Candidate election. Desktop, TUI, and CLI now report actionable startup errors instead of exposing a transient draining state. This deliberately leaves incompatible stored records unchanged for the owning migration work. Generated-by: Codex
Treat a failed Candidate as diagnostic evidence instead of authority over the entire election, allowing a ready successor to win. Keep transient recovery and storage failures reconnectable while preserving deterministic stored-data failures. Classify only the primary error chain, recognize filesystem storage failures, and remove the migration category that had no production source. Generated-by: Codex
Remove top-level filesystem and SQLite error guessing because the Candidate boundary cannot know which resource owns a generic failure. Only the Storage-owned persisted-message error remains a deterministic startup classification. Generic failures stay retryable and no longer suppress successor Candidates within the same election. Generated-by: Codex
73df0e2 to
b0bf84cCompareM4n5ter
commented
Aug 12, 2026
EnglishI have manually reviewed this pull request and confirmed the fixes it contains. The implementation now preserves the primary Runtime Host recovery failure, reports persisted-data incompatibility without exposing stored content, keeps unknown startup failures retryable, and allows a healthy successor Host to win the election after an earlier Candidate fails. I also confirmed that only the explicitly typed stored-data incompatibility is treated as permanent, without inferring storage ownership from generic filesystem or SQLite errors. The implementation and relevant validation results are acceptable to me. 简体中文我已人工审查此 Pull Request,并确认其中包含的修复。 当前实现能够保留 Runtime Host 的首要恢复错误,在不暴露持久化内容的前提下报告数据不兼容;未知启动失败仍可重试,较早失败的 Candidate 也不会阻止健康的后继 Host 赢得 election。我同时确认,只有明确类型化的持久化数据不兼容会被视为永久错误,代码不会再根据通用文件系统或 SQLite 错误猜测存储归属。 该实现及相关验证结果对我而言是可接受的。 |
Uh oh!
There was an error while loading. Please reload this page.
English
Summary
Runtime Host recovery failures could be hidden by shutdown errors, while Candidate election exposed the temporary
host_drainingstate to Desktop, TUI, and CLI. This made an incompatible stored record look like a generic startup failure.This change preserves the primary recovery error, carries a bounded non-sensitive failure reason through Candidate exit and election, and presents an actionable shared startup message. It does not migrate or accept incompatible stored records; that remains separate migration work.
Verification
{"kind":"failed","reason":"stored_data_incompatible"}npm test -w @maka/storagenpm run build -w @maka/runtime-hostand the full Runtime Host test suitegit diff --checkAI disclosure
OpenAI Codex assisted with the implementation and verification. I reviewed the resulting changes and confirm this submission.
Checklist
Does this PR entail a change in behavior?
简体中文
摘要
Runtime Host 的恢复错误可能被 shutdown 错误掩盖,同时 Candidate election 会把临时的
host_draining状态暴露给 Desktop、TUI 和 CLI,导致不兼容的持久化记录最终只显示为模糊的启动失败。本次变更保留首要恢复错误,通过 Candidate 退出和 election 传递有界且不包含敏感信息的失败分类,并统一显示可操作的启动提示。它不会迁移或接受不兼容的持久化记录;相关兼容工作仍由独立变更负责。
验证
{"kind":"failed","reason":"stored_data_incompatible"}npm test -w @maka/storagenpm run build -w @maka/runtime-host及 Runtime Host 全量测试git diff --checkAI 披露
OpenAI Codex 协助了实现与验证。我已人工审核最终变更,并确认提交此 PR。
检查清单
此 PR 是否改变行为?