Skip to content

test(stack): encode managed stack acceptance contract - #6140

Open
jgoux wants to merge 35 commits into
developfrom
julien/cli-2102-contract-encode-approved-behavior-as-cross-layer-acceptance
Open

test(stack): encode managed stack acceptance contract#6140
jgoux wants to merge 35 commits into
developfrom
julien/cli-2102-contract-encode-approved-behavior-as-cross-layer-acceptance

Conversation

@jgoux

@jgoux jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Establishes the approved managed local-stack behavior as a shared typed acceptance contract before the managed engine and CLI commands are implemented.

Why

Managed stacks span package, CLI, Git, runtime, and persistence boundaries. Encoding the decisions once gives the later implementation work a single observable contract and prevents each layer from inventing its own identity, lifecycle, port, runtime, or recovery behavior.

What changed

  • Added 89 typed scenarios exported from @supabase/stack/testing.
  • Covered project, checkout, worktree, branch, and named-stack identity; exact and automatic ports; legacy read-compatible bootstrap; credentials; runtime selection; reclamation; and package/CLI ownership boundaries.
  • Derived the native-runtime qualification matrix from the package service catalog.
  • Added intentionally narrow fixture lint for catalog shape, references, write/effect pairing, diagnostics, and output projections. Product semantics remain in the scenarios and will be enforced by the real managed engine.
  • Exercised the existing public createStack() boundary to prove omitted roots stay disposable and direct package usage does not inspect Git or mutate system-wide managed state.
  • Added an ADR defining the contract authority, package boundaries, testing strategy, and downstream implementation handoff.

Ownership boundary

  • Direct createStack() remains a caller-controlled, isolated stack API.
  • The future managed package surface owns system-aware identity, selection, ports, runtime persistence, bootstrap, and reclamation behind an injectable repository.
  • The CLI consumes managed results and projects them for humans and JSON; it does not implement a parallel policy path.
  • Persistence technology remains an adapter choice and is not part of the product contract.

Intentional non-goals

This PR does not implement the managed engine, persistent adapter, experimental commands, migration tooling, or automatic relocation after port collisions. Downstream work will execute these fixtures through the real package, repository, and CLI boundaries.

Reviewer focus

The important review surface is the scenario catalog: inputs, selected identities, permitted writes and runtime effects, diagnostics, recovery guidance, and observable outputs. The fixture lint is deliberately not a second implementation of those decisions.

@jgoux
jgoux requested a review from a team as a code owner August 10, 2026 13:50
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

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

Preview package for commit f47cf7f.

@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: 42a9cc1355

ℹ️ 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 packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread apps/cli/src/next/managed-stack-contract.integration.test.ts Outdated
Comment thread docs/adr/0015-managed-stack-contract-fixtures.md Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.integration.test.ts Outdated

@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: 0c1b010287

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 5360a05eb3

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 1bed79e761

ℹ️ 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 packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: a95a8cb5da

ℹ️ 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 packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: c362e15fc7

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Comment thread packages/stack/src/managed-stack-contract.ts Outdated
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 3bce8a11c2

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: d9f26e44b2

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 620f35b325

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: d35b51e1f5

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: d1d1941af4

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: de4e22ca31

ℹ️ 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 packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 783bbb1e36

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: eed459fc7a

ℹ️ 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 packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts
@jgoux

jgoux commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 3398c7f415

ℹ️ 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".

@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: d219a4bff4

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.ts

@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: 5b20d30891

ℹ️ 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 packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract-validation.ts Outdated
Comment thread packages/stack/src/managed-stack-contract.ts Outdated
Comment thread packages/stack/src/managed-stack-contract-validation.ts
Comment thread packages/stack/src/managed-stack-contract-validation.ts

@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: 2129033ca1

ℹ️ 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 packages/stack/src/managed-stack-contract-validation.ts Outdated
Comment thread packages/stack/src/managed-stack-contract-validation.ts
Comment thread packages/stack/src/managed-stack-contract-validation.ts
Comment thread packages/stack/src/managed-stack-contract.ts
Comment thread packages/stack/src/managed-stack-contract.integration.test.ts
Comment thread packages/stack/src/managed-stack-contract-validation.ts Outdated
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