[BUG] Weekly AI summary quota race and unbounded request body
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- next.js, supabase, typescript
調査の方向性
Start at the /api/ai/weekly-summary route and trace how it checks the 24-hour limit, parses JSON, generates the summary, and persists the timestamp. The report identifies a race and missing body-size limit; a linked open pull request (#4055) is already addressing the issue.
索引モデルが issue の本文から書いたものです。
説明
What happened?
Code review found two defects in the weekly AI summary API. First, its 24-hour limit was checked separately from model generation and persistence, allowing simultaneous requests for one user to trigger duplicate paid provider calls. Second, the route parsed request JSON without a body-size limit, so oversized inputs could consume excessive memory before validation.
Expected behavior is to atomically claim a user's generation window and bound request parsing before quota or provider work. These defects were identified in source review; they were not reproduced against the live deployment.
Steps to reproduce
- On a revision before the fix, send concurrent authenticated POST requests to
/api/ai/weekly-summaryfor the same user; each can pass the timestamp read before any request writes it. - Send a valid JSON request body larger than 8 KiB; the route parses it without an input cap.
- Observe concurrent model calls or unbounded body parsing.
Where is it?
API
Where did you see it?
Local development (code review; not reproduced against the live deployment)
Want to fix it?
- I'd like to work on this. A maintainer will assign you; please don't start before that.
- 主要言語
- TypeScript
- スター
- 246
- フォーク
- 436
- 平均マージ
- 9時間 33分
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Priyanshu-byte-coder/devtrack のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Priyanshu-byte-coder/devtrack#4067 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Priyanshu-byte-coder/devtrack#4066 ·
メンテナーはふだん 1 日以内に返信
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModal対応中かも @Nandaninaulaa が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Priyanshu-byte-coder/devtrack#3889 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals form: square arcade buttons for recurrence, Create goal and Refresh対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:design
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
Priyanshu-byte-coder/devtrack#3877 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Goals: the error banner and the "No goals yet" hint show at the same time対応中かも @KartikeyG-world が 4 日前に担当しました。 オープンgood first issue level 1 level:beginner status:assigned type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Priyanshu-byte-coder/devtrack#3872 · コメント 6 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Priyanshu-byte-coder/devtrack の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
makecindy/cindy#15342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
kwitsch/claude-code-plugin-tooling#219 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
no-repo-link tool-submission
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100