testing-dashboard-runtime

Tests FastAPI runtime boot, Next.js dashboard telemetry, and opportunity dispatch end-to-end.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill testing-dashboard-runtime-amitabhainarunachala
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-dashboard-runtime
Source: https://github.com/AmitabhainArunachala/dharma_swarmv.01/tree/main/.agents/skills/testing-dashboard-runtime
Command: npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill testing-dashboard-runtime-amitabhainarunachala

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, and state writes can silently fail. This Skill provides a repeatable inside-out smoke test that asserts at the FastAPI layer first, then confirms the Next.js dashboard shows the same numbers, and finally checks that opportunity dispatch and refill write durable sqlite state. ## Core Features & Use Cases - Runtime boot verification: Starts uvicorn with an isolated DHARMA_STATE_DIR so sqlite assertions are repeatable and never pollute the real state directory. - Dashboard telemetry diffing: Compares rendered metric cards (Agents, Tasks, Fitness, Health) against GET /api/overview values so a pretty UI over a dead API counts as a failure. - Opportunity loop checks: Dispatches and refills a test opportunity, then asserts exactly 6 task_claims and 6 delegation_runs rows exist in runtime.db, plus a revenue packet on disk. - Use Case: After modifying the FastAPI routers or dashboard pages, run this smoke to confirm the app boots, telemetry is live, and dispatch/refill still write durable state before merging. ## Quick Start Run the dashboard and runtime inside-out smoke test against this checkout and report whether boot, telemetry, dispatch, and refill 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, then run the Next.js dev server on port 3420 and open the dashboard. Assert API responses first with curl, then confirm the rendered metric cards match GET /api/overview values exactly.

How do I verify sqlite state writes from an API dispatch endpoint?▼

POST to the dispatch endpoint, then inspect runtime.db with Python's sqlite3 module to confirm the expected rows exist. This smoke test requires exactly 6 task_claims and 6 delegation_runs rows matching the test opportunity id.

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

No secrets are needed in dev mode. When DASHBOARD_API_KEY is unset, the API middleware opens /api/* endpoints, and NATS credentials are only required for live A2A substrate tests, not this smoke.

Why does the dashboard show health_status unknown during testing?▼

A health_status of unknown is a warning, not a wiring failure, as long as /api/health returns status ok and no endpoint errored. Startup warnings like GnaniLodestone seeding issues only become failures if an endpoint actually errors.

What are the limitations of this dashboard smoke test?▼

It only covers local dev-mode boot, telemetry rendering, and the opportunity dispatch/refill loop; it does not test Bearer auth, live NATS substrate, or production configuration. It also requires killing the dev servers afterward and never committing the .e2e_state directory.