---
phase: 19.1
slug: lookupmodal-dual-mode-parent-product-adds-and-serial-unit-picks
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-04-07
---

# Phase 19.1 — Validation Strategy

> Per-phase validation contract for feedback sampling during execution.

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | Rust built-in test framework (`cargo test`) |
| **Config file** | none — `#[cfg(test)]` modules inline in source files |
| **Quick run command** | `cargo test -p app 2>&1` |
| **Full suite command** | `cargo test --workspace 2>&1` |
| **Estimated runtime** | ~15 seconds |

---

## Sampling Rate

- **After every task commit:** Run `cargo test -p app 2>&1`
- **After every plan wave:** Run `cargo test --workspace 2>&1`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 15 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 19.1-01-01 | 01 | 1 | D-09/D-10 | unit | `cargo test -p app -- search_matches 2>&1` | ✅ | ⬜ pending |
| 19.1-01-02 | 01 | 1 | D-09 | unit | `cargo test -p app -- search_matches_serial 2>&1` | ✅ | ⬜ pending |
| 19.1-01-03 | 01 | 1 | D-11 | unit | `cargo test -p app -- lookup_match_count 2>&1` | ❌ W0 | ⬜ pending |
| 19.1-01-04 | 01 | 1 | D-14 | unit | `cargo test -p app -- lookup_parent_visible 2>&1` | ❌ W0 | ⬜ pending |
| 19.1-02-01 | 02 | 2 | D-15/D-17 | unit | `cargo test -p app -- create_unit_confirmed 2>&1` | ❌ W0 | ⬜ pending |
| 19.1-03-01 | 03 | 3 | UI tree | manual | N/A — cargo test cannot test Slint rendering | N/A | ⬜ pending |
| 19.1-03-02 | 03 | 3 | D-20 | manual | N/A | N/A | ⬜ pending |
| 19.1-03-03 | 03 | 3 | D-04/D-08 | manual | N/A | N/A | ⬜ pending |
| 19.1-04-01 | 04 | 3 | smoke | smoke | `cargo build --features bugsweeper 2>&1` + HTTP probe | ✅ | ⬜ pending |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

- [ ] Unit tests for dual-search filtering logic (match-count, name-matches-search, per-unit matches-search bool) — in `crates/app/src/dashboard/discovery.rs` test module or new `lookup.rs` module under `dashboard/`
- [ ] Unit test for inline SN creation with user-provided serial ID

*Existing `filter_cards_by_search` and serial search tests in `discovery.rs` cover baseline; new tests needed for lookup-specific match-count and visibility logic.*

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Slint UI tree renders hierarchical product-unit list | D-01 | cargo test cannot test Slint rendering | Open modal, verify products show with chevrons, expand to see units |
| Reassignment prompt appears on assigned unit [+] click | D-20 | Visual + interactive flow | Click [+] on assigned unit, verify warning prompt appears with "Move it" / "Keep Here" |
| Single product expand/collapse at a time | D-04/D-08 | Visual state management | Expand product A, then expand product B — verify A collapses |
| Match count pill appears on parent with matching units | D-11 | Visual rendering | Search for a serial number, verify parent shows "N matches" pill |
| Inline SN creation focus and flow | D-16/D-17 | Interactive focus behavior | Click "Create New Unit", verify textbox appears focused, type SN, press Enter |

---

## 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 < 15s
- [ ] `nyquist_compliant: true` set in frontmatter

**Approval:** pending
