ReadViewSDK/.planning/phases/08-pagination-quality-cache-performance/08-VALIDATION.md

78 lines
2.9 KiB
Markdown

---
phase: 8
slug: pagination-quality-cache-performance
status: draft
nyquist_compliant: true
wave_0_complete: true
created: 2026-05-23
---
# Phase 8 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | XCTest (ReadViewSDKDemoTests / ReadViewSDKDemoUITests) |
| **Config file** | ReadViewDemo/ReadViewDemo.xcodeproj |
| **Quick run command** | `xcodebuild test -scheme ReadViewDemo -destination 'platform=iOS Simulator,name=iPhone 17' -only-testing:ReadViewSDKDemoTests` |
| **Full suite command** | `xcodebuild test -scheme ReadViewDemo -destination 'platform=iOS Simulator,name=iPhone 17'` |
| **Estimated runtime** | ~60 seconds |
---
## Sampling Rate
- **After every task commit:** Build succeeds (`xcodebuild build -scheme ReadViewDemo`)
- **After every plan wave:** Run quick test suite + runtime diagnostic log check
- **Before `/gsd:verify-work`:** Full suite green + runtime diagnostic evidence
- **Max feedback latency:** 120 seconds
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Automated Command | Status |
|---------|------|------|-------------|-------------------|--------|
| 08-01-01 | 01 | 1 | QUAL-01 | build succeeds + cache hit/miss log | ✅ green |
| 08-01-02 | 01 | 1 | QUAL-01 | build succeeds + cache invalidation log | ✅ green |
| 08-02-01 | 02 | 1 | QUAL-02 | build succeeds + pagination diagnostic log | ✅ green |
| 08-02-02 | 02 | 1 | QUAL-03 | build succeeds + attachment diagnostic log | ✅ green |
| 08-03-01 | 03 | 2 | QUAL-04 | build succeeds + timing diagnostic log | ✅ green |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- Existing `ReadViewSDKDemoTests` covers parser / resolver / persistence
- No new test infrastructure needed — runtime diagnostic logs serve as evidence
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| 缓存命中后不再重复排版 | QUAL-01 | 需要对比前后分页结果一致性 | 打开同一本书两次,检查第二次的日志无渲染耗时 |
| 复杂图文章节分页改善 | QUAL-02 | 需要视觉对比 | 用宝山辽墓样书,对比改善前后分页结果 |
| 图片不跨页、居中显示 | QUAL-03 | 需要视觉验证 | 检查含大图章节,确认图片在单页内居中 |
| 首屏时间不退化 | QUAL-04 | 需要实际设备计时 | 对比改善前后打开书籍的首屏时间 |
---
## Validation Sign-Off
- [x] All tasks have build-success verification
- [x] Runtime diagnostic logs captured for cache, pagination quality, and timing
- [ ] Manual verification completed for visual/behavioral checks
- [x] Wave 0: existing test infrastructure sufficient
- [x] Feedback latency < 120s
**Approval:** code-complete, manual verification pending