fix(stack): detect copied ordinary-folder identities - #6232
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b801f0808a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa756a9fd5
ℹ️ 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".
aa756a9 to
21e12f6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21e12f679d
ℹ️ 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".
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@21e12f679d1b67eaabd72558b3a79ba813e19e6ePreview package for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdf64157ff
ℹ️ 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".
| if (discovery.workspace.kind !== "folder") return; | ||
| const listings = yield* store.list(); | ||
| const matching = listings | ||
| .filter(isHealthyDocument) |
There was a problem hiding this comment.
Reject copies when the matching stack document is corrupt
When the original workspace still has a running supervisor but its stack.json is malformed or temporarily unreadable, store.list() returns a corrupt listing and this filter discards the only persisted-path evidence. A copied folder with the same marker then passes both ensureWorkspace() validations, and the attached-supervisor path in runManaged reports success against the original workspace's live endpoint. Treat a corrupt listing for the derived stack identity as an unsafe conflict rather than silently accepting the copy.
Useful? React with 👍 / 👎.
Summary
Why
Copying an ordinary project also copies
.supabase/identity.json. While both folders exist, they can otherwise present the same environment identity and resolve to the same managed stack document.The manager now joins filesystem identity with healthy persisted stack documents and returns an actionable
InvalidManagedIdentityErrorwhen another live canonical folder contains the same marker. Users are told to delete the copied marker so a new identity can be generated.Reviewer context
This is stacked on #6218 and targets its head branch.