Share surfaces database test fails when the local database already has rate limit counters
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
調査の方向性
失敗しているアサーションは supabase/tests/database/16_public_share_surfaces.test.sql の 205 行目付近のテスト 25 で、purge_public_rate_limit_counters(date_trunc('minute', now()), 100) を呼び出し、削除が 0 件であることを期待しています。ファイル全体を読んで、テストが現在の分のカウンターをどのようにシードするか、およびロールバックされるトランザクション内で実行されることを確認し、その後、purge のチェック前にそのトランザクション内で既存の古いカウンターを削除するか、シードされた現在の分の行がまだ存在することをアサートしてください。以前の e2e 実行からのカウンターをすでに保持しているローカルスタックで npm run test:db を使って再現してください。そのダーティなデータベースでテスト 25 が通り、現在の分のカウンターが purge されると引き続き失敗し、ファイル内の他のどのテストも自分が作成していない行に依存しないときに完了です。兄弟 issue #247 が 15_project_pages.test.sql のテスト 6 で同じパターンを追跡していることに注意してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
supabase/tests/database/16_public_share_surfaces.test.sql test 25 expects purge_public_rate_limit_counters(date_trunc('minute', now()), 100) to delete nothing (line 205). The purge is instance wide by design (it is the retention job), so on a local database where earlier requests to the badge, card, or public JSON routes left counters from past minutes, it deletes those rows and the test fails even though nothing is wrong:
# Failed test 25: "purge_public_rate_limit_counters: the current minute's counters are kept"
# have: 12
# want: 0
Reproduced on 2026-11-11 with npm run test:db against the shared local stack, on integration/demo-2026-11 and on the 258-workspace-handles branch alike; that branch does not touch the file or the function. The shared database held 13 counter rows from earlier e2e runs at the time. CI passes only because it starts from an empty database.
The same kind of failure in 15_project_pages.test.sql test 6 is already tracked in #247.
Fix
Make the assertion independent of rows the test did not create. For example, delete the counters older than the current minute inside the test's transaction before the two purge checks (the file already rolls back), or assert that the counters the test seeded for the current minute are still present instead of asserting how many rows the purge deleted.
Acceptance criteria
- Test 25 passes on a local database that already holds rate limit counters from earlier minutes.
- Test 25 still fails if the purge deletes a counter from the current minute.
- No other test in the file depends on rows it did not create.
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 6時間 56分
- マージ済み PR(30日)
- 136
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eddiejaoude/StackDash のほかの issue
-
area: docs documentation priority: P3 size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eddiejaoude/StackDash#462 ·
メンテナーはふだん 1 日以内に返信
-
area: web bug priority: P3 size: XS
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
eddiejaoude/StackDash#432 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: database bug priority: P3 size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eddiejaoude/StackDash#419 ·
メンテナーはふだん 1 日以内に返信
-
area: docs bug priority: P2 size: XS
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
eddiejaoude/StackDash#418 ·
メンテナーはふだん 1 日以内に返信
-
accessibility area: timeline bug priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
eddiejaoude/StackDash#389 ·
メンテナーはふだん 1 日以内に返信
eddiejaoude/StackDash の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-webui/tether#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/void#835 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AykutSarac/jsoncrack.com#616 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#4679 ·
メンテナーはふだん 1 日以内に返信