---
phase: 20.2
slug: sync-integrity-and-shipment-state-fixes
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-04-13
---

# Phase 20.2 — Validation Strategy

> Per-phase validation contract for feedback sampling during execution.

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | cargo test + BUGSWEEPER HTTP debug server |
| **Config file** | `Cargo.toml` (workspace), `crates/bugsweeper/GUIDE.md` |
| **Quick run command** | `cargo test -p service -p integrations -p app 2>&1 | tail -20` |
| **Full suite command** | `cargo test --workspace 2>&1 | tail -40` |
| **Estimated runtime** | ~30 seconds |

---

## Sampling Rate

- **After every task commit:** Run `cargo test -p service -p integrations -p app 2>&1 | tail -20`
- **After every plan wave:** Run `cargo test --workspace 2>&1 | tail -40`
- **Before `/gsd-verify-work`:** Full suite must be green
- **Max feedback latency:** 30 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| TBD | TBD | TBD | D-01 shipment state | — | N/A | integration | BUGSWEEPER `/cards` endpoint | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-02 state enum | — | N/A | unit | `cargo test -p service` | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-03 migration | — | N/A | integration | SQLite migration test | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-04/D-06 cascade | — | N/A | unit+BUGSWEEPER | `cargo test -p app` + BUGSWEEPER `/cards` | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-08 product durability | — | N/A | BUGSWEEPER | BUGSWEEPER `/discovery` endpoint | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-09 ww-card updates | — | N/A | integration | BUGSWEEPER `/cards` + pending edits | ✅ | ⬜ pending |
| TBD | TBD | TBD | D-10 image pipeline | — | N/A | BUGSWEEPER | BUGSWEEPER verify image data | ✅ | ⬜ pending |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

*Existing infrastructure covers all phase requirements. BUGSWEEPER is already built and available via `--features bugsweeper`.*

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Screen-timelapse captures sync cycle | D-01/D-02 | Visual verification of UI state changes during sync | Run screen-timelapse during sync cycle, verify card shipment states update visually |

---

## 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 < 30s
- [ ] `nyquist_compliant: true` set in frontmatter

**Approval:** pending
