From 1a08408362f8492141a6941d00fce5324d0fa9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Wed, 12 Aug 2026 15:54:38 +0000 Subject: [PATCH 1/2] fix(samples): rename self-improving-mastra to self-improving Every GCP deploy of this sample failed: Error: Invalid value for 'entity.managedZone.name': 'defang-self-improving-mastra-production-tamye7zwgmke4-defang-app' That name is 64 characters; Google Cloud DNS caps managed zone names at 63. Defang builds it as defang----, so the budget for a project name is 53 - len(stack) - len(tenant) - len(byoc domain). On the production stack that leaves 20 characters, and "self-improving-mastra" is 21. "self-improving" is 14, which brings the zone name to 57 and still fits if the stack name grows to 16 characters -- the CLI's own advisory limit for project, service, and stack names. The directory and the compose `name:` move together, per CLAUDE.md. The name stays explicit rather than defaulting to the directory, because this sample deploys itself from two places: CI runs from the checkout (project would become the repo name) and the admin publish flow runs `defang compose up` from /workspace inside the dev container (project would become "workspace"). An explicit name keeps all paths pointing at one project. Also updates the deploy-changed-samples skip filter, which matches this sample by name. The README title keeps "Mastra" so the sample stays findable by framework. --- .github/workflows/deploy-changed-samples.yml | 2 +- README.md | 2 +- .../.dockerignore | 0 .../.env.aws | 0 .../.env.gcp | 0 .../.gitignore | 0 .../Caddyfile | 0 .../Dockerfile.dev | 0 .../README.md | 2 +- .../agent/.gitignore | 0 .../agent/package-lock.json | 4 ++-- .../agent/package.json | 2 +- .../agent/src/admin.ts | 2 +- .../agent/src/auth.ts | 0 .../agent/src/coder.ts | 0 .../agent/src/db.ts | 0 .../agent/src/deployments.ts | 0 .../agent/src/execute.ts | 0 .../agent/src/git.ts | 2 +- .../agent/src/index.ts | 0 .../agent/src/model.ts | 0 .../agent/src/paths.ts | 0 .../agent/src/publish.ts | 0 .../agent/src/runs.ts | 0 .../agent/tsconfig.json | 0 .../compose.dev.yaml | 2 +- .../compose.yaml | 2 +- .../entrypoint.dev.sh | 2 +- .../todo-app/.dockerignore | 0 .../todo-app/.gitignore | 0 .../todo-app/Dockerfile | 0 .../todo-app/README.md | 0 .../todo-app/app/actions.ts | 0 .../todo-app/app/api/auth/[...all]/route.ts | 0 .../todo-app/app/api/errors/route.ts | 0 .../todo-app/app/api/feedback/route.ts | 0 .../todo-app/app/api/health/route.ts | 0 .../todo-app/app/error.tsx | 0 .../todo-app/app/favicon.ico | Bin .../todo-app/app/global-error.tsx | 0 .../todo-app/app/globals.css | 0 .../todo-app/app/layout.tsx | 0 .../todo-app/app/login/page.tsx | 0 .../todo-app/app/page.tsx | 0 .../todo-app/app/signup/page.tsx | 0 .../todo-app/components/app-header.tsx | 0 .../todo-app/components/auth-form.tsx | 0 .../todo-app/components/error-reporter.tsx | 0 .../todo-app/components/feedback-bubble.tsx | 0 .../todo-app/eslint.config.mjs | 0 .../todo-app/instrumentation.ts | 0 .../todo-app/lib/auth-client.ts | 0 .../todo-app/lib/auth.ts | 0 .../todo-app/lib/db.ts | 0 .../todo-app/lib/report-client-error.ts | 0 .../todo-app/lib/report-error.ts | 0 .../todo-app/lib/schema.sql | 0 .../todo-app/lib/session.ts | 0 .../todo-app/next.config.ts | 0 .../todo-app/package-lock.json | 0 .../todo-app/package.json | 0 .../todo-app/postcss.config.mjs | 0 .../todo-app/public/file.svg | 0 .../todo-app/public/globe.svg | 0 .../todo-app/public/next.svg | 0 .../todo-app/public/vercel.svg | 0 .../todo-app/public/window.svg | 0 .../todo-app/tsconfig.json | 0 68 files changed, 11 insertions(+), 11 deletions(-) rename samples/{self-improving-mastra => self-improving}/.dockerignore (100%) rename samples/{self-improving-mastra => self-improving}/.env.aws (100%) rename samples/{self-improving-mastra => self-improving}/.env.gcp (100%) rename samples/{self-improving-mastra => self-improving}/.gitignore (100%) rename samples/{self-improving-mastra => self-improving}/Caddyfile (100%) rename samples/{self-improving-mastra => self-improving}/Dockerfile.dev (100%) rename samples/{self-improving-mastra => self-improving}/README.md (99%) rename samples/{self-improving-mastra => self-improving}/agent/.gitignore (100%) rename samples/{self-improving-mastra => self-improving}/agent/package-lock.json (99%) rename samples/{self-improving-mastra => self-improving}/agent/package.json (90%) rename samples/{self-improving-mastra => self-improving}/agent/src/admin.ts (99%) rename samples/{self-improving-mastra => self-improving}/agent/src/auth.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/coder.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/db.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/deployments.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/execute.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/git.ts (99%) rename samples/{self-improving-mastra => self-improving}/agent/src/index.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/model.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/paths.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/publish.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/src/runs.ts (100%) rename samples/{self-improving-mastra => self-improving}/agent/tsconfig.json (100%) rename samples/{self-improving-mastra => self-improving}/compose.dev.yaml (98%) rename samples/{self-improving-mastra => self-improving}/compose.yaml (99%) rename samples/{self-improving-mastra => self-improving}/entrypoint.dev.sh (99%) rename samples/{self-improving-mastra => self-improving}/todo-app/.dockerignore (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/.gitignore (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/Dockerfile (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/README.md (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/actions.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/api/auth/[...all]/route.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/api/errors/route.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/api/feedback/route.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/api/health/route.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/error.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/favicon.ico (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/global-error.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/globals.css (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/layout.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/login/page.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/page.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/app/signup/page.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/components/app-header.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/components/auth-form.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/components/error-reporter.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/components/feedback-bubble.tsx (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/eslint.config.mjs (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/instrumentation.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/auth-client.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/auth.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/db.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/report-client-error.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/report-error.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/schema.sql (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/lib/session.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/next.config.ts (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/package-lock.json (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/package.json (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/postcss.config.mjs (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/public/file.svg (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/public/globe.svg (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/public/next.svg (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/public/vercel.svg (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/public/window.svg (100%) rename samples/{self-improving-mastra => self-improving}/todo-app/tsconfig.json (100%) diff --git a/.github/workflows/deploy-changed-samples.yml b/.github/workflows/deploy-changed-samples.yml index b7053e6c0..73d6d0773 100644 --- a/.github/workflows/deploy-changed-samples.yml +++ b/.github/workflows/deploy-changed-samples.yml @@ -29,7 +29,7 @@ jobs: # This BYOC-only sample exceeds the retired Playground staging quota. git diff --name-only HEAD $LAST_ANCESTOR \ | grep '^samples/' \ - | awk -F'/' '$2 != "self-improving-mastra" {print $1"/"$2}' \ + | awk -F'/' '$2 != "self-improving" {print $1"/"$2}' \ | sort \ | uniq > changed_samples.txt if [ -s changed_samples.txt ]; then diff --git a/README.md b/README.md index 15f81db6c..d4d7c2cea 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ When you add a new sample, make sure to add any config vals to the `deploy-chang | [Rocket](./samples/rocket) | A simple Rocket app. | Rocket | Rust | | [Sails.js](./samples/sailsjs) | A short hello world application demonstrating how to deploy Sails.js onto Defang. | Sails.js, Node.js | nodejs | | [Sails.js & PostgreSQL](./samples/sailsjs-postgres) | A sample project demonstrating how to deploy a project with PostgreSQL and Sails.js. | PostgreSQL, Sails.js, SQL, JavaScript | nodejs | -| [Self-Improving Mastra Todo](./samples/self-improving-mastra) | A Next.js todo app where an admin can turn stored user feedback into live code changes with a Mastra coding agent. | Mastra, Next.js, PostgreSQL, Better Auth, AI, Agents | TypeScript, JavaScript, Docker | +| [Self-Improving Mastra Todo](./samples/self-improving) | A Next.js todo app where an admin can turn stored user feedback into live code changes with a Mastra coding agent. | Mastra, Next.js, PostgreSQL, Better Auth, AI, Agents | TypeScript, JavaScript, Docker | | [Svelte & Node.js & MySQL](./samples/svelte-mysql) | A full-stack application using Svelte for the frontend, Node.js for the backend, and MySQL for the database. | Svelte, Node.js, MySQL, Full-stack, JavaScript, TypeScript, SQL | nodejs | | [SvelteKit](./samples/sveltekit) | A minimal SvelteKit app running on Defang. | SvelteKit, TypeScript, JavaScript, Svelte, Node.js, Frontend, TypeScript, JavaScript | nodejs | | [SvelteKit & MongoDB](./samples/sveltekit-mongodb) | A full-stack application using SvelteKit for the frontend and MongoDB for the database. | SvelteKit, MongoDB, Full-stack, Node.js, JavaScript | nodejs | diff --git a/samples/self-improving-mastra/.dockerignore b/samples/self-improving/.dockerignore similarity index 100% rename from samples/self-improving-mastra/.dockerignore rename to samples/self-improving/.dockerignore diff --git a/samples/self-improving-mastra/.env.aws b/samples/self-improving/.env.aws similarity index 100% rename from samples/self-improving-mastra/.env.aws rename to samples/self-improving/.env.aws diff --git a/samples/self-improving-mastra/.env.gcp b/samples/self-improving/.env.gcp similarity index 100% rename from samples/self-improving-mastra/.env.gcp rename to samples/self-improving/.env.gcp diff --git a/samples/self-improving-mastra/.gitignore b/samples/self-improving/.gitignore similarity index 100% rename from samples/self-improving-mastra/.gitignore rename to samples/self-improving/.gitignore diff --git a/samples/self-improving-mastra/Caddyfile b/samples/self-improving/Caddyfile similarity index 100% rename from samples/self-improving-mastra/Caddyfile rename to samples/self-improving/Caddyfile diff --git a/samples/self-improving-mastra/Dockerfile.dev b/samples/self-improving/Dockerfile.dev similarity index 100% rename from samples/self-improving-mastra/Dockerfile.dev rename to samples/self-improving/Dockerfile.dev diff --git a/samples/self-improving-mastra/README.md b/samples/self-improving/README.md similarity index 99% rename from samples/self-improving-mastra/README.md rename to samples/self-improving/README.md index 53273fdfe..716fc19e8 100644 --- a/samples/self-improving-mastra/README.md +++ b/samples/self-improving/README.md @@ -1,6 +1,6 @@ # Self-Improving Mastra Todo -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/self-improving-mastra) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/self-improving) This sample is a multi-user Next.js todo app that turns user feedback into live code changes. Better Auth and PostgreSQL provide accounts, private todo lists, diff --git a/samples/self-improving-mastra/agent/.gitignore b/samples/self-improving/agent/.gitignore similarity index 100% rename from samples/self-improving-mastra/agent/.gitignore rename to samples/self-improving/agent/.gitignore diff --git a/samples/self-improving-mastra/agent/package-lock.json b/samples/self-improving/agent/package-lock.json similarity index 99% rename from samples/self-improving-mastra/agent/package-lock.json rename to samples/self-improving/agent/package-lock.json index 0ed5525ce..aaac5ffd1 100644 --- a/samples/self-improving-mastra/agent/package-lock.json +++ b/samples/self-improving/agent/package-lock.json @@ -1,10 +1,10 @@ { - "name": "self-improving-mastra-agent", + "name": "self-improving-agent", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "self-improving-mastra-agent", + "name": "self-improving-agent", "dependencies": { "@hono/node-server": "^1.14.4", "@mastra/core": "^1.51.0", diff --git a/samples/self-improving-mastra/agent/package.json b/samples/self-improving/agent/package.json similarity index 90% rename from samples/self-improving-mastra/agent/package.json rename to samples/self-improving/agent/package.json index 6853cb3dc..1adb4772e 100644 --- a/samples/self-improving-mastra/agent/package.json +++ b/samples/self-improving/agent/package.json @@ -1,5 +1,5 @@ { - "name": "self-improving-mastra-agent", + "name": "self-improving-agent", "private": true, "type": "module", "scripts": { diff --git a/samples/self-improving-mastra/agent/src/admin.ts b/samples/self-improving/agent/src/admin.ts similarity index 99% rename from samples/self-improving-mastra/agent/src/admin.ts rename to samples/self-improving/agent/src/admin.ts index 368aed676..13a1ee564 100644 --- a/samples/self-improving-mastra/agent/src/admin.ts +++ b/samples/self-improving/agent/src/admin.ts @@ -220,7 +220,7 @@ function renderShell(who: string): string { } const CONSOLE_SCRIPT = ` - const KEY = "self-improving-mastra-active-run"; + const KEY = "self-improving-active-run"; const selected = new Set(); let pollTimer; const $ = (id) => document.getElementById(id); diff --git a/samples/self-improving-mastra/agent/src/auth.ts b/samples/self-improving/agent/src/auth.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/auth.ts rename to samples/self-improving/agent/src/auth.ts diff --git a/samples/self-improving-mastra/agent/src/coder.ts b/samples/self-improving/agent/src/coder.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/coder.ts rename to samples/self-improving/agent/src/coder.ts diff --git a/samples/self-improving-mastra/agent/src/db.ts b/samples/self-improving/agent/src/db.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/db.ts rename to samples/self-improving/agent/src/db.ts diff --git a/samples/self-improving-mastra/agent/src/deployments.ts b/samples/self-improving/agent/src/deployments.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/deployments.ts rename to samples/self-improving/agent/src/deployments.ts diff --git a/samples/self-improving-mastra/agent/src/execute.ts b/samples/self-improving/agent/src/execute.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/execute.ts rename to samples/self-improving/agent/src/execute.ts diff --git a/samples/self-improving-mastra/agent/src/git.ts b/samples/self-improving/agent/src/git.ts similarity index 99% rename from samples/self-improving-mastra/agent/src/git.ts rename to samples/self-improving/agent/src/git.ts index 2a3ae2c3f..a68b43807 100644 --- a/samples/self-improving-mastra/agent/src/git.ts +++ b/samples/self-improving/agent/src/git.ts @@ -24,7 +24,7 @@ const exec = promisify(execFile); */ export const REPO_DIR = LIVE_REPO; -const AGENT_IDENTITY = ["-c", "user.name=coding-agent", "-c", "user.email=agent@self-improving-mastra.local"]; +const AGENT_IDENTITY = ["-c", "user.name=coding-agent", "-c", "user.email=agent@self-improving.local"]; async function git( args: string[], diff --git a/samples/self-improving-mastra/agent/src/index.ts b/samples/self-improving/agent/src/index.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/index.ts rename to samples/self-improving/agent/src/index.ts diff --git a/samples/self-improving-mastra/agent/src/model.ts b/samples/self-improving/agent/src/model.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/model.ts rename to samples/self-improving/agent/src/model.ts diff --git a/samples/self-improving-mastra/agent/src/paths.ts b/samples/self-improving/agent/src/paths.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/paths.ts rename to samples/self-improving/agent/src/paths.ts diff --git a/samples/self-improving-mastra/agent/src/publish.ts b/samples/self-improving/agent/src/publish.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/publish.ts rename to samples/self-improving/agent/src/publish.ts diff --git a/samples/self-improving-mastra/agent/src/runs.ts b/samples/self-improving/agent/src/runs.ts similarity index 100% rename from samples/self-improving-mastra/agent/src/runs.ts rename to samples/self-improving/agent/src/runs.ts diff --git a/samples/self-improving-mastra/agent/tsconfig.json b/samples/self-improving/agent/tsconfig.json similarity index 100% rename from samples/self-improving-mastra/agent/tsconfig.json rename to samples/self-improving/agent/tsconfig.json diff --git a/samples/self-improving-mastra/compose.dev.yaml b/samples/self-improving/compose.dev.yaml similarity index 98% rename from samples/self-improving-mastra/compose.dev.yaml rename to samples/self-improving/compose.dev.yaml index 1a77e1f10..822bdcb6c 100644 --- a/samples/self-improving-mastra/compose.dev.yaml +++ b/samples/self-improving/compose.dev.yaml @@ -8,7 +8,7 @@ # coding agent's edits land in your working tree. The local model is a small # one so it runs on a laptop; expect much lower edit quality than the # deployed Vertex AI model — local is for testing the loop, not the quality. -name: self-improving-mastra-dev +name: self-improving-dev services: dev: build: diff --git a/samples/self-improving-mastra/compose.yaml b/samples/self-improving/compose.yaml similarity index 99% rename from samples/self-improving-mastra/compose.yaml rename to samples/self-improving/compose.yaml index c8762c1a1..77fd5065f 100644 --- a/samples/self-improving-mastra/compose.yaml +++ b/samples/self-improving/compose.yaml @@ -1,4 +1,4 @@ -name: self-improving-mastra +name: self-improving services: # The production to-do app. Runs a Next.js production build with no source # code, no agent, and no admin UI. Exactly one ingress port keeps it diff --git a/samples/self-improving-mastra/entrypoint.dev.sh b/samples/self-improving/entrypoint.dev.sh similarity index 99% rename from samples/self-improving-mastra/entrypoint.dev.sh rename to samples/self-improving/entrypoint.dev.sh index d3e836d53..fbf4b4ef9 100755 --- a/samples/self-improving-mastra/entrypoint.dev.sh +++ b/samples/self-improving/entrypoint.dev.sh @@ -15,7 +15,7 @@ cd /workspace if [ ! -d .git ]; then git init -q -b main git add -A - git -c user.name="coding-agent" -c user.email="agent@self-improving-mastra.local" \ + git -c user.name="coding-agent" -c user.email="agent@self-improving.local" \ commit -qm "baseline: as deployed" else echo "existing git history: $(git rev-list --count HEAD 2>/dev/null || echo 0) commit(s) at $(git rev-parse --short HEAD 2>/dev/null || echo '?')" diff --git a/samples/self-improving-mastra/todo-app/.dockerignore b/samples/self-improving/todo-app/.dockerignore similarity index 100% rename from samples/self-improving-mastra/todo-app/.dockerignore rename to samples/self-improving/todo-app/.dockerignore diff --git a/samples/self-improving-mastra/todo-app/.gitignore b/samples/self-improving/todo-app/.gitignore similarity index 100% rename from samples/self-improving-mastra/todo-app/.gitignore rename to samples/self-improving/todo-app/.gitignore diff --git a/samples/self-improving-mastra/todo-app/Dockerfile b/samples/self-improving/todo-app/Dockerfile similarity index 100% rename from samples/self-improving-mastra/todo-app/Dockerfile rename to samples/self-improving/todo-app/Dockerfile diff --git a/samples/self-improving-mastra/todo-app/README.md b/samples/self-improving/todo-app/README.md similarity index 100% rename from samples/self-improving-mastra/todo-app/README.md rename to samples/self-improving/todo-app/README.md diff --git a/samples/self-improving-mastra/todo-app/app/actions.ts b/samples/self-improving/todo-app/app/actions.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/app/actions.ts rename to samples/self-improving/todo-app/app/actions.ts diff --git a/samples/self-improving-mastra/todo-app/app/api/auth/[...all]/route.ts b/samples/self-improving/todo-app/app/api/auth/[...all]/route.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/app/api/auth/[...all]/route.ts rename to samples/self-improving/todo-app/app/api/auth/[...all]/route.ts diff --git a/samples/self-improving-mastra/todo-app/app/api/errors/route.ts b/samples/self-improving/todo-app/app/api/errors/route.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/app/api/errors/route.ts rename to samples/self-improving/todo-app/app/api/errors/route.ts diff --git a/samples/self-improving-mastra/todo-app/app/api/feedback/route.ts b/samples/self-improving/todo-app/app/api/feedback/route.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/app/api/feedback/route.ts rename to samples/self-improving/todo-app/app/api/feedback/route.ts diff --git a/samples/self-improving-mastra/todo-app/app/api/health/route.ts b/samples/self-improving/todo-app/app/api/health/route.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/app/api/health/route.ts rename to samples/self-improving/todo-app/app/api/health/route.ts diff --git a/samples/self-improving-mastra/todo-app/app/error.tsx b/samples/self-improving/todo-app/app/error.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/error.tsx rename to samples/self-improving/todo-app/app/error.tsx diff --git a/samples/self-improving-mastra/todo-app/app/favicon.ico b/samples/self-improving/todo-app/app/favicon.ico similarity index 100% rename from samples/self-improving-mastra/todo-app/app/favicon.ico rename to samples/self-improving/todo-app/app/favicon.ico diff --git a/samples/self-improving-mastra/todo-app/app/global-error.tsx b/samples/self-improving/todo-app/app/global-error.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/global-error.tsx rename to samples/self-improving/todo-app/app/global-error.tsx diff --git a/samples/self-improving-mastra/todo-app/app/globals.css b/samples/self-improving/todo-app/app/globals.css similarity index 100% rename from samples/self-improving-mastra/todo-app/app/globals.css rename to samples/self-improving/todo-app/app/globals.css diff --git a/samples/self-improving-mastra/todo-app/app/layout.tsx b/samples/self-improving/todo-app/app/layout.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/layout.tsx rename to samples/self-improving/todo-app/app/layout.tsx diff --git a/samples/self-improving-mastra/todo-app/app/login/page.tsx b/samples/self-improving/todo-app/app/login/page.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/login/page.tsx rename to samples/self-improving/todo-app/app/login/page.tsx diff --git a/samples/self-improving-mastra/todo-app/app/page.tsx b/samples/self-improving/todo-app/app/page.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/page.tsx rename to samples/self-improving/todo-app/app/page.tsx diff --git a/samples/self-improving-mastra/todo-app/app/signup/page.tsx b/samples/self-improving/todo-app/app/signup/page.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/app/signup/page.tsx rename to samples/self-improving/todo-app/app/signup/page.tsx diff --git a/samples/self-improving-mastra/todo-app/components/app-header.tsx b/samples/self-improving/todo-app/components/app-header.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/components/app-header.tsx rename to samples/self-improving/todo-app/components/app-header.tsx diff --git a/samples/self-improving-mastra/todo-app/components/auth-form.tsx b/samples/self-improving/todo-app/components/auth-form.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/components/auth-form.tsx rename to samples/self-improving/todo-app/components/auth-form.tsx diff --git a/samples/self-improving-mastra/todo-app/components/error-reporter.tsx b/samples/self-improving/todo-app/components/error-reporter.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/components/error-reporter.tsx rename to samples/self-improving/todo-app/components/error-reporter.tsx diff --git a/samples/self-improving-mastra/todo-app/components/feedback-bubble.tsx b/samples/self-improving/todo-app/components/feedback-bubble.tsx similarity index 100% rename from samples/self-improving-mastra/todo-app/components/feedback-bubble.tsx rename to samples/self-improving/todo-app/components/feedback-bubble.tsx diff --git a/samples/self-improving-mastra/todo-app/eslint.config.mjs b/samples/self-improving/todo-app/eslint.config.mjs similarity index 100% rename from samples/self-improving-mastra/todo-app/eslint.config.mjs rename to samples/self-improving/todo-app/eslint.config.mjs diff --git a/samples/self-improving-mastra/todo-app/instrumentation.ts b/samples/self-improving/todo-app/instrumentation.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/instrumentation.ts rename to samples/self-improving/todo-app/instrumentation.ts diff --git a/samples/self-improving-mastra/todo-app/lib/auth-client.ts b/samples/self-improving/todo-app/lib/auth-client.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/auth-client.ts rename to samples/self-improving/todo-app/lib/auth-client.ts diff --git a/samples/self-improving-mastra/todo-app/lib/auth.ts b/samples/self-improving/todo-app/lib/auth.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/auth.ts rename to samples/self-improving/todo-app/lib/auth.ts diff --git a/samples/self-improving-mastra/todo-app/lib/db.ts b/samples/self-improving/todo-app/lib/db.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/db.ts rename to samples/self-improving/todo-app/lib/db.ts diff --git a/samples/self-improving-mastra/todo-app/lib/report-client-error.ts b/samples/self-improving/todo-app/lib/report-client-error.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/report-client-error.ts rename to samples/self-improving/todo-app/lib/report-client-error.ts diff --git a/samples/self-improving-mastra/todo-app/lib/report-error.ts b/samples/self-improving/todo-app/lib/report-error.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/report-error.ts rename to samples/self-improving/todo-app/lib/report-error.ts diff --git a/samples/self-improving-mastra/todo-app/lib/schema.sql b/samples/self-improving/todo-app/lib/schema.sql similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/schema.sql rename to samples/self-improving/todo-app/lib/schema.sql diff --git a/samples/self-improving-mastra/todo-app/lib/session.ts b/samples/self-improving/todo-app/lib/session.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/lib/session.ts rename to samples/self-improving/todo-app/lib/session.ts diff --git a/samples/self-improving-mastra/todo-app/next.config.ts b/samples/self-improving/todo-app/next.config.ts similarity index 100% rename from samples/self-improving-mastra/todo-app/next.config.ts rename to samples/self-improving/todo-app/next.config.ts diff --git a/samples/self-improving-mastra/todo-app/package-lock.json b/samples/self-improving/todo-app/package-lock.json similarity index 100% rename from samples/self-improving-mastra/todo-app/package-lock.json rename to samples/self-improving/todo-app/package-lock.json diff --git a/samples/self-improving-mastra/todo-app/package.json b/samples/self-improving/todo-app/package.json similarity index 100% rename from samples/self-improving-mastra/todo-app/package.json rename to samples/self-improving/todo-app/package.json diff --git a/samples/self-improving-mastra/todo-app/postcss.config.mjs b/samples/self-improving/todo-app/postcss.config.mjs similarity index 100% rename from samples/self-improving-mastra/todo-app/postcss.config.mjs rename to samples/self-improving/todo-app/postcss.config.mjs diff --git a/samples/self-improving-mastra/todo-app/public/file.svg b/samples/self-improving/todo-app/public/file.svg similarity index 100% rename from samples/self-improving-mastra/todo-app/public/file.svg rename to samples/self-improving/todo-app/public/file.svg diff --git a/samples/self-improving-mastra/todo-app/public/globe.svg b/samples/self-improving/todo-app/public/globe.svg similarity index 100% rename from samples/self-improving-mastra/todo-app/public/globe.svg rename to samples/self-improving/todo-app/public/globe.svg diff --git a/samples/self-improving-mastra/todo-app/public/next.svg b/samples/self-improving/todo-app/public/next.svg similarity index 100% rename from samples/self-improving-mastra/todo-app/public/next.svg rename to samples/self-improving/todo-app/public/next.svg diff --git a/samples/self-improving-mastra/todo-app/public/vercel.svg b/samples/self-improving/todo-app/public/vercel.svg similarity index 100% rename from samples/self-improving-mastra/todo-app/public/vercel.svg rename to samples/self-improving/todo-app/public/vercel.svg diff --git a/samples/self-improving-mastra/todo-app/public/window.svg b/samples/self-improving/todo-app/public/window.svg similarity index 100% rename from samples/self-improving-mastra/todo-app/public/window.svg rename to samples/self-improving/todo-app/public/window.svg diff --git a/samples/self-improving-mastra/todo-app/tsconfig.json b/samples/self-improving/todo-app/tsconfig.json similarity index 100% rename from samples/self-improving-mastra/todo-app/tsconfig.json rename to samples/self-improving/todo-app/tsconfig.json From f73e9a4383c5b7fb46c124a0cb155ae3c99d86e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Wed, 12 Aug 2026 15:59:30 +0000 Subject: [PATCH 2/2] fix(ci): skip changed samples whose directory no longer exists The deploy job failed on the rename commit: Running tests for samples: ^self-improving-mastra$ Found 0 samples from a total of 85; 0 matched, 0 excluded failed to run tests : no results found `git diff --name-only` reports a rename under its old path, so the changed-sample list named a directory that no longer exists. The load test then matched nothing and exited 1. Filter the list to directories that are still present. An empty list already takes the "no samples have changed" branch, so a PR that only renames or deletes samples now passes instead of hard-failing. --- .github/workflows/deploy-changed-samples.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-changed-samples.yml b/.github/workflows/deploy-changed-samples.yml index 73d6d0773..80d7a7512 100644 --- a/.github/workflows/deploy-changed-samples.yml +++ b/.github/workflows/deploy-changed-samples.yml @@ -31,7 +31,13 @@ jobs: | grep '^samples/' \ | awk -F'/' '$2 != "self-improving" {print $1"/"$2}' \ | sort \ - | uniq > changed_samples.txt + | uniq \ + | while read -r sample; do + # A renamed or deleted sample still shows up in the diff, but + # there is nothing left to deploy. Without this the job fails + # with "no results found". + if [ -d "$sample" ]; then echo "$sample"; fi + done > changed_samples.txt if [ -s changed_samples.txt ]; then echo "should_continue=true" >> $GITHUB_ENV echo "The following samples have changed:"