Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ enabled = false
enabled = false
`;

// set the root to `apps/cli` root

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.

⚪ NIT · comments · source: claude+codex

The newly added cwd comments narrate the following assignments instead of explaining non-obvious rationale.

Evidence: The comment at apps/cli/src/commands/experimental/stack/start/start.e2e.test.ts:52 merely describes line 53. Equivalent narration appears at packages/stack/src/public/effect-stack.integration.test.ts:1979, state/ownership.integration.test.ts:246, state/registry-lease.integration.test.ts:35, and supervisor/handles.integration.test.ts:761. trusted/CLAUDE.md:121-144 explicitly rejects code narration.

Suggested fix: Remove the comments or replace them with the reason the child process must run from the package root.

const cwd = path.resolve(import.meta.dirname, "../../../../..");

// oxlint-disable-next-line effecttsgo/async-function -- subprocess inspection is a foreign Promise boundary
async function inspectStackState(home: string, stackId: string) {
const script = `
Expand All @@ -66,7 +69,7 @@ async function inspectStackState(home: string, stackId: string) {
}));
`;
const result = await execFile("bun", ["--bun", "-e", script, stackId], {
cwd: process.cwd(),
cwd,
env: {
...process.env,
SUPABASE_HOME: home,
Expand Down Expand Up @@ -94,7 +97,7 @@ async function destroyStack(home: string, stackId: string) {
await stack.destroy();
`;
await execFile("bun", ["--bun", "-e", script, stackId], {
cwd: process.cwd(),
cwd,
env: {
...process.env,
SUPABASE_HOME: home,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function isBodyItem(value: unknown): value is IssueFormBodyItem {
}

function issueTemplateDir() {
return resolve(process.cwd(), "../../.github/ISSUE_TEMPLATE");
return resolve(import.meta.dirname, "../../../../../.github/ISSUE_TEMPLATE");
}

function readTemplate(template: string): ReadonlyArray<IssueFormBodyItem> {
Expand Down
4 changes: 0 additions & 4 deletions apps/cli/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default defineConfig({
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {

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.

🟡 MINOR · test-infrastructure · source: claude

The per-project Dockerfile loader was removed even though the retained configuration says inline projects do not inherit root Vite configuration.

Evidence: apps/cli/vitest.config.ts:19-23 documents non-inheritance; lines 55-56, 64-65, 72-73, and 85-86 still duplicate root resolve settings, but dockerfileTextPlugin now appears only at line 30. Dockerfile text imports remain at apps/cli/src/shared/services/dockerfile-images.ts:1 and apps/cli/src/shared/services/services.shared.unit.test.ts:4.

Suggested fix: If Vitest 5 still does not inherit root plugins, restore the plugin to each project. If inheritance changed, remove the obsolete duplication and update the comment.

name: "unit",
include: ["**/*.unit.test.ts"],
Expand All @@ -64,7 +63,6 @@ export default defineConfig({
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
name: "integration",
include: ["**/*.integration.test.ts"],
Expand All @@ -73,7 +71,6 @@ export default defineConfig({
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
name: "e2e",
include: ["**/*.e2e.test.ts"],
Expand All @@ -87,7 +84,6 @@ export default defineConfig({
{
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {
// Live tests run against one provisioned project on the configured
// platform. They are never part of the default unit/integration/e2e
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const PROJECT_SCOPES = [
// Non-project changes that don't map to a single turbo project. `release`
// isn't a turbo project (tools/release has no package.json) but is a real
// scope emitted by the automated release-notes-proposal commit.
const ESCAPE_SCOPES = ["ci", "repo", "misc", "release"];
const ESCAPE_SCOPES = ["ci", "deps", "repo", "misc", "release"];

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.

🟡 MINOR · ci-configuration · source: claude+codex

The new deps scope passes commitlint but remains rejected by the pull-request title check.

Evidence: commitlint.config.js:16 adds deps, but .github/workflows/lint-pull-request.yml:47-62 says its scope list mirrors commitlint and omits deps. trusted/CLAUDE.md:149-151 requires these lists to remain synchronized.

Suggested fix: Add deps to the workflow's scopes list.


module.exports = {
extends: ["@commitlint/config-conventional"],
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"test:unit": "pnpm exec turbo run test:unit:run --filter=!@supabase/cli-go --",
"test:integration": "pnpm exec turbo run test:integration:run --",
"test:e2e": "pnpm exec turbo run supabase#build && pnpm exec turbo run test:e2e:run --only --concurrency=1 --",
"test:vitest": "bun --bun vitest run --project '!supabase (live)'",

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.

🟡 MINOR · test-infrastructure · source: claude+codex

The aggregate test:vitest script includes E2E projects but bypasses their required CLI build.

Evidence: package.json:16 excludes only supabase (live), while vitest.config.mts:5 loads all package configurations. apps/cli/vitest.config.ts:71-82 defines an e2e project, apps/cli-e2e/vitest.config.ts:5-13 is also E2E, and turbo.json:126-135 gives both E2E tasks a supabase#build dependency. packages/cli-test-helpers/src/harness.ts:95-112 explicitly fails when CLI artifacts are absent.

Suggested fix: Build supabase before invoking Vitest, or exclude E2E projects from this aggregate script.

"check:all": "pnpm exec turbo run types:check lint:check fmt:check knip:check lint:effect:check",
"fix:all": "pnpm exec turbo run lint:fix fmt:fix knip:fix && pnpm run lint:effect:fix",
"lint:check": "oxlint --config .oxlintrc.json",
Expand Down Expand Up @@ -44,7 +45,8 @@
"turbo": "catalog:",
"typescript": "catalog:",
"verdaccio": "^6.10.0",
"vite": "^8.2.2"
"vite": "^8.2.2",
"vitest": "catalog:"
},
"devEngines": {
"packageManager": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,8 @@ describe("Effect stack lifecycle handoff", () => {
tempRoot: env.tempRoot,
platform: env.platform,
});
// set the root to `packages/stack` root
const cwd = path.resolve(import.meta.dirname, "../..");
const child = yield* ChildProcess.make(
process.execPath,
[
Expand All @@ -2001,7 +2003,7 @@ describe("Effect stack lifecycle handoff", () => {
`,
],
{
cwd: process.cwd(),
cwd,
env: {
OWNERSHIP_MODULE: new URL("../state/Ownership.ts", import.meta.url).href,
OWNERSHIP_STACK_ID: id,
Expand Down
5 changes: 4 additions & 1 deletion packages/stack/src/state/ownership.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ describe("stack ownership", () => {
Effect.gen(function* () {
if (process.platform === "win32") return yield* Effect.void;
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
const root = yield* fs.makeTempDirectoryScoped({ prefix: "supabase-stack-crash-" });
const childIdentity = {
...identity,
Expand All @@ -242,6 +243,8 @@ describe("stack ownership", () => {
platform: "posix",
};
const moduleUrl = new URL("./Ownership.ts", import.meta.url).href;
// set the root to `packages/stack` root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -265,7 +268,7 @@ describe("stack ownership", () => {
process.execPath,
["--input-type=module", "-e", script],
{
cwd: process.cwd(),
cwd: cwd,

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.

⚪ NIT · style · source: claude

This new call site uses cwd: cwd while the equivalent sibling changes use property shorthand.

Evidence: packages/stack/src/state/ownership.integration.test.ts:271 uses cwd: cwd; the new call sites at registry-lease.integration.test.ts:52, handles.integration.test.ts:782, and effect-stack.integration.test.ts:2006 use cwd shorthand.

Suggested fix: Change the property to cwd,.

env: {
OWNERSHIP_MODULE: moduleUrl,
OWNERSHIP_STACK_ID: stackId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ describe("cross-process registry lease", () => {
const enteredPath = path.join(root, "child-entered");
const competingPath = path.join(root, "competing-entered");
const moduleUrl = new URL("./StackStateStore.ts", import.meta.url).href;
// set the root to `packages/stack` root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect, FileSystem } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -47,7 +49,7 @@ describe("cross-process registry lease", () => {
process.execPath,
["--input-type=module", "-e", script],
{
cwd: process.cwd(),
cwd,
env: { REGISTRY_MODULE: moduleUrl, REGISTRY_ROOT: root, ENTERED_PATH: enteredPath },
extendEnv: true,
stdout: "pipe",
Expand Down
4 changes: 3 additions & 1 deletion packages/stack/src/supervisor/handles.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ describe("managed stack handles", { timeout: 30_000 }, () => {
const supabaseHome = path.dirname(project);
const stackModule = new URL("../public/EffectStack.ts", import.meta.url).href;
const encodedStackModule = quoteModuleSpecifier(stackModule);
// set the root to `packages/stack` root
const cwd = path.resolve(import.meta.dirname, "../..");
const script = `
const { Effect } = await import("effect");
const { NodeServices } = await import("@effect/platform-node");
Expand All @@ -777,7 +779,7 @@ describe("managed stack handles", { timeout: 30_000 }, () => {
process.execPath,
["--input-type=module", "-e", script, project],
{
cwd: process.cwd(),
cwd,
env: { SUPABASE_HOME: supabaseHome },
extendEnv: true,
stdout: "pipe",
Expand Down
Loading