AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Branching Preview Migrate Step Fails On Multi-Migration Gap; --Include-All Needed

Supabase preview branch creation runs the migrate step without --include-all, causing it to fail when the branch's migration tracking table is missing a subset of the parent's migrations (gap). This produces spurious 'Service health check failed' PR comments. Using 'supabase db push --include-all --linked' applies the gap cleanly.

highConfidence 85%Supabase@supabase/supabase-jssupabase-jsStorage

Origin Analysis

The preview-branching migrate agent invokes the migration apply command (likely 'supabase db push') without the '--include-all' flag. Without this flag, the CLI does not apply migrations that are missing from the local tracking history when timestamps are out of order or when a gap exists between the branch's snapshot and the parent's migration set, leading to a failed migration step.
1. Parent project has 25 migrations tracked in supabase_migrations.schema_migrations. 2. Create a preview branch via Management API. 3. Poll /v1/projects/{preview_ref}/actions: migrate step becomes DEAD. 4. Query preview's tracking table: only 9 of 25 migrations are present. 5. Run 'supabase link --project-ref <preview_ref> && supabase db push --include-all --linked'. 6. All missing 16 migrations apply successfully; tracking table now has 25 rows.

Fixing Code Block

Edge Case Audit

Forcing --include-all may attempt to re-apply migrations already applied on the branch if the local migration directory contains entries not present in the remote tracking table but whose changes are already partially applied. Ensure all migrations are idempotent or add pre-checks to skip already applied versions. Rollback: revert the service to the previous command without --include-all; however, already applied migrations may need manual synchronization.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state