---
phase: 06.3
slug: cycle-4-gap-closure-d-40-d-45-d-51-d-53-d-54-d-55-d-56-d-57
status: ready
nyquist_compliant: true
wave_0_complete: true
created: 2026-05-13
---

# Phase 06.3 — Validation Strategy

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

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | vitest 1.x (unit/integration) + @playwright/test 1.x (e2e) |
| **Config file** | `vitest.config.ts` per-package; `playwright.config.ts` at root |
| **Quick run command** | `pnpm -r test --run` |
| **Full suite command** | `pnpm -r test --run && pnpm e2e` |
| **Estimated runtime** | ~90s quick; ~6 min full incl. Playwright on staging |

---

## Sampling Rate

- **After every task commit:** Run `pnpm -r test --run` (per-package scope ok)
- **After every plan wave:** Run full suite + redeploy staging + Playwright e2e
- **Before `/gsd-verify-work`:** Full Playwright e2e green on staging (HARD gate 1)
- **Max feedback latency:** 90s quick / 6 min full

---

## Per-Task Verification Map

*Filled out per-plan during planning. The planner emits `<automated>` blocks per task; planner output materializes this table.*

| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| TBD per plan | — | — | — | — | — | — | — | — | ⬜ pending |

---

## Wave 0 Requirements

Existing infrastructure (vitest + Playwright) covers all phase requirements. No new framework install. Wave 0 = none.

Optional Wave 0 additions are materialized inside the relevant execution plans rather than as separate pre-execution stubs:
- `apps/client/src/__test__/nameplate-depth.test.ts` — covered by `06.3-12-PLAN.md`
- `apps/client/src/__test__/player-renderer-respawn.test.ts` — covered by `06.3-16-PLAN.md`
- `e2e/cli-08-collision-extent.spec.ts` — covered by `06.3-09-PLAN.md`
- `e2e/cli-08-dup-login.spec.ts` — covered by `06.3-03-PLAN.md`

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| D-45 nameplate visual offset (10 px gap glyph→head) | REQ-CLI-04 | Sub-pixel visual perception; no programmatic ground truth | Operator visual on staging — compare to legacy BNO screenshot |
| D-45 Plan B flicker absence on remote nameplates | REQ-CLI-04 | Flicker = temporal artifact, not capturable by single-frame assertion | Operator walks uat_b on uat_a's client; watches for vertical flicker |
| D-55 teleport in/out animation perceived correct | REQ-CLI-04 | Animation polish judgment | Operator login → respawn → leave; confirms tween reads correctly |
| D-56 chat box readability | REQ-CLI-07 | Subjective legibility | Operator visual confirm |
| D-57 micro-freeze absent in steady-state walking | REQ-SRV-14 | Cadence-dependent (every few seconds) — hard to gate via assertion | Operator walks uat_a continuously for 60s; no freeze→jump |
| D-58 idle desync absent across two tabs | REQ-SRV-14 | Inter-client comparison, sub-pixel drift over time | Operator stops both players; reads positions from `window.__rebno` on each tab; asserts convergence |
| CLI-08 milestone mp4 capture | REQ-CLI-08 | Video artifact | Operator screen-record two tabs moving + chatting on staging |

---

## GREEN Gate Uplift (Cross-Cutting — from CONTEXT)

### HARD gate 1 — Playwright e2e all GREEN on staging pre-merge
**Currently failing on cycle-4:** `cli-08-local-anim`, `cli-08-floor-collision`, `camera-follow`, `cli-08-camera`, `cli-08-anim`.
**Verification command:** `pnpm e2e -- --grep '(cli-08|camera-follow)'` against staging URL.
**Gate position:** `06.3-VERIFICATION.md` Wave-3 checkbox.

### HARD gate 2 — Operator visual per-fix UAT (Wave-2 boundary)
Each Wave-2 plan ships with a `<manual_uat>` block. Operator visual nod required BEFORE next Wave-2 plan starts.

### HARD gate 3 — E2e assertion-correctness review
`gsd-code-reviewer` scoped to Playwright spec files. Each assertion's expected value MUST cite a canonical-ref. Recommended comment syntax (planner enforces):
```ts
// ref: extracted/client-5-8/objects/0042-player/events/Draw.dnd.json — depth_set call
// ref: CLAUDE.md — tile 44×40 constant
// ref: operator measurement 2026-05-13 — 10 px glyph→head gap
expect(plate.y).toBe(spriteY - spriteHeight - 1);
```

### SOFT gate 4 — Staging redeploy + smoke at Wave-2 boundary
After all Wave-2 fixes merge: redeploy staging + run 5-test smoke (login + room enter + walk + chat + logout). Per-wave-boundary, not per-fix.

---

## Sampling Rate Justification (Nyquist)

Phase 06.3 regression classes:
- **Over-correction** (D-45 cycle-3→cycle-4 overshoot) — sample at unit-test + operator visual.
- **Under-correction** (D-54 left-edge-only block) — sample at e2e four-edge collision spec.
- **Race conditions** (D-51 evict, D-59 font) — sample at Playwright multi-context fixture + boot-gate unit assertion.
- **Idle/steady-state drift** (D-57 micro-freeze, D-58 idle desync) — sample at operator UAT + diagnostic literal read from `window.__rebno`.
- **Visual-only regressions** (D-56 chat readability) — sample at operator visual.

Two-sample minimum per regression class: automated (unit/e2e) + operator UAT. Mirrors the anti-recurrence discipline that cycle-3 `cli-08-nameplate-offset.e2e` PASS but caught nothing.

---

## Validation Sign-Off

### Strategy Readiness

- [x] All tasks have `<automated>` verify or operator UAT step
- [x] Sampling continuity: no 3 consecutive plans without automated verify
- [x] Wave 0 covers all MISSING references through per-plan stubs/tests
- [x] No watch-mode flags
- [x] Feedback latency target documented: <90s for unit/integration; <6 min full
- [x] `nyquist_compliant: true` set in frontmatter

### Execution Gates

- [ ] Playwright e2e GREEN on staging (HARD gate 1)
- [ ] E2e assertion canonical-ref cites verified (HARD gate 3)
- [ ] Operator visual per-fix UAT complete (HARD gate 2)
- [ ] Staging redeploy + smoke complete at W2 boundary (SOFT gate 4)

**Approval:** strategy ready; execution approval pending `06.3-20-PLAN.md`
