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

Abierto Apto para principiantes
#747 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
79/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
sql, supabase, typescript

Línea de trabajo

Lee supabase/tests/database/48_events_covered_from.test.sql cerca de la línea 92 e inspecciona cómo vuelve a ejecutar las instrucciones de supabase_migrations.schema_migrations. Añade un error claro si la repetición no contiene exactamente las instrucciones esperadas alter table, comment on column y update, y explica en el comentario SQL qué implica para la repetición el hecho de agrupar la migración. Ejecuta npm run test:db; confirma que el archivo 48 pasa normalmente y falla con un error de repetición con nombre cuando falta o cambia una instrucción.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
13
Forks
2
Merge medio
5 h 20 min
PR fusionados (30 d)
287

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eddiejaoude/StackDash

Todos los issues de eddiejaoude/StackDash

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.