---
phase: 11
slug: pypi-packaging
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-24
---

# Phase 11 — Validation Strategy

> Per-phase validation contract for feedback sampling during execution.

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | pytest 9.0.2 |
| **Config file** | `pyproject.toml` `[tool.pytest.ini_options]` |
| **Quick run command** | `.venv/bin/pytest tests/test_server.py tests/test_entrypoint.py -q` |
| **Full suite command** | `.venv/bin/pytest tests/ -q` |
| **Estimated runtime** | ~5 seconds |

---

## Sampling Rate

- **After every task commit:** Run `.venv/bin/pytest tests/test_server.py tests/test_entrypoint.py -q`
- **After every plan wave:** Run `.venv/bin/pytest tests/ -q`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 10 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 11-01-01 | 01 | 0 | INST-01 | unit | `.venv/bin/pytest tests/test_entrypoint.py -x` | ❌ W0 | ⬜ pending |
| 11-01-02 | 01 | 1 | INST-01 | unit | `.venv/bin/pytest tests/test_entrypoint.py -x` | ❌ W0 | ⬜ pending |
| 11-01-03 | 01 | 1 | INST-01 | smoke | `unzip -l dist/*.whl \| grep vmcluster_mcp/` | manual | ⬜ pending |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

- [ ] `tests/test_entrypoint.py` — stubs for INST-01: asserts `main` is callable in `vmcluster_mcp.__main__`, verifies `[project.scripts]` key exists in `pyproject.toml`

*Existing infrastructure covers all other tests — only the new entry point needs a new test file.*

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Wheel contains all `vmcluster_mcp/` subpackages | INST-01 | Requires built dist/ artifact | `unzip -l dist/*.whl \| grep vmcluster_mcp/` — confirm all subpackages present |
| `uv publish` succeeds to real PyPI | INST-01 | Requires PyPI API token + network | `uv publish --token $UV_PUBLISH_TOKEN` — check PyPI project page exists after |
| `uvx vmcluster-mcp` works post-publish | INST-01 | Requires live PyPI package | `uvx vmcluster-mcp` from a clean env — should execute without error |

---

## Validation Sign-Off

- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ] Wave 0 covers all MISSING references
- [ ] No watch-mode flags
- [ ] Feedback latency < 10s
- [ ] `nyquist_compliant: true` set in frontmatter

**Approval:** pending
