docs(15): add validation strategy
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
---
|
||||
phase: 15
|
||||
slug: output-compat
|
||||
status: draft
|
||||
nyquist_compliant: false
|
||||
wave_0_complete: false
|
||||
created: 2026-03-23
|
||||
---
|
||||
|
||||
# Phase 15 — Validation Strategy
|
||||
|
||||
> Per-phase validation contract for feedback sampling during execution.
|
||||
|
||||
---
|
||||
|
||||
## Test Infrastructure
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Framework** | pytest 7.x |
|
||||
| **Config file** | pyproject.toml (existing) |
|
||||
| **Quick run command** | `pytest tests/ -v --tb=short -k "test_"` |
|
||||
| **Full suite command** | `pytest tests/ -v` |
|
||||
| **Estimated runtime** | ~30 seconds |
|
||||
|
||||
---
|
||||
|
||||
## Sampling Rate
|
||||
|
||||
- **After every task commit:** Run `pytest tests/ -v --tb=short -k "test_"`
|
||||
- **After every plan wave:** Run `pytest tests/ -v`
|
||||
- **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 |
|
||||
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
|
||||
| 15-01-01 | 01 | 1 | CONFIG-01 | unit | `pytest tests/test_config.py -v -k "test_enable_semantic_segmentation"` | ❌ W0 | ⬜ pending |
|
||||
| 15-01-02 | 01 | 1 | CONFIG-01 | unit | `pytest tests/test_config.py -v -k "test_default_value"` | ❌ W0 | ⬜ pending |
|
||||
| 15-02-01 | 02 | 1 | CONFIG-01, CONFIG-02 | integration | `pytest tests/test_srt_processor.py -v -k "test_config_integration"` | ❌ W0 | ⬜ pending |
|
||||
| 15-02-02 | 02 | 1 | OUTPUT-01, OUTPUT-02 | integration | `pytest tests/test_srt_processor.py -v -k "test_output_format"` | ❌ W0 | ⬜ pending |
|
||||
| 15-03-01 | 03 | 1 | CONFIG-03 | integration | `pytest tests/test_integration.py -v -k "test_zhihu_unaffected"` | ✅ existing | ⬜ pending |
|
||||
| 15-03-02 | 03 | 1 | CONFIG-02 | integration | `pytest tests/test_backward_compat.py -v -k "test_rule_based_unchanged"` | ❌ W0 | ⬜ pending |
|
||||
|
||||
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
|
||||
|
||||
---
|
||||
|
||||
## Wave 0 Requirements
|
||||
|
||||
- [ ] `tests/test_config.py` — stubs for CONFIG-01 (KBSettings.enable_semantic_segmentation field)
|
||||
- [ ] `tests/test_srt_processor.py` — stubs for OUTPUT-01, OUTPUT-02 (output format verification)
|
||||
- [ ] `tests/test_backward_compat.py` — stubs for CONFIG-02 (backward compatibility)
|
||||
- [ ] `tests/conftest.py` — shared fixtures for config loading and temporary env vars
|
||||
- [ ] pytest framework already installed (existing)
|
||||
|
||||
---
|
||||
|
||||
## Manual-Only Verifications
|
||||
|
||||
| Behavior | Requirement | Why Manual | Test Instructions |
|
||||
|----------|-------------|------------|-------------------|
|
||||
| Output markdown visual inspection | OUTPUT-01, OUTPUT-02 | Human judgement on formatting quality | Generate sample output with both semantic and rule-based segmentation, verify H2 titles and spacing |
|
||||
| YAML config file editing | CONFIG-01 | Requires manual file edit | Add KB_ENABLE_SEMANTIC_SEGMENTATION to ~/.kb_env, reload and verify |
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
Reference in New Issue
Block a user