myco:live-smoke-testing

Runs manifest-driven live smoke tests against real UniFi hardware to validate API contracts.

777|101|Updated Apr 21, 2025
One-click install
npx skills add https://github.com/sirkirby/unifi-network-mcp --skill myco-live-smoke-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: myco:live-smoke-testing
Source: https://github.com/sirkirby/unifi-network-mcp/tree/main/.agents/skills/live-smoke-testing
Command: npx skills add https://github.com/sirkirby/unifi-network-mcp --skill myco-live-smoke-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mock-based unit tests and golden fixtures cannot catch API contract failures like auth token expiry, payload normalization mismatches, firmware version differences, or hardware-specific field assumptions. This Skill guides running, interpreting, and extending the live hardware smoke test harness (scripts/live_smoke.py) so API-facing changes are verified against real UniFi controllers before merge.

Core Features & Use Cases

  • Phase-bounded test execution: Run readonly, preview, safe, approved, or inventory phases to bound blast radius, with a human-in-the-loop confirmation gate before any mutation executes.
  • Manifest-driven tool classification: Automatically classifies tools into safety tiers (read_only, preview_or_safe_lifecycle, requires_approval, defer_heavy_read) from ToolAnnotations like readOnlyHint and destructiveHint.
  • Pre-merge blocking gate: Enforces mandatory live smoke evidence for PRs that change API response parsing, with artifact interpretation guidance for live-smoke-results/ JSON reports.
  • Use Case: After modifying how the alarm manager normalizes API payloads, run the readonly and safe phases against your controller, inspect the artifact summaries for contract mismatches, and attach the results as PR merge evidence.

Quick Start

Ask the AI to run the live smoke harness in readonly phase against the network server and interpret the resulting artifact for any API contract failures.

Frequently Asked Questions about myco:live-smoke-testing

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

FAQPage Schema
How do I run live smoke tests against UniFi hardware?

Run uv run --all-packages python scripts/live_smoke.py --server network --phase safe from the repo root with a .env file containing UNIFI_HOST, UNIFI_USERNAME, UNIFI_PASSWORD, and UNIFI_SITE. Start with the readonly phase and advance only after each phase passes cleanly.

How do I add a new tool to the live smoke harness?

Register the tool in the server's tools_manifest.json with correct ToolAnnotations, then run --phase inventory to verify its safety_tier classification. Read-only tools are auto-included; lifecycle tools need a create-update-get-delete method added to LiveSmokeRunner.

Why do unit tests pass but live smoke tests fail?

Mock-based tests use static golden fixtures that cannot evolve with real firmware, so they miss auth token expiry, payload normalization mismatches, and hardware-specific field differences. When live smoke fails without a unit test failure, assume an API contract mismatch and inspect the artifact summary body first.

What do the smoke test phases readonly, safe, and approved mean?

Readonly runs only readOnlyHint tools, safe adds preview calls with confirm=False plus safe lifecycle pairs, and approved executes explicit create-and-delete mutations after human review of preview output. Never skip directly to approved on a first run against new tools or hardware.

Why does the smoke harness fail with ModuleNotFoundError: mcp?

The mcp dependency can vanish from the root virtualenv after make pre-commit, uv lock, or bare uv sync, which re-resolve without workspace packages. Re-run uv sync --all-packages and always invoke the harness from the repo root with uv run --all-packages.

When is live smoke testing mandatory before merging a PR?

Live smoke is a blocking gate whenever code changes API response parsing: manager normalization logic, new response fields, filtering or field selection, payload shape transformation, or version-dependent contracts. The PR must include passing readonly and safe phase evidence with artifact links.