Skip to content

fix(stack): detect copied ordinary-folder identities - #6232

Merged
jgoux merged 7 commits into
developfrom
juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers
Aug 18, 2026
Merged

fix(stack): detect copied ordinary-folder identities#6232
jgoux merged 7 commits into
developfrom
juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers

Conversation

@jgoux

Copy link
Copy Markdown
Contributor

Summary

  • reject copied ordinary-folder identity markers before managed stack discovery or mutation can reuse another live folder's stack document
  • centralize the check in the manager across discover, ensure, read, and start flows
  • preserve legitimate ordinary-folder moves and Git identity precedence

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 InvalidManagedIdentityError when 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.

@jgoux
jgoux marked this pull request as ready for review August 17, 2026 16:34
@jgoux
jgoux requested a review from a team as a code ownerAugust 17, 2026 16:34
Comment threadpackages/stack/src/managed/manager.ts Outdated

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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: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".

Comment threadpackages/stack/src/managed/manager.ts Outdated
Comment threadpackages/stack/src/managed/manager.ts
Base automatically changed from juliengoux/cli-2110-state-honor-explicit-config-ports-and-allocate-sticky-ports to developAugust 17, 2026 20:00

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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: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".

Comment threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/src/managed/environment.ts
Comment threadpackages/stack/src/discovery.ts
Comment threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/src/supervisor.ts Outdated
@jgoux
jgouxforce-pushed the juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers branch from aa756a9 to 21e12f6CompareAugust 17, 2026 21:39

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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: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".

Comment threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/src/managed/manager.ts
@github-actions

github-actionsBot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

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

Preview package for commit ad9a77b.

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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: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".

Comment threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/src/managed/manager.ts
@jgoux
jgouxforce-pushed the juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers branch from fdf6415 to e706514CompareAugust 18, 2026 06:17

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:01b30ff184

ℹ️ 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 threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/src/supervisor.ts
Comment threadpackages/stack/src/managed/manager.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:d41674e7c2

ℹ️ 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 threadpackages/stack/src/supervisor.integration.test.ts Outdated
Comment threadpackages/stack/src/supervisor.integration.test.ts Outdated
Comment threadpackages/stack/src/managed/manager.ts

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:67ff8579e0

ℹ️ 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 threadpackages/stack/src/managed/manager.ts
Comment threadpackages/stack/tests/helpers/supervisor-child.ts Outdated
Comment threadpackages/stack/src/managed/manager.ts Outdated
Comment threadpackages/stack/src/supervisor.integration.test.ts Outdated
Comment threadpackages/stack/src/managed/manager.ts Outdated
@jgoux
jgouxforce-pushed the juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers branch from 67ff857 to ad9a77bCompareAugust 18, 2026 09:17

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:ad9a77b684

ℹ️ 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 threadpackages/stack/src/managed/lifecycle.ts
Comment threadpackages/stack/src/managed/manager.ts
@jgoux

Copy link
Copy Markdown
ContributorAuthor

Automated review loop cap: this round fixed the demonstrated stop race and supervisor fixture races, removed the overfitted live-Git exception, replied to every thread, and all CI checks are green. I am not adding more defensive code for the newly proposed pre-publication ownership window without an executed repro: before publication there is no distinct persisted workspace evidence, and closing it requires a broader startup/control protocol design. The repeated live-Git suggestion is intentionally rejected because CLI-2203 explicitly gives Git identity precedence. Requesting human review on the resulting simpler design.

@jgoux
jgoux added this pull request to the merge queueAug 18, 2026
Merged via the queue into develop with commit 18ae43aAug 18, 2026
91 checks passed
@jgoux
jgoux deleted the juliengoux/cli-2203-stack-detect-copied-ordinary-folder-identity-markers branch August 18, 2026 09:47
Sign up for freeto 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

@jgoux@avallete