---
phase: 6
slug: kernel-observability
status: complete
nyquist_compliant: true
wave_0_complete: true
created: 2026-03-24
---

# Phase 6 — 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_dmesg_mark.py tests/test_dmesg_collect.py tests/test_classifier.py -x -q` |
| **Full suite command** | `.venv/bin/pytest tests/ -q` |
| **Estimated runtime** | ~6 seconds |

---

## Sampling Rate

- **After every task commit:** Run `.venv/bin/pytest tests/test_dmesg_mark.py tests/test_dmesg_collect.py tests/test_classifier.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:** 10 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 06-01-01 | 01 | 1 | OBS-01 | unit | `.venv/bin/pytest tests/test_dmesg_mark.py -x -q` | ✅ | ✅ green |
| 06-01-02 | 01 | 1 | OBS-03 | unit | `.venv/bin/pytest tests/test_classifier.py -x -q` | ✅ | ✅ green |
| 06-02-01 | 02 | 1 | OBS-02 | unit | `.venv/bin/pytest tests/test_dmesg_collect.py -x -q` | ✅ | ✅ green |
| 06-02-02 | 02 | 1 | OBS-03 | unit | `.venv/bin/pytest tests/test_dmesg_collect.py::test_collect_classification_applied tests/test_classifier.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 |
|-------------|-------------|------------|------------|
| OBS-01 | Insert timestamped dmesg marker on nodes before an operation; marker appears in subsequent dmesg_collect output | tests/test_dmesg_mark.py | `test_dmesg_mark_all_nodes_returns_success`, `test_dmesg_mark_all_nodes_same_marker`, `test_dmesg_mark_marker_starts_with_prefix`, `test_dmesg_mark_ssh_command_writes_to_kmsg`, `test_dmesg_mark_single_node_subset`, `test_dmesg_mark_invalid_node_name`, `test_dmesg_mark_ssh_failure_one_node_best_effort`, `test_dmesg_mark_all_nodes_fail`, `test_dmesg_mark_unique_marker_per_call` |
| OBS-02 | Collect structured dmesg output since a named marker, filtered by log level | tests/test_dmesg_collect.py | `test_collect_basic_parses_lines`, `test_collect_marker_filters_before_marker`, `test_collect_marker_not_found_returns_empty`, `test_collect_filter_level_warn_plus`, `test_collect_filter_level_err_plus`, `test_collect_filter_level_all_includes_everything`, `test_collect_result_summary_fields`, `test_tool_dmesg_collect_returns_per_node_dict`, `test_tool_dmesg_collect_single_node_subset`, `test_tool_dmesg_collect_passes_since_marker`, `test_tool_dmesg_collect_invalid_filter_level` |
| OBS-03 | Classified dmesg result includes typed events: oops, kernel panics, KASAN, UBSAN, WARNING | tests/test_classifier.py, tests/test_dmesg_collect.py | `test_classify_panic`, `test_classify_oops`, `test_classify_kasan`, `test_classify_ubsan`, `test_classify_warn`, `test_classify_normal`, `test_classify_panic_wins_over_warn`, `test_classify_oops_wins_over_kasan`, `test_parse_raw_kern_info`, `test_parse_raw_kern_warning`, `test_parse_classification_applied`; `test_collect_classification_applied` |

---

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

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