Skip to content

runtime error記録にsafe_context(面・例外の種類・原因code)を足す(0.72.0) - #6

Merged
quolu merged 3 commits into
mainfrom
snowwhite/runtime-error-safe-context
Oct 3, 2026
Merged

quolu merged 3 commits into
mainfrom
snowwhite/runtime-error-safe-context

Conversation

@quolu

@quolu quolu commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

何を直すか

BugHub d3c4989e(mac-kite、LATTICE.CLI_INTERNAL_FAILED、26回)は、どのcommandで落ちたかが記録に無く、原因を確定できないまま閉じた。記録は error_code だけで1件にまとまっていた。

新しい記録は固定語彙の分類 safe_context を持つ。

  • command_kind: 落ちたCLIの面(run.list・todo.start 等、Latticeが持つ一覧の語だけ。無ければ other)
  • error_kind: 例外の種類(一覧に無ければ other)
  • cause_code: Nodeが付けるerror code(無ければ none)

3つは必ずそろえる。message本文・path・引数の値・stackは載せない。

fingerprintは、分類つきの記録では sha256(product \0 component \0 error_code \0 message_template \0 command_kind \0 error_kind \0 cause_code)。旧記録は前の4要素の式のまま残る。

todo のcommandがtyped契約の外で落ちた時も LATTICE.CLI_INTERNAL_FAILED として記録する。

順番

PR #5(0.71.2)の上に積んでいる。#5 を main へ統合してから、baseを main へ付け替える。

公開は、dotagents(898c6e1、4台へ導入済み)→ BugHubの lattice 許可キー(v8・v9)→ この版、の順。許可キーが入るまで公開しない。

確かめたこと

  • npm run ci 全体(Linux): root 1903成功/0失敗、sensor 5132成功/0失敗
  • 旧記録1件+分類つき4件が並んだsnapshotを、dotagents 898c6e1 の collectLatticeRuntimeErrors へ通して ready(fingerprintの照合を含む)
  • test/runtime-error-safe-context.test.mjs

🤖 Generated with Claude Code

quolu and others added 3 commits October 3, 2026 04:31
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>
BugHub d3c4989eは、どのcommandで落ちたかが記録に無く原因を確定できないまま閉じた。
固定語彙の分類を記録とfingerprintへ含め、原因が違えば別の記録になるようにする。
todoのINTERNAL_FAILUREも同じcodeで記録する。式と3キー必須はdotagents・BugHubと合意済み。
公開はdotagents→BugHub許可キーの後。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@quolu
quolu changed the base branch from snowwhite/dashboard-typed-errors to main October 3, 2026 05:05
@quolu
quolu merged commit 11fbd31 into main Oct 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant