--- phase: 6 slug: code-consolidation status: draft nyquist_compliant: false wave_0_complete: false created: 2026-03-16 --- # Phase 6 — Validation Strategy > Per-phase validation contract for feedback sampling during execution. --- ## Test Infrastructure | Property | Value | |----------|-------| | **Framework** | pytest | | **Config file** | pytest.ini (pythonpath = ., testpaths = tests) | | **Quick run command** | `pytest tests/ -v --tb=short -x` | | **Full suite command** | `pytest tests/ -v` | | **Estimated runtime** | ~30 seconds | --- ## Sampling Rate - **After every task commit:** Run `pytest tests/ -v --tb=short -x` - **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 | |---------|------|------|-------------|-----------|-------------------|-------------|--------| | 06-01-01 | 01 | 1 | MET-01 | import | `python -c "from kb_workflow.metadata.bilibili_extractor import BilibiliExtractor"` | ❌ W0 | ⬜ pending | | 06-01-02 | 01 | 1 | MET-02 | import | `python -c "from kb_workflow.metadata.zhihu_extractor import ZhihuPlaywrightExtractor"` | ❌ W0 | ⬜ pending | | 06-01-03 | 01 | 1 | MET-05 | unit | `pytest tests/ -v --tb=short -x` | ✅ exists | ⬜ pending | | 06-02-01 | 02 | 2 | PIP-01 | import | `python -c "from kb_workflow.pipeline import Pipeline"` | ❌ W0 | ⬜ pending | | 06-02-02 | 02 | 2 | PIP-02 | unit | `pytest tests/test_pipeline/ tests/test_processors/ -v` | ✅ exists | ⬜ pending | | 06-02-03 | 02 | 2 | PIP-04 | integration | `python kb-workflow/kb_workflow.py --help` | N/A | ⬜ pending | *Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* --- ## Wave 0 Requirements - [ ] `tests/test_imports.py` — stubs for MET-01, MET-02, PIP-01 import verification - [ ] Import test cases: - `test_import_metadata_bilibili()`: 验证 bilibili_extractor 可导入 - `test_import_metadata_zhihu()`: 验证 zhihu_extractor 可导入 - `test_import_pipeline_core()`: 验证 pipeline 核心模块可导入 - `test_import_pipeline_processors()`: 验证所有 processors 可导入 - `test_import_pipeline_platforms()`: 验证所有 platforms 可导入 --- ## Manual-Only Verifications | Behavior | Requirement | Why Manual | Test Instructions | |----------|-------------|------------|-------------------| | CLI 完整功能测试 | PIP-04 | 需要 B站/知乎 Cookie 环境 | `python kb-workflow/kb_workflow.py process "https://www.bilibili.com/video/BVxxx"` | --- ## Validation Sign-Off - [ ] All tasks have `` 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