diff --git a/.planning/phases/11-stealth-fingerprinting/11-VALIDATION.md b/.planning/phases/11-stealth-fingerprinting/11-VALIDATION.md new file mode 100644 index 0000000..687103d --- /dev/null +++ b/.planning/phases/11-stealth-fingerprinting/11-VALIDATION.md @@ -0,0 +1,77 @@ +--- +phase: 11 +slug: stealth-fingerprinting +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-18 +--- + +# Phase 11 — 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/test_crawler/ -x -v` | +| **Full suite command** | `pytest tests/ -v` | +| **Estimated runtime** | ~30 seconds | + +--- + +## Sampling Rate + +- **After every task commit:** Run `pytest tests/test_crawler/ -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 | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 11-01-01 | 01 | 1 | STEALTH-01 | unit | `pytest tests/test_crawler/test_stealth.py::test_navigator_webdriver_hidden -x` | ❌ W0 | ⬜ pending | +| 11-01-02 | 01 | 1 | STEALTH-02 | unit | `pytest tests/test_crawler/test_stealth.py::test_playwright_properties_removed -x` | ❌ W0 | ⬜ pending | +| 11-01-03 | 01 | 1 | STEALTH-03 | unit | `pytest tests/test_crawler/test_stealth.py::test_chrome_properties_mocked -x` | ❌ W0 | ⬜ pending | +| 11-01-04 | 01 | 1 | STEALTH-04 | unit | `pytest tests/test_crawler/test_stealth.py::test_user_agent_modified -x` | ❌ W0 | ⬜ pending | +| 11-02-01 | 02 | 1 | VERIFY-01 | integration | `pytest tests/test_crawler/test_zhihu_crawler_stealth.py::test_crawl_answer_with_stealth -x` | ❌ W0 | ⬜ pending | +| 11-02-02 | 02 | 1 | VERIFY-02 | regression | `pytest tests/test_crawler/ -v` | ✅ Existing | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `tests/test_crawler/test_stealth.py` — stubs for STEALTH-01, STEALTH-02, STEALTH-03, STEALTH-04 +- [ ] `tests/test_crawler/test_zhihu_crawler_stealth.py` — integration test for VERIFY-01 +- [ ] `tests/test_crawler/conftest.py` — add `stealth_config` fixture + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| 知乎 40362 错误消失 | VERIFY-01 | 需要真实网络环境 | 1. 运行 `python -m kb_workflow.crawler.zhihu_crawler` 访问问答页面 2. 确认无 40362 错误 | + +--- + +## 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