Skip to content

docs(cli): record intentional start --ignore-health-check divergence from Go (CLI-1987) - #6007

Merged
Coly010 merged 4 commits into
developfrom
columferry/cli-1987-parity-ruling-start-ignore-health-check-on-image-pulldaemon
Aug 3, 2026
Merged

docs(cli): record intentional start --ignore-health-check divergence from Go (CLI-1987)#6007
Coly010 merged 4 commits into
developfrom
columferry/cli-1987-parity-ruling-start-ignore-health-check-on-image-pulldaemon

Conversation

@Coly010

@Coly010 Coly010 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

⚖ Parity ruling applied (CLI-1987, Colum, 2026-07-30)

Option (b) chosen: keep the TypeScript behaviour and document the intentional divergence. Option (a) — matching Go's quirk — was rejected. No runtime behaviour changes in this PR.

Go's start.IsUnhealthyError (apps/cli-go/internal/db/start/start.go:227-231) classifies any errors.Join-shaped error as "unhealthy". That shape check accidentally also matches ensureImagesCached's errors.Join(result...) (apps/cli-go/internal/start/start.go:257-260), so in Go, with --ignore-health-check set, a total image-pull failure — or a Docker daemon that becomes unreachable during the pre-pull — is swallowed: Go prints the error, skips rollback, prints Started supabase local development setup. + the status table + the security notice, and exits 0 with zero containers running. Go's own comment on IsUnhealthyError ("Health check always returns a joinError") shows the wider match was never intended.

The TS port already behaves differently — legacyIsUnhealthyStartError matches only LegacyHealthCheckTimeoutError, and the image pre-pull runs before the downgrade envelope — so the same scenario exits 1 with no success banner and no status table. Per the ruling, that behaviour is kept and is now documented + regression-pinned. --ignore-health-check downgrades health-check timeouts only.

What changed

Docs, comments, and one regression test — the runtime is untouched:

  • apps/cli/src/legacy/commands/start/start.rollback.ts — divergence record in legacyIsUnhealthyStartError's doc comment, including an explicit "do not fix this by widening the match toward Go's shape check" guard, so a future parity sweep can't silently reintroduce Go's exit-0 swallow.
  • apps/cli/src/legacy/commands/start/SIDE_EFFECTS.md — the image-pull exit-code row now states the failure stays fatal even with --ignore-health-check, and a new "Notes" entry records the full carve-out (scenario, Go's quirk behaviour, TS behaviour, why rollback is not part of the divergence — nothing has been created yet in either CLI — and that the flag's Go-byte-matched help text "Ignore unhealthy services and exit 0" over-promises here).
  • apps/cli/docs/go-cli-porting-status.md — the legacy start entry carries the same intentional-divergence note (the table's column padding was re-flowed by oxfmt; the substantive change is the start row only).
  • apps/cli/src/legacy/commands/start/start.integration.test.ts — new test in the "image pull" block: pre-pull exhaustion under --ignore-health-check still fails with LegacyImagePrepullError, prints no Started banner, emits nothing on stdout (no status table), creates no container, and triggers no rollback. The daemon-unreachable trigger funnels through the same LegacyImagePrepullError path, so the one scenario pins both documented triggers.

Overlap with CLI-1967

CLI-1967's doc-drift sweep also touches start documentation. The CLI-1987 carve-out (SIDE_EFFECTS "Notes" entry, exit-code row, porting-status start row, start.rollback.ts comment) is fully handled here — CLI-1967 should not re-document this divergence.

Possible follow-up (not in scope here)

Self-review flagged a DX gap that would require a runtime change, so it is deliberately not part of this docs-only ruling PR: when --ignore-health-check is set and the pre-pull fails, the error output never explains why the flag didn't apply (and the flag's help text says "exit 0"). A TS-only error.suggestion ("--ignore-health-check only downgrades health-check timeouts; image pull failures are always fatal") on that path — analogous to the existing TS-only exec format error suggestion — would close it.

Fixes CLI-1987

…from Go (CLI-1987)

Go's start.IsUnhealthyError classifies any errors.Join-shaped error as
"unhealthy", so with --ignore-health-check a total image-pull failure or a
Docker daemon that dies during the pre-pull is swallowed: Go prints the
error, skips rollback, prints the "Started supabase local development
setup." banner + status table + security notice, and exits 0 with no
container running. Per the CLI-1987 ruling (2026-07-30, option b) that quirk
is intentionally NOT reproduced: the TS port keeps the scenario fatal —
exit 1, no success banner, no status table.

Docs + comments + one regression test only; no runtime change:

- start.rollback.ts: divergence record on legacyIsUnhealthyStartError so a
  future "fix" toward Go's shape check doesn't happen silently
- start/SIDE_EFFECTS.md: exit-code carve-out + Notes entry
- docs/go-cli-porting-status.md: start entry divergence note (table
  re-padded by oxfmt)
- start.integration.test.ts: pins pre-pull failure under
  --ignore-health-check to exit 1 with no banner/status table/rollback

Fixes CLI-1987
@Coly010

Coly010 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 7466b7b844

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…7-parity-ruling-start-ignore-health-check-on-image-pulldaemon
@Coly010
Coly010 marked this pull request as ready for review July 31, 2026 09:55
@Coly010
Coly010 requested a review from a team as a code owner July 31, 2026 09:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5161af9fcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/cli/src/legacy/commands/start/start.rollback.ts Outdated
Comment thread apps/cli/src/legacy/commands/start/start.integration.test.ts Outdated
Comment thread apps/cli/src/legacy/commands/start/start.rollback.ts Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@d0b81a9a04c03086eb0ccebe106596a5d6758362

Preview package for commit d0b81a9.

…e delta record (review: codex)

- start.rollback.ts + SIDE_EFFECTS.md: the pre-pull failure is fatal because it propagates from before bring-up without reaching either legacyIsUnhealthyStartError call site — not because of the matcher exclusion (widening it would be a no-op); the observable delta also includes the security notice Go prints unconditionally at Run()'s tail
- start.integration.test.ts: model the daemon-unreachable trigger (immediate inspect failure) instead of duplicating the flagless pull-exhaustion scenario through ~36s of real retry backoff
@Coly010

Coly010 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

All three round findings addressed in 69bdc5f: divergence record re-attributed to control flow (matcher widening is a no-op — verified against the two call sites), delta record completed with the security notice (verified against start.go:84-87), and the new integration test re-modeled onto the immediate daemon-unreachable path (~25ms instead of ~36s of real retry backoff).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 69bdc5fa34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Coly010 Coly010 self-assigned this Jul 31, 2026

@kanadgupta kanadgupta 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.

Tiny assertion enhancement suggestion from Claude below but non-blocking — LGTM!

Comment thread apps/cli/src/legacy/commands/start/start.integration.test.ts
@Coly010
Coly010 added this pull request to the merge queue Aug 3, 2026
Merged via the queue into develop with commit b4d52dc Aug 3, 2026
21 checks passed
@Coly010
Coly010 deleted the columferry/cli-1987-parity-ruling-start-ignore-health-check-on-image-pulldaemon branch August 3, 2026 10:27
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