fix(worker): shorten processed-event retention window 7d -> 3d#241
Merged
liplus-lin-lay merged 1 commit intoJun 26, 2026
Merged
Conversation
処理済み (mark_processed 済み) webhook イベントの保持期間を 7 日から 3 日へ短縮する。 処理済み窓に構造依存は無く (再 delivery は INSERT OR REPLACE で捌き、list_pending 系は processed=0 のみ参照)、唯一の用途は get_event の事後 lookback。3 日でその floor は十分。 ストレージ主因の未処理 90 日側は変更しない (3/90 の非対称は意図的)。 - worker/wrangler.toml: PURGE_AFTER_DAYS 7 -> 3 - worker/src/store.ts: DEFAULT_PURGE_DAYS 7 -> 3, doc comment / asymmetry note 同期 - README.md / mcp-server/README.md: retention 表 7 -> 3 days - docs/0-requirements(.ja).md: F2.4 / F2.5 / N2.7 / N2.8 表記同期 - worker/test/workers/store.test.ts: stale な 7-day コメント同期 (アサート値 30/1d は不変、全 green) Closes #240
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-webhook-mcp | 16370fe | Jun 26 2026, 10:17 AM |
liplus-lin-lay
commented
Jun 26, 2026
liplus-lin-lay
left a comment
Member
Author
There was a problem hiding this comment.
AI self-review (auto mode)
- diff 範囲: 全 7 ファイルが「処理済み保持 7→3」一点に閉じている。挙動ロジックの変更は
DEFAULT_PURGE_DAYS定数と env 既定値のみ。sweep / mark_processed / dedup の制御フローは無改変。 - 未処理側不変:
UNPROCESSED_PURGE_AFTER_DAYS=90は据置。3/90 の非対称注記を全箇所で同期済み。 - docs-as-source-of-truth: README ×2 + docs ×2(F2.4/F2.5/N2.7/N2.8)を同 PR 内で同期。分割なし。
- テスト: within-window 行が −1d/−2d、swept 行が −30d のため既定 3 でもアサート不変。
npm test全 green(node 54 + worker pool 35)、typecheckclean。stale コメントのみ追従修正。 - release type: patch(既存 retention 仕様の内部値調整、user/system observable 影響は軽微)。
- 残コメント / TODO: なし。
grepで処理済み保持に紐づく7残存ゼロを確認済み。
判定: APPROVE 相当。マージ可。
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.
概要
処理済み(
mark_processed済み)webhook イベントの保持期間を 7 日 → 3 日 に短縮する。PURGE_AFTER_DAYSの既定値と、連動する store 定数・docs・README・テストコメントを一括で揃えた。Closes #240
背景・判断
list_pending系はprocessed=0のみ参照し、処理済み窓を読むのはget_eventの事後 lookback だけ。INSERT OR REPLACE(同一 id 上書き)で捌いており、処理済み窓は dedup horizon ではない。→ 構造依存ゼロ。短縮の blast radius は「3〜7 日前の処理済みイベントを get_event で遡れない」のみで、get_event の floor として 3 日は十分。変更内容
worker/wrangler.toml:PURGE_AFTER_DAYS"7"→"3"worker/src/store.ts:DEFAULT_PURGE_DAYS7→3、sweep doc comment / 非対称コメント同期README.md/mcp-server/README.md: retention 表の7→3days、非対称注記同期docs/0-requirements.md/.ja.md: F2.4 / F2.5 / N2.7 / N2.8 の「既定 7」「7 日」表記を 3 に同期worker/test/workers/store.test.ts: stale な「7-day / default 7」コメントを 3 に同期テスト
npm test全 green(tsx node 54 件 + worker pool 35 件)。npm run typecheckclean。release type
patch(既存 retention 仕様の内部値調整、変更規模 小)