---
phase: 23
slug: arrow-ffi-drain-bars
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-27
---

# Phase 23 — Validation Strategy

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

---

## Test Infrastructure

| Property               | Value                                                   |
| ---------------------- | ------------------------------------------------------- |
| **Framework**          | pytest 7.x + cargo nextest                              |
| **Config file**        | `pyproject.toml` / `Cargo.toml`                         |
| **Quick run command**  | `cargo nextest run -p opendeviationbar-streaming --lib` |
| **Full suite command** | `mise run test && mise run test-py`                     |
| **Estimated runtime**  | ~30 seconds                                             |

---

## Sampling Rate

- **After every task commit:** Run `cargo nextest run -p opendeviationbar-streaming --lib`
- **After every plan wave:** Run `mise run test && mise run test-py`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 30 seconds

---

## Per-Task Verification Map

| Task ID  | Plan | Wave | Requirement | Test Type   | Automated Command                                                  | File Exists | Status     |
| -------- | ---- | ---- | ----------- | ----------- | ------------------------------------------------------------------ | ----------- | ---------- |
| 23-01-01 | 01   | 1    | ARROW-01    | unit        | `cargo nextest run -p opendeviationbar-streaming drain_bars_arrow` | ❌ W0       | ⬜ pending |
| 23-01-02 | 01   | 1    | ARROW-02    | integration | `python -c "from opendeviationbar.sidecar import ..."`             | ❌ W0       | ⬜ pending |
| 23-01-03 | 01   | 1    | ARROW-03    | benchmark   | `python scripts/measure_drain_rss.py`                              | ❌ W0       | ⬜ pending |

_Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky_

---

## Wave 0 Requirements

- [ ] Rust unit test for `drain_bars_arrow()` RecordBatch schema validation
- [ ] Python integration test for Polars zero-copy slicing from Arrow RecordBatch
- [ ] RSS measurement script for 200K-bar drain validation

_Existing infrastructure covers framework and fixtures._

---

## Manual-Only Verifications

| Behavior                   | Requirement | Why Manual                              | Test Instructions                                                  |
| -------------------------- | ----------- | --------------------------------------- | ------------------------------------------------------------------ |
| Peak RSS < 2.5G under load | ARROW-03    | Requires sidecar running with live data | Run sidecar, trigger 200K-bar drain, check /proc/self/status VmRSS |

---

## 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
