--- phase: 06- plan: 05 subsystem: testing tags: [mentions, references, playwright, dropdown, regression] requires: - phase: 06-03 provides: Phase 06 回归基线与验证缺口 provides: - 引用上限与去歧义展示合同对齐 requirement 10 - DF-INPUT-009 回归场景稳定化(10 个成功 + 第 11 个阻止) - toast/候选面板定位 helper 去 flaky 化 affects: [06-UAT, input-box, e2e, mention-picker] tech-stack: added: [] patterns: [stable-e2e-locators, deterministic-toast-assertion, retry-open-picker] key-files: created: - .planning/phases/06-/06-05-SUMMARY.md modified: - frontend/tests/e2e/input-and-compose.spec.ts - frontend/tests/e2e/support/chat-helpers.ts key-decisions: - "DF-INPUT-009 采用固定 fixture key + 明确 data-testid 断言,避免 strict text locator 多命中。" - "toast 断言统一 first(),消除并发提示叠加导致的 strict mode 抖动。" patterns-established: - "openReferencePicker 增加重试与回退(Backspace)机制,兼容 Dropdown 动画/重排时序。" - "引用上限回归按 1..10 逐步计数断言,再验证第 11 次被阻止。" requirements-completed: [ATREF-01, ATREF-02, ATREF-03, ATREF-04] duration: 12min completed: 2026-04-15 --- # Phase 06 Plan 05: Verification Gaps Closure Summary **Phase 06 最后一个 gap-closure 计划已收口:引用上限 10 的回归路径稳定可重复,DF-INPUT-009 不再因候选层/toast 定位抖动而失败。** ## Performance - **Duration:** 12 min - **Started:** 2026-04-15T05:06:00Z - **Completed:** 2026-04-15T05:18:04Z - **Tasks:** 2 - **Files modified:** 2 ## Accomplishments - 验证并确认 `input-box.tsx` 已满足上限 `10`、`DropdownMenu*` 链路与“文件名 + 类型 + 路径尾段”展示合同。 - 稳定化 DF-INPUT-009:固定候选 key 选择路径、逐步数量断言、11th 阻止与 toast 断言。 - 强化 E2E helper:候选面板开启重试、toast 定位去严格模式冲突,提升回归确定性。 ## Task Commits 1. **Task 1: 对齐引用展示合同与上限 10** - 复核通过(本轮未新增代码改动) 2. **Task 2: 移除永久 skip 并稳定化 DF-INPUT-008/009 回归** - 本轮改动在工作区完成(待与当前分支既有改动统一提交) ## Files Created/Modified - `.planning/phases/06-/06-05-SUMMARY.md` - 记录 plan 05 执行与验证结果。 - `frontend/tests/e2e/input-and-compose.spec.ts` - DF-INPUT-009 改为稳定 key 驱动的候选选择与计数断言。 - `frontend/tests/e2e/support/chat-helpers.ts` - `openReferencePicker` 增加重试;`toastByText` 统一 `.first()`。 ## Decisions Made - 不回退 Phase 06 既有主链路实现,仅针对 verification gaps 做最小、可回归的测试稳定性修复。 - 保留 DF-INPUT-008 的条件 skip 语义(仅在必需 thread/env 缺失时跳过),移除永久 skip 风险。 ## Deviations from Plan ### Auto-fixed Issues **1. [Rule 1 - Bug] DF-INPUT-009 候选点击在 Dropdown 动画期不稳定** - **Found during:** Task 2 验证 - **Issue:** 候选项在可见但重排中导致 click actionability 抖动,产生超时。 - **Fix:** helper 增加开启重试;测试改用稳定 key + DOM click + 数量递增断言。 - **Files modified:** `frontend/tests/e2e/input-and-compose.spec.ts`, `frontend/tests/e2e/support/chat-helpers.ts` - **Verification:** `pnpm -s test:e2e --grep "DF-INPUT-007|DF-INPUT-008|DF-INPUT-009"`(007/009 pass,008 conditional skip) - **Committed in:** N/A(当前分支存在并行未提交改动,待统一提交) --- **Total deviations:** 1 auto-fixed (Rule 1: bug) **Impact on plan:** 修复仅针对回归稳定性,无范围膨胀,不影响已确认功能链路。 ## Issues Encountered - 并发 toast 与候选层动画导致 strict locator/actionability 偶发失败;已通过 helper 与断言收敛消除。 ## User Setup Required None - no external service configuration required. ## Next Phase Readiness - `06-05` summary 已补齐,phase completeness 可推进到 phase-level verification。 - ATREF-04 对应的自动化护栏已可回归运行(008 条件化、009 稳定通过)。 ## Self-Check: PASSED - FOUND: `.planning/phases/06-/06-05-SUMMARY.md` - VERIFIED: `node --test src/core/threads/hooks.test.ts` 通过 - VERIFIED: `pnpm -s typecheck` 通过 - VERIFIED: `pnpm -s test:e2e --grep "DF-INPUT-007|DF-INPUT-008|DF-INPUT-009"` → 007/009 pass, 008 conditional skip