dashboardの登録簿・daemon故障をtyped errorで返す(0.71.2) - #5
Merged
Merged
Conversation
mac-kiteのlaunchd(todo dashboard ensure、120秒毎)のlogに、lock待ち切れやdaemon無応答が INTERNAL_FAILUREとstack抜粋で残っていた。codeだけのErrorはCLIのtyped契約(code+detail)に 乗らないため。detailを必ず持たせ、再実行で解ける種類はnext_actionで示す。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何を直すか
mac-kite の launchd(
lattice todo dashboard ensure --json、120秒毎)のlogに、INTERNAL_FAILUREが57行あった。dashboard daemon is alive but temporarily unresponsive(0.60.6〜0.69.0の頃)。終了したdaemonのPIDを別processが再利用し、生存中と誤認して復旧が止まっていた。原因は0.69.1(f1a97d39)で修正済み。dashboard registry lock timeout(2026-10-03、0.71.x、Macの高負荷時)。どちらも
error.code(DASHBOARD_DAEMON_UNRESPONSIVE・DASHBOARD_REGISTRY_BUSY)を持つのに、detailが無いため todo-cli のtyped分岐(code+detail)に乗らず、INTERNAL_FAILUREとstack抜粋で返っていた。外部状態(別process・lock・負荷)の不整合であって内部故障ではない。src/todo-dashboard-registry.mjs:DASHBOARD_*の11箇所をdashboardError()に揃え、detail: { reason, next_action }を必ず持たせる。再実行で解ける種類はnext_action: 'lattice todo dashboard ensure --json'、登録簿の破損はnull。test/todo-dashboard-typed-errors.test.mjs: 握られたlockで関数とCLIの両方を確かめる。修正前は2件とも赤。試験
npm run ci: root 1935件中、失敗はhooks-cli.test.mjsの1件だけ。試験中に共有HOMEの~/.claude/settings.jsonが外部から書き換えられた(Aitermのhook登録)のを検知したもので、単体の再実行は51/51成功。この変更とは無関係。🤖 Generated with Claude Code