fix(agent): Agent activity の確定後の再取得を 60 秒 → 120 秒に - #548
Merged
Merged
Conversation
…出なかった) 入金・送金の確定後、履歴を 20 秒おきに 3 回 (60 秒) 取り直していた。本番の実測 (2026-09-22): 支払い tx は確定の 19 秒後・54 秒後にはまだ API に出ず、89 秒後に出た (索引側の遅れに、 CDN の stale-while-revalidate で 1 回ぶん古い応答が返る分が重なる)。60 秒で打ち切ると、 ページを開き直すまで新しい行が出ない。 20 秒おき 6 回 (120 秒) に延ばす。上流 (Etherscan) の呼び出しは CDN (s-maxage=30) が吸収するので、 API 予算への影響は 1 回の確定あたり最大 +2 回程度。可視文言・money-path の変更なし。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
何を直すか
/agent の Agent activity は、入金・送金の確定後に履歴を 20 秒おきに 3 回 (60 秒) 取り直す。後回しにしていた「入金直後の再取得と CDN キャッシュの実機確認」(#539 の follow-up ⑤) を本番で実測したら、60 秒では足りなかった。
実測 (2026-09-22・本番
/api/agent/activity): 支払い tx の確定 = 21:53:22 UTCHIT)STALE)索引側 (Etherscan) の遅れに、CDN の
stale-while-revalidateで 1 回ぶん古い応答が返る分が重なる。60 秒で打ち切ると、ページを開き直すまで新しい行が出ない。対応: 20 秒おき 6 回 (120 秒) に延ばす。回数と間隔を定数にして、実測の根拠をコメントに残した。
s-maxage=30) が吸収するので、API 予算への影響は 1 回の確定あたり最大 +2 回程度検証
tests/components/agent8 files / 119 tests pass (再取得のタイミングを固定するテスト 3 件を 120 秒に合わせて更新: 60 秒時点でまだ「更新中」・119.999 秒で 6 回目の直前・120 秒で終了・以後は取得しない)🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc