test(database): fail clearly when the events coverage migration replay finds no statements

オープン 初心者向け
#747 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
79/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
sql, supabase, typescript
領域
databases, testing

調査の方向性

supabase/tests/database/48_events_covered_from.test.sqlの92行目付近を読み、supabase_migrations.schema_migrationsの文をどのように再実行しているか確認してください。再実行に期待されるalter table、comment on column、updateの文が正確に含まれていない場合に、明確なエラーを追加してください。また、マイグレーションの統合が再実行にどう影響するかをSQLコメントで説明してください。npm run test:dbを実行し、通常はファイル48が成功し、文が欠落または変更されている場合は名前付きの再実行エラーで失敗することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

area: ci area: database enhancement priority: P3 size: XS

Context

PR #746 (#724) adds supabase/tests/database/48_events_covered_from.test.sql. To test the migration's update external_accounts set events_history_legacy = true where first_synced_at is not null, it replays the statements the Supabase CLI recorded in supabase_migrations.schema_migrations. If those statements are missing or different (after a migration squash, a migration repair, or a hand-applied migration), the test fails without saying why. Raised as a consider in review round 3, which is the review cap: https://github.com/eddiejaoude/StackDash/pull/746#discussion_r4768183960

Plan

  1. In 48_events_covered_from.test.sql near line 92, count the replayed statements and raise a named error unless they are exactly the expected three: alter table, comment on column, update.
  2. In the comment above the alter table, say that squashing this migration breaks the replay and what to do then.

Acceptance criteria

  • With the recorded statements missing or changed, npm run test:db fails with a message that names the replay
  • With the statements present, file 48 passes as before
  • Playwright e2e: none needed, database test only

Files and areas

supabase/tests/database/48_events_covered_from.test.sql. Non-goals: changing the migration itself.

Verification

npm run test:db: file 48 passes. Removing the update statement makes it fail with the named error.


Branch: <issue-number>-coverage-replay-guard
Closes with a Closes #<issue-number> footer on the commit or pull request.

Model: anthropic/claude-opus-5-5 | Reasoning effort: not reported by the harness

主要言語
TypeScript
スター
13
フォーク
2
平均マージ
5時間 20分
マージ済み PR(30日)
287

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eddiejaoude/StackDash のほかの issue

eddiejaoude/StackDash の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。