runtime errorの収集と送信をWindowsでも動かす(ADR 0194、0.75.0) - #12
Merged
Merged
Conversation
Windowsではstoreを本人だけが触れる形で置けると確かめる方法が無く、故障を1件も記録できなかった。 icaclsでDACLを読み、本人・SYSTEM・Administratorsへの許可だけで出来ている時だけ使う。 - storeは %LOCALAPPDATA%\Lattice\runtime-errors\ へ置き、継承を切って絞る - 他のaccountが触れる形で中身があるフォルダと、後から権限を足されたstoreは store_unsafe で止める - 合鍵も同じ判定で確かめる(credential_unsafe / acl_not_owner_only) - Windowsで収集を有効にするのはLattice自身の送信設定。unsupported は他のOSの答えとして残す - store・送信の試験をWindowsでも走らせ、Windows実機だけの試験を足した Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hooksの試験は一時のHOMEをCLIへ渡すが、CODEX_HOME・CLAUDE_CONFIG_DIR・GROK_HOMEを消していなかった。 CLIはHOMEよりこれらを優先するので、CODEX_HOMEを持つ端末で試験を走らせると、利用者の本物の Codex hooks.jsonへhandlerを足し、外し、backupを残した(2026-10-03に実際に起きた)。 - 試験の入口(productTestEnvironment)が3つの変数を子processへ渡さない - hooks試験のisolatedEnvも同じ3つを消す(node --test で直に走らせた時のため) - 偽のフォルダを3つの変数に指して、1 byteも変わらないことを確かめる試験を足した 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.
PR #10(0.74.0、送信をLattice自身が持つ)の上に積んである。#10 を統合したら base を main へ付け替える。
何が変わるか
Windowsでは、Latticeの故障を1件も記録できなかった(0.73.0からは
collection: "unsupported")。storeを本人だけが触れる形で置けると確かめる方法が無かったためである。Windowsでも記録し、送れるようにする。icacls /saveでDACLをSDDLで読み、本人・SYSTEM・Administratorsへの許可だけで出来ている時だけ使う。それ以外はPOSIXと同じくstore_unsafeで止める(src/windows-owner-only.mjs)。%LOCALAPPDATA%\Lattice\runtime-errors\。継承を切って絞る。他のaccountが触れる形で中身があるフォルダは、絞らずに止める。%LOCALAPPDATA%\bughub\product-credentials\lattice.jsonを同じ判定で確かめる。他のaccountが読めればcredential_unsafe(acl_not_owner_only)。runtime-errors reporting enable。有効にするまではdisabled。unsupportedはmacOS・Linux・Windows以外の答えとして残す。設計と残る限界(所有者は確かめない)はADR 0194に書いた。
確かめたこと
%LOCALAPPDATA%)で、CLIから有効化・記録の読み取り・解決ができる。npm run ci全体が成功(root 1961件中 0失敗)。含めたもの
🤖 Generated with Claude Code