Skip to content

Added demo seed#2183

Open
aline-pereira wants to merge 15 commits intomainfrom
feat/demo-seed
Open

Added demo seed#2183
aline-pereira wants to merge 15 commits intomainfrom
feat/demo-seed

Conversation

@aline-pereira
Copy link

@aline-pereira aline-pereira commented Jan 8, 2026

What is this contribution about?

Describe your changes and why they're needed.
Creating a seeding that allows you to create a complete demo environment for MCP Mesh. It uses environment variables.

Screenshots/Demonstration

Add screenshots or a Loom video if your changes affect the UI.
Loom: https://www.loom.com/share/b9d964169c7b4b1796c9bb7411bbe641

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Adds a modular demo seed that creates two realistic demo orgs with users, gateways, connections, and monitoring logs for quick demos and testing. Supports SEED=demo to auto-run during migrations with cleanup and a quick start.

  • New Features

    • Modular demo seed under apps/mesh/migrations/seeds/demo with catalog, factories, org seeds, and types.
    • Seeds two orgs: Onboarding (small, first steps) and Deco Bank (mature, many tools) with users, gateways, real MCP connections, and ~1,000,000+ logs; creates Better Auth tables; idempotent cleanup; cross-org access.
    • SEED=demo in migrate.ts (reads from option or env); seeds/index registers the demo seed; demo.ts re-exports and is deprecated.
    • CI runs migrations with SEED=demo to validate the seed.
  • Migration

    • Run locally: SEED=demo bun run dev; login with carlos.mendes@decobank.com / demo123 (or admin@onboarding.local / demo123).
    • Reset: remove apps/mesh/data/mesh.db and restart with SEED=demo.
    • Or run programmatically: migrateToLatest({ seed: "demo" }).
    • No breaking changes.

Written for commit a38de64. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🧪 Benchmark

Should we run the MCP Gateway benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 1.10.1-alpha.1
🎉 Patch 1.10.1
❤️ Minor 1.11.0
🚀 Major 2.0.0

Current version: 1.10.0

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 12 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/mesh/migrations/seeds/demo/connections.ts">

<violation number="1" location="apps/mesh/migrations/seeds/demo/connections.ts:42">
P2: Inconsistent capitalization: `title` should be `"OpenRouter"` to match the capitalization style of other entries in this file.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

},
},
openrouter: {
title: "openrouter",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Inconsistent capitalization: title should be "OpenRouter" to match the capitalization style of other entries in this file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/migrations/seeds/demo/connections.ts, line 42:

<comment>Inconsistent capitalization: `title` should be `"OpenRouter"` to match the capitalization style of other entries in this file.</comment>

<file context>
@@ -0,0 +1,113 @@
+    },
+  },
+  openrouter: {
+    title: "openrouter",
+    description: "OpenRouter App Connection for LLM uses.",
+    icon: "https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",
</file context>
Suggested change
title: "openrouter",
title: "OpenRouter",

✅ Addressed in 78aa820

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/mesh/migrations/seeds/demo/orgs/deco-bank.ts">

<violation number="1" location="apps/mesh/migrations/seeds/demo/orgs/deco-bank.ts:738">
P1: Off-hours calculation produces invalid hour values (24-26). Hours must be in range 0-23. Use modulo arithmetic to properly wrap around midnight.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

} else {
// Off hours: 10pm to 7am (9 hours)
const offHour = Math.random() * 9;
hourOffset = offHour < 5 ? 22 + offHour : offHour - 5; // 22-24 or 0-7
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Off-hours calculation produces invalid hour values (24-26). Hours must be in range 0-23. Use modulo arithmetic to properly wrap around midnight.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/migrations/seeds/demo/orgs/deco-bank.ts, line 738:

<comment>Off-hours calculation produces invalid hour values (24-26). Hours must be in range 0-23. Use modulo arithmetic to properly wrap around midnight.</comment>

<file context>
@@ -721,25 +722,33 @@ function generateSyntheticLogs(targetCount: number): MonitoringLog[] {
-      randomOffset = 7 * TIME.DAY + Math.random() * 23 * TIME.DAY;
+      // Off hours: 10pm to 7am (9 hours)
+      const offHour = Math.random() * 9;
+      hourOffset = offHour < 5 ? 22 + offHour : offHour - 5; // 22-24 or 0-7
     }
 
</file context>
Suggested change
hourOffset = offHour < 5 ? 22 + offHour : offHour - 5; // 22-24 or 0-7
hourOffset = (22 + offHour) % 24;
Fix with Cubic

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.

1 participant