fix(cli): reject an unusable linked service image tag - #6797
Merged
Merged
Conversation
A /version body that already starts with v was prefixed again, so link saved an unpublished storage tag.
avallete
enabled auto-merge
September 24, 2026 11:31
Contributor
There was a problem hiding this comment.
🤖 AI Review
The PR fixes newly written Storage pins when the version response already starts with v. Review of the PR code confirms three follow-ups: the link path can still double-prefix PostgREST versions, previously saved vv… Storage pins remain unchanged, and the changed normalization paths in the shared service probes lack tests. Codex reported no additional findings.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | apps/cli/src/command-internal/tenant-versions.ts:57 |
backward-compatibility |
claude | Previously saved vv… Storage pins are not repaired by this change, so affected projects continue to resolve an invalid Storage image tag until the pin is replaced. |
| 🟡 MINOR | apps/cli/src/shared/services/services.shared.ts:383 |
test-coverage |
claude | The shared PostgREST and Storage probes have no test for the changed already-prefixed or uppercase V normalization behavior. |
| 🟡 MINOR | apps/cli/src/command-internal/tenant-versions.ts:36 |
correctness |
claude | A PostgREST info.version that already starts with v becomes a vv… rest pin during supabase link. |
Findings outside the diff
- 🟡 MINOR
apps/cli/src/command-internal/tenant-versions.ts:36— A PostgRESTinfo.versionthat already starts withvbecomes avv…rest pin duringsupabase link.
Stats
Claude findings: 3 · Codex findings: 0 · Confirmed: 3 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
jgoux
approved these changes
Sep 24, 2026
PostgREST pins keep an existing v prefix, matching Storage. A saved pin that is not a usable tag, including vv…, fails and is not rewritten.
…shot The new tag is the telemetry identity for an unusable linked service pin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TL;DR:
supabase linkalways prefixed Storage and PostgREST versions withv. A body that already started withvwas saved asvv…, and startup then tried to pull that unpublished tag. New pins keep a single leadingv. An already saved pin that is not a usable image tag, includingvv…, now fails and is left on disk.Before
After
flowchart LR probe["Storage or PostgREST body"] --> tag["tagForServiceVersion"] tag --> pin["one leading v"] saved["saved pin"] --> check{"usable tag?"} check -->|yes| use["use pin"] check -->|no, including vv| err["error, file unchanged"]Why
Storage's
/versionroute returns itsVERSIONstring as-is. A normal image is a bare semver such as1.77.1, and the published tag isv1.77.1, so the CLI prefix is what turns the body into the tag. Some responses already include the prefix, including a suffix such asv1.77.1-versions. Prefixing those savedvv1.77.1-versions. That string was used as thestorage-apitag, which is not published, so the pull failed. PostgREST's link pin had the same always-prefix behavior.Existing
vv…files are not rewritten. The next read fails and tells you to runsupabase linkagain.What changed
tagForServiceVersion: a bare semver gainsv, and a body that already starts withvis kept, including a suffix.InvalidServiceVersionTagError. The file is not changed.Linked issue
None.