test(cli): fix 1 flaky test in live branch create by avallete · Pull Request #7256 · supabase/cli · GitHub
Skip to content

test(cli): fix 1 flaky test in live branch create - #7256

Open
avallete wants to merge 1 commit into
developfrom
avallete/flaky-fixes-2026-10-20
Open

avallete wants to merge 1 commit into
developfrom
avallete/flaky-fixes-2026-10-20

Conversation

@avallete

Copy link
Copy Markdown
Member

TL;DR

re-issues the live branches create once when the platform rejects it because the database restarted mid-create

  • branches list (and branches create on main / next) failed with unexpected create branch status 400: … FATAL: 57P01: terminating connection due to administrator command (also seen as the database system is shutting down). the platform restarts the database it is configuring while the create is in flight. the shared live helper now recognises only that rejection, removes the half-made branch if it got listed, and re-issues the create once, the same way test(repo): retry stalled live updates and name stalled analytics polls #7041 handles the network restrictions stall. a second rejection still fails the test, and create.live.test.ts uses the same helper

ref


Generated by Claude Code

`branches create` intermittently gets a 400 from the platform when the
database it configures restarts mid-create (`57P01` / "the database system
is shutting down"). The shared live helper now clears any half-made branch
and re-issues the create once for that rejection only; a second rejection
still fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016f5jekWaBDRtATpEf65mtq
@avallete
avallete requested a review from a team as a code owner October 20, 2026 07:44

Copy link
Copy Markdown
Member Author

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by a newer AI review

🤖 AI Review

Confirmed Claude’s minor error-handling finding: failed cleanup during restart recovery loses the original database-restart error. Codex reported no findings; source inspection found no additional issues. Tests were not run.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/tests/helpers/branches-live.ts:172 error-handling claude If cleanup before retrying branch creation fails, its error replaces the original database-restart error, hiding why recovery began.

Stats

Claude findings: 1 · Codex findings: 0 · Confirmed: 1 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: manual · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/tests/helpers/branches-live.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews completed. Code inspection confirms Claude’s two minor findings: retry cleanup can discard the original restart error, and a single LIST check can miss a partially created branch. Codex reported no findings. No additional issues were found; tests were not run.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/tests/helpers/branches-live.ts:172 error-handling claude If cleanup before the retry fails, the helper discards the original database-restart rejection and reports only the cleanup failure.
🟡 MINOR apps/cli/tests/helpers/branches-live.ts:166 test-reliability claude When a rejected create leaves a branch whose LIST visibility is delayed, the single absence check skips deletion and immediately retries creation with the same name, allowing a name-conflict failure.

Stats

Claude findings: 2 · Codex findings: 0 · Confirmed: 2 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/tests/helpers/branches-live.ts
Comment thread apps/cli/tests/helpers/branches-live.ts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants