4.2 KiB
4.2 KiB
| phase | slug | status | nyquist_compliant | wave_0_complete | created |
|---|---|---|---|---|---|
| 8 | bg-00000-text-000000 | ready | true | true | 2026-04-23 |
Phase 8 — Validation Strategy
Per-phase validation contract for feedback sampling during execution.
Test Infrastructure
| Property | Value |
|---|---|
| Framework | Playwright E2E + color guard script (node) |
| Config file | frontend/playwright.config.ts |
| Quick run command | pnpm --dir frontend run guard:colors |
| Full suite command | pnpm --dir frontend run lint && pnpm --dir frontend run typecheck && pnpm --dir frontend run test:e2e -- theme-colors.spec.ts |
| Estimated runtime | ~2-6 min(取决于 E2E 环境与线程数据) |
Sampling Rate
- After every task commit: Run
pnpm --dir frontend run guard:colors - After every plan wave: Run
pnpm --dir frontend run lint && pnpm --dir frontend run typecheck && pnpm --dir frontend run test:e2e -- theme-colors.spec.ts - Before
/gsd-verify-work 8: Full suite must be green - Max feedback latency: 6 min(本 phase)
Command Matrix
| Mode | Command | Goal |
|---|---|---|
| quick | pnpm --dir frontend run guard:colors |
快速阻断新增硬编码颜色回归(P8-03) |
| full | pnpm --dir frontend run lint && pnpm --dir frontend run typecheck && pnpm --dir frontend run test:e2e -- theme-colors.spec.ts |
Phase 8 完整验证链(静态检查 + 主题 E2E,覆盖 P8-04) |
Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---|---|---|---|---|---|---|---|---|---|
| 8-01-01 | 01 | 1 | P8-02 | T-08-02, T-08-03 | token 注册表与 :root/.dark/@theme 双向覆盖、唯一性可审计 |
static | node -e "import('./frontend/src/styles/workspace-color-tokens.ts').then(m=>{const t=m.WORKSPACE_COLOR_TOKENS;const vals=Object.values(t).map(x=>x.light.toLowerCase());if(new Set(vals).size!==vals.length) throw new Error('duplicate light color mapping');console.log('ok')})" |
✅ | ✅ green |
| 8-01-02 | 01 | 1 | P8-03 | T-08-01 | 新增 #hex / arbitrary color 回归可被守卫阻断 |
static | pnpm --dir frontend run guard:colors |
✅ | ✅ green |
| 8-02-01 | 02 | 2 | P8-01 | T-08-05, T-08-06 | thread/layout/header 从硬编码迁移到 token,保证 light/dark 可见性 | static | pnpm --dir frontend run guard:colors |
✅ | ✅ green |
| 8-02-02 | 02 | 2 | P8-01 | T-08-04 | input/suggestion/streaming 颜色迁移后保持 lint/typecheck 通过 | static | pnpm --dir frontend run lint && pnpm --dir frontend run typecheck |
✅ | ✅ green |
| 8-03-01 | 03 | 2 | P8-01 | T-08-07, T-08-08 | artifact list/detail 无硬编码色值回归 | static | pnpm --dir frontend run guard:colors |
✅ | ✅ green |
| 8-03-02 | 03 | 2 | P8-01 | T-08-09 | artifact 预览区内联变量迁移后类型与 lint 保持稳定 | static | pnpm --dir frontend run lint && pnpm --dir frontend run typecheck |
✅ | ✅ green |
| 8-04-01 | 04 | 3 | P8-04 | T-08-11, T-08-12 | E2E 覆盖 light/dark 关键交互并仅通过 html class 切换主题 |
e2e | pnpm --dir frontend exec playwright test --list tests/e2e/theme-colors.spec.ts |
✅ | ✅ green |
| 8-04-02 | 04 | 3 | P8-03, P8-04 | T-08-10 | 验证文档命令可复制执行且无占位符残留 | static | `rg -n "\{quick command\} | \{full command\} | REQ-\{XX\}" .planning/phases/08-bg-00000-text-000000/08-VALIDATION.md && echo "unexpected placeholders found" && exit 1 |
Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky
Wave 0 Requirements
Existing infrastructure covers all phase requirements.
Manual-Only Verifications
All phase behaviors have automated verification.
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 < 8s
nyquist_compliant: trueset in frontmatter
Approval: approved 2026-04-23