---
phase: 01
slug: foundation-and-shared-state
status: approved
nyquist_compliant: true
wave_0_complete: true
created: 2026-03-11
---

# Phase 01 — Validation Strategy

> Per-phase validation contract for feedback sampling during execution.

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | Rust built-in test (cargo test) |
| **Config file** | Cargo.toml (workspace) |
| **Quick run command** | `cargo test --workspace` |
| **Full suite command** | `cargo test --workspace` |
| **Estimated runtime** | ~2 seconds |

---

## Sampling Rate

- **After every task commit:** Run `cargo test --workspace`
- **After every plan wave:** Run `cargo test --workspace`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 2 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 01-01-01 | 01 | 1 | PLAT-01 | build | `cargo check --workspace` | N/A | ✅ green |
| 01-01-02 | 01 | 1 | PLAT-01 | script | `powershell -ExecutionPolicy Bypass -File scripts/package/windows-zip.ps1 -WhatIf` | ✅ | ✅ green |
| 01-02-01 | 02 | 2 | AUTH-01 | unit | `cargo test -p wit_core credential_config` | ✅ | ✅ green |
| 01-02-02 | 02 | 2 | AUTH-02 | integration | `cargo test -p service credential_config_tests` | ✅ | ✅ green |
| 01-02-03 | 02 | 2 | AUTH-01, AUTH-02 | integration | `cargo test -p service credential_config_tests` | ✅ | ✅ green |
| 01-03-01 | 03 | 2 | DATA-04 | unit | `cargo test -p service migration_applies_clean` | ✅ | ✅ green |
| 01-03-02 | 03 | 2 | ITEM-02, DSC-01, DSC-02 | integration | `cargo test -p service repository_persistence_tests` | ✅ | ✅ green |
| 01-03-03 | 03 | 2 | DATA-04, ITEM-02, DSC-01, DSC-02 | integration | `cargo test -p service repository_persistence_tests` | ✅ | ✅ green |
| 01-04-01 | 04 | 3 | DATA-04 | integration | `cargo test -p service api_smoke_tests` | ✅ | ✅ green |
| 01-04-02 | 04 | 3 | PLAT-01 | unit | `cargo test -p app service_bootstrap` | ✅ | ✅ green |
| 01-04-03 | 04 | 3 | PLAT-01 | integration | `cargo test -p app --test logging_tests` | ✅ | ✅ green |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

Existing infrastructure covers all phase requirements.

---

## Manual-Only Verifications

All phase behaviors have automated verification.

---

## Validation Sign-Off

- [x] All tasks have `<automated>` verify or Wave 0 dependencies
- [x] Sampling continuity: no 3 consecutive tasks without automated verify
- [x] Wave 0 covers all MISSING references
- [x] No watch-mode flags
- [x] Feedback latency < 2s
- [x] `nyquist_compliant: true` set in frontmatter

**Approval:** approved 2026-03-11

---

## Validation Audit 2026-03-11

| Metric | Count |
|--------|-------|
| Gaps found | 1 |
| Resolved | 1 |
| Escalated | 0 |
