Repository navigation
報告のobserved_atを記録より前にしない。経路を確かめるreporting verifyを足す(ADR 0195、0.76.0) - #13
Merged
Merged
Conversation
0.74.0・0.75.0は observed_at を秒へ切り捨てていた。BugHubは記録の時刻が observed_at より後の報告を 422で断るので、故障や解決と同じ1秒の中で走る自動送信は、ほとんどの場合断られていた(最大1時間遅れで 送り直される。記録は失われない)。 - observed_at は、送る時刻と、載せる記録の last_seen・resolved_at のうち最も後の時刻にする - lattice runtime-errors reporting verify --json: 空の報告を1通送り、合鍵・署名・受け口までの経路を確かめる。 storeの記録と受領の印には触れない - verify の直後のCLI実行では自動送信を起こさない(受け口は1分に1回まで) 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.
修正: 故障や解決の直後の送信が、受け口に断られていた
0.74.0・0.75.0 は、報告の
observed_atを署名の時刻(秒)と同じ値へ切り捨てて作っていた。BugHubは、記録のlast_seenや解決のresolved_atがobserved_atより後の報告を 422invalid_reportで断る。記録と同じ1秒の中で送ると、切り捨てたobserved_atは記録より前になる。自動送信は記録の直後に走るので、ほとんどの場合これに当たる。実際に起きたこと(rabbit、2026-10-03):
rejected。delivered。断られた報告は、同じ中身の送り直しの制限で最大1時間遅れて届く。記録は失われない。
直し:
observed_atを、送る時刻と、載せる記録の時刻のうち最も後の時刻にする。秒へ切り捨てない。受け口の検査は契約どおりで、変えない。追加:
lattice runtime-errors reporting verify --json記録を載せない空の報告を1通送り、合鍵・署名・受け口までの経路・受領の署名を確かめる。
reportと同じ。送信を有効にしていない端末と、合鍵の無い端末は、networkへ触れない。verified・exit 0。Windowsの端末から届くことを、起きていない故障の記録を作らずに確かめるために要る。合鍵を入れ替えた時にも使える。
確かめたこと
observed_atより後なら422)で検査する受け口を試験に置き、記録や解決と同じ1秒の中で送った報告が受領されることを確かめた。observed_atが記録の時刻になる。reporting verifyの前後で、storeの診断と送信の状態が変わらない。npm run ci全体が成功(root 1963件中 0失敗)。🤖 Generated with Claude Code