---
phase: 5
slug: artifact-pipeline
status: complete
nyquist_compliant: true
wave_0_complete: true
created: 2026-03-24
---

# Phase 5 — Validation Strategy

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

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | pytest 8.x (with pytest-asyncio) |
| **Config file** | pyproject.toml |
| **Quick run command** | `.venv/bin/pytest tests/test_artifact_registry.py tests/test_artifact_sync.py tests/test_artifact_install.py -x -q` |
| **Full suite command** | `.venv/bin/pytest tests/ -q` |
| **Estimated runtime** | ~8 seconds |

---

## Sampling Rate

- **After every task commit:** Run `.venv/bin/pytest tests/test_artifact_registry.py tests/test_artifact_sync.py tests/test_artifact_install.py -x -q`
- **After every plan wave:** Run `.venv/bin/pytest tests/ -q`
- **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 |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 05-01-01 | 01 | 1 | ART-01 | unit | `.venv/bin/pytest tests/test_artifact_registry.py -k "register" -x -q` | ✅ | ✅ green |
| 05-01-02 | 01 | 1 | ART-04 | unit | `.venv/bin/pytest tests/test_artifact_registry.py -k "list" -x -q` | ✅ | ✅ green |
| 05-01-03 | 01 | 1 | ART-05 | unit | `.venv/bin/pytest tests/test_artifact_registry.py -k "diff" -x -q` | ✅ | ✅ green |
| 05-02-01 | 02 | 1 | ART-02 | unit | `.venv/bin/pytest tests/test_artifact_sync.py -x -q` | ✅ | ✅ green |
| 05-03-01 | 03 | 1 | ART-03 | unit | `.venv/bin/pytest tests/test_artifact_install.py -x -q` | ✅ | ✅ green |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

Existing infrastructure covers all phase requirements.

---

## Manual-Only Verifications

All phase behaviors have automated verification.

---

## Requirement Coverage

| Requirement | Description | Covered By | Test Names |
|-------------|-------------|------------|------------|
| ART-01 | Register local build tree as content-addressed artifact (sha256); atomic write; immediately visible in artifact_list | tests/test_artifact_registry.py | `test_hash_tree_same_content_same_hash`, `test_hash_tree_different_content_different_hash`, `test_hash_tree_excludes_pycache`, `test_save_atomic_write`, `test_register_returns_build_artifact`, `test_register_iso8601_timestamp`, `test_register_scans_ko_modules`, `test_register_scans_elf_bins`, `test_register_dedup_same_tree`, `test_register_autodetects_kernel_version` |
| ART-02 | Sync registered artifact to cluster nodes via rsync; skip nodes where artifact hash already matches | tests/test_artifact_sync.py | `test_sync_node_skips_when_dir_exists_no_force`, `test_sync_node_rsync_when_dir_not_exists`, `test_sync_node_rsync_when_force_even_if_dir_exists`, `test_sync_node_reports_rsync_failure`, `test_sync_node_rsync_command_includes_correct_flags`, `test_sync_all_fans_out_across_all_nodes`, `test_sync_all_per_node_failure_does_not_abort_others`, `test_sync_all_exception_in_node_returns_error_result` |
| ART-03 | Install synced artifact on nodes using modprobe_path, make_install, rpm, or deb modes | tests/test_artifact_install.py | `test_modprobe_path_creates_correct_ssh_command`, `test_modprobe_path_returns_installed_module_paths`, `test_make_install_runs_correct_command`, `test_rpm_mode_runs_correct_command`, `test_deb_mode_runs_correct_command`, `test_install_all_fans_out_to_all_nodes`, `test_install_all_per_node_failure_does_not_abort_others` |
| ART-04 | List all registered artifacts | tests/test_artifact_registry.py | `test_list_artifacts_empty`, `test_list_artifacts_returns_all` |
| ART-05 | Diff two artifacts to see which .ko files and binaries changed | tests/test_artifact_registry.py | `test_diff_returns_artifact_diff`, `test_diff_unchanged_artifacts`, `test_diff_unknown_artifact_id` |

---

## 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 < 15s
- [x] `nyquist_compliant: true` set in frontmatter

**Approval:** approved 2026-03-24
