builder-smoke-test

Smoke test the Mastra Agent Builder feature branch against a scaffolded hermetic project.

27.6k|2.7k|Updated Aug 6, 2024
One-click install
npx skills add https://github.com/mastra-ai/mastra --skill builder-smoke-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: builder-smoke-test
Source: https://github.com/mastra-ai/mastra/tree/main/.claude/skills/builder-smoke-test
Command: npx skills add https://github.com/mastra-ai/mastra --skill builder-smoke-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Validating changes to the Mastra Agent Builder feature branch requires manually exercising dozens of API and UI surfaces (stored agents, skills, RBAC, registry, channels), which is slow and error-prone. This Skill automates end-to-end smoke testing of the builder EE surface against a hermetic project linked to the current worktree.

Core Features & Use Cases

  • Hermetic project scaffolding: Scripts scaffold a throwaway project at a configurable directory with pnpm link overrides, so worktree changes take effect on the next dev server restart.
  • Sectioned test coverage: Fifteen reference sections cover workspace reconciliation, stored agents/skills CRUD, model policy, picker allowlists, favorites, RBAC role gating, infrastructure, channels, auth toggling, and UI checks, runnable in full or via --test/--scope filters.
  • Auth-on and auth-off modes: Supports WorkOS-based auth testing with role assertions, session cookie extraction for curl, and multi-user seeding for non-owner flows.
  • Use Case: Before merging a PR touching packages/server or the agent-builder playground routes, run the full smoke suite to confirm stored entity CRUD, RBAC gating, and the Studio UI still behave correctly.

Quick Start

Run the builder smoke test against the current branch to validate the Agent Builder feature end to end.

Frequently Asked Questions about builder-smoke-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I smoke test the Mastra Agent Builder feature branch?

Run the builder-smoke-test skill, which scaffolds a hermetic project linked to your worktree and executes sectioned API and UI checks. Use --test or --scope flags to run specific sections like skills, agents, or rbac instead of the full suite.

How do I run only specific smoke test sections?

Pass --test with comma-separated section names such as --test skills,registry,agents, or use --scope shortcuts like rbac, skills, agents, infra, ui, or quick. Setup always runs first, and remaining sections execute in canonical order.

Does the smoke test support WorkOS authentication testing?

Yes, pass --auth on with WorkOS API key, client ID, and organization ID to scaffold an auth-on project. The skill extracts the httpOnly session cookie via a debug route so curl can hit authenticated endpoints, and asserts the logged-in role matches the --role flag.

Why does the smoke test report mode-mismatch or missing env var errors?

Preflight validates that the scaffolded project's .env matches the expected auth mode and contains OPENAI_API_KEY plus WorkOS keys when needed. Fix these by re-running the scaffold with the correct flags rather than hand-editing the .env file.

Can I test non-owner and Library Copy flows without a second WorkOS account?

Yes, run the seed-multi-user.sh script after the server boots once. It inserts public and private skills owned by a separate seed user directly into the libsql database, enabling non-owner visibility and Library Copy testing.