testing-dashboard-runtime

Test FastAPI runtime and Next.js dashboard end-to-end with API and sqlite assertions.

1|3|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-dashboard-runtime-aikagrya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-dashboard-runtime
Source: https://github.com/AIKAGRYA/dharma_swarm/tree/main/.agents/skills/testing-dashboard-runtime
Command: npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-dashboard-runtime-aikagrya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Verifying that a dashboard and its backend actually work together is error-prone: a UI can render while the API behind it is dead. This Skill provides a repeatable inside-out smoke test that proves the FastAPI runtime boots, the Next.js dashboard renders live telemetry matching API values, and opportunity dispatch/refill writes durable sqlite state. ## Core Features & Use Cases - Inside-out verification: Assert at the API first, then confirm the dashboard UI shows the same numbers from /api/overview, so a pretty dashboard over a dead API fails the test. - Isolated state testing: Uses a throwaway DHARMA_STATE_DIR so sqlite assertions on task_claims and delegation_runs are repeatable and never pollute real state. - Opportunity loop checks: Validates the six-stage pipeline (scope through first_artifact), dispatch producing 6 task claims and 6 delegation runs, and refill producing a revenue packet on disk. - Use Case: After modifying the API or dashboard, run this smoke to confirm the runtime boots, metric cards match /api/overview values, and dispatch/refill write correct rows to runtime.db before merging. ## Quick Start Run the dashboard and runtime smoke test against this checkout and report whether the API, UI telemetry, and opportunity dispatch all pass.

Frequently Asked Questions about testing-dashboard-runtime

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

FAQPage Schema
How do I test a FastAPI backend and Next.js dashboard end-to-end?▼

Start uvicorn on port 8420 with an isolated state directory, start the Next dev server on port 3420, then assert API responses first and confirm the dashboard UI shows the same values from /api/overview. Verify writes by inspecting sqlite rows directly.

How do I verify dashboard metrics match API responses?▼

Compare the rendered metric cards (Agents, Tasks, Fitness, Health) against GET /api/overview fields agent_count, task_count, mean_fitness, and health_status. The UI passing without matching API values is considered a failure.

Do I need API keys or secrets to run this smoke test?▼

No secrets are needed in dev mode. When DASHBOARD_API_KEY is unset, the API middleware opens /api/* endpoints. Set it only when intentionally testing Bearer auth; NATS credentials are never required for this smoke.

Why should I use an isolated state directory for runtime testing?▼

An isolated DHARMA_STATE_DIR makes sqlite assertions on task_claims and delegation_runs repeatable and prevents polluting the real ~/.dharma state. The throwaway directory should never be committed to git.

What are the limitations of this dashboard smoke test?▼

It is a smoke test, not a full test suite: startup warnings like GnaniLodestone seeding issues and health_status unknown are warnings unless an endpoint actually errors. It does not cover live A2A substrate tests requiring NATS credentials.