mirror of
https://github.com/motajs/template.git
synced 2026-09-16 12:18:50 +08:00
docs(02-05): complete full-suite gate plan
This commit is contained in:
parent
154df6a069
commit
97a559cdf8
@ -80,7 +80,7 @@ Plans:
|
||||
2. 移动端点击地图上的可达格时,角色自动寻路移动到该格
|
||||
3. 寻路正确避开不可通行格(碰撞/障碍/墙体)
|
||||
|
||||
**Plans**: 4/5 plans executed
|
||||
**Plans**: 5/5 plans executed
|
||||
**UI hint**: yes
|
||||
Plans:
|
||||
|
||||
@ -89,7 +89,7 @@ Plans:
|
||||
- [x] 02-03-PLAN.md — L3 接线(逐步/瞬移/回退默认策略/D-08 双语义/打断接管)+ barrel/logger 装配 + 阶段门禁
|
||||
|
||||
- [x] 02-04-PLAN.md — 恢复用户授权的 path/types.ts 契约并收口 moverImpl TS18047
|
||||
- [ ] 02-05-PLAN.md — 稳定全量 Vitest 门禁并提供非 watch 测试命令
|
||||
- [x] 02-05-PLAN.md — 稳定全量 Vitest 门禁并提供非 watch 测试命令
|
||||
|
||||
**Wave 1**
|
||||
|
||||
@ -106,7 +106,7 @@ Plans:
|
||||
### Wave 4 *(gap closure; blocked on Wave 3 completion)*
|
||||
|
||||
- [x] 02-04-PLAN.md — 用户契约范围与阶段类型错误收口
|
||||
- [ ] 02-05-PLAN.md — 全套件超时与跳过测试门禁收口
|
||||
- [x] 02-05-PLAN.md — 全套件超时与跳过测试门禁收口
|
||||
|
||||
### Phase 3: 数据端完成
|
||||
|
||||
@ -173,7 +173,7 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6
|
||||
| Phase | Plans Complete | Status | Completed |
|
||||
|-------|----------------|--------|-----------|
|
||||
| 1. 事件系统 | 13/13 | In Progress| |
|
||||
| 2. 寻路系统 | 4/5 | In Progress| |
|
||||
| 2. 寻路系统 | 5/5 | In Progress| |
|
||||
| 3. 数据端完成 | 0/TBD | Not started | - |
|
||||
| 4. 渲染适配与双布局 | 0/TBD | Not started | - |
|
||||
| 5. Legacy 移植 | 0/TBD | Not started | - |
|
||||
|
||||
@ -4,16 +4,16 @@ milestone: v1.0
|
||||
current_phase: 02
|
||||
current_phase_name: 寻路系统
|
||||
status: verifying
|
||||
stopped_at: Completed 02-04-PLAN.md
|
||||
last_updated: "2026-09-10T01:41:42.684Z"
|
||||
stopped_at: Completed 02-05-PLAN.md
|
||||
last_updated: "2026-09-10T01:49:11.198Z"
|
||||
last_activity: 2026-09-09
|
||||
last_activity_desc: Phase 02 execution started
|
||||
state_head: 93453db41702d3d14d2cc69c992bfb92fee48eee
|
||||
state_head: 154df6a0697b0ecf1b4b96b2a151aa9e00094964
|
||||
progress:
|
||||
total_phases: 6
|
||||
completed_phases: 0
|
||||
total_plans: 18
|
||||
completed_plans: 17
|
||||
completed_plans: 18
|
||||
milestone_name: milestone
|
||||
---
|
||||
|
||||
@ -73,6 +73,7 @@ Progress: [█████████░] 92%
|
||||
| Phase 02 P02 | 29min | 3 tasks | 10 files |
|
||||
| Phase 02 P03 | 30 min | 4 tasks | 9 files |
|
||||
| Phase 02 P04 | 10 min | 2 tasks | 7 files |
|
||||
| Phase 02 P05 | 5min | 2 tasks | 2 files |
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
@ -118,6 +119,9 @@ Recent decisions affecting current work:
|
||||
- [Phase 02]: D-07 remains authoritative: path/types.ts matches the user baseline except for the two authorized nullable returns; graph helper contracts stay implementation-owned.
|
||||
- [Phase 02]: The concrete useMover bridge remains in PathfindingSystem so HeroPathfinding can bind IObjectMover without expanding the user-authored interface.
|
||||
- [Phase 02]: D-11 remains intact: this plan modifies no client click adapter or Phase 1 file.
|
||||
- [Phase 02]: Phase 02 Plan 05 sets Vitest testTimeout and hookTimeout to 30 seconds to cover full-suite beforeAll import cost.
|
||||
- [Phase 02]: Phase 02 Plan 05 adds deterministic pnpm test:ci while preserving interactive pnpm test.
|
||||
- [Phase 02]: Phase 02 Plan 05 preserves D-11 by modifying no client click adapter or Phase 1 file.
|
||||
|
||||
### Pending Todos
|
||||
|
||||
@ -140,6 +144,6 @@ None yet.
|
||||
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-09-10T01:41:42.588Z
|
||||
Stopped at: Completed 02-04-PLAN.md
|
||||
Last session: 2026-09-10T01:49:11.100Z
|
||||
Stopped at: Completed 02-05-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
151
.planning/phases/02-pathfinding/02-05-SUMMARY.md
Normal file
151
.planning/phases/02-pathfinding/02-05-SUMMARY.md
Normal file
@ -0,0 +1,151 @@
|
||||
---
|
||||
phase: 02-pathfinding
|
||||
plan: 05
|
||||
subsystem: testing
|
||||
tags: [vitest, vite, pathfinding, quality-gate]
|
||||
|
||||
# Dependency graph
|
||||
requires:
|
||||
- phase: 02-pathfinding (plan 04)
|
||||
provides: baseline-faithful pathfinding contract and nullable-safe movement event sources
|
||||
provides:
|
||||
- 30-second Vitest test and hook timeout budgets for full-suite initialization
|
||||
- deterministic non-watch `test:ci` full-suite command
|
||||
affects: [phase-02 verification, PATH-01, PATH-02, phase-04-rendering]
|
||||
|
||||
# Actuals (#2632)
|
||||
actuals:
|
||||
tokens: 247
|
||||
tasks: 2
|
||||
commits: 2
|
||||
plan_head_before: 31dd3de5be3cb4a969daff53cc933f7ec46dc5b9
|
||||
commits: 2
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "Root Vitest settings are declared through vitest/config with explicit test and hook budgets"
|
||||
- "CI verification uses a named non-watch package script while interactive test remains unchanged"
|
||||
|
||||
key-files:
|
||||
created: []
|
||||
modified:
|
||||
- vite.config.ts
|
||||
- package.json
|
||||
|
||||
key-decisions:
|
||||
- "Use 30 seconds for both testTimeout and hookTimeout to cover observed full-suite beforeAll import cost without changing test behavior"
|
||||
- "Keep pnpm test interactive and add pnpm test:ci as the deterministic non-watch gate"
|
||||
- "Preserve D-11 by modifying no client click adapter and no Phase 1 file"
|
||||
|
||||
patterns-established:
|
||||
- "Full-suite gates must run in Vitest run mode and retain the native exit status"
|
||||
|
||||
requirements-completed: [PATH-01, PATH-02]
|
||||
|
||||
# Coverage metadata (#1602)
|
||||
coverage:
|
||||
- id: D1
|
||||
description: "Full Vitest suite completes under explicit test and hook timeout budgets without timeout-induced skips"
|
||||
requirement: PATH-01
|
||||
verification:
|
||||
- kind: unit
|
||||
ref: "pnpm exec vitest run (two consecutive post-task runs: 11 files, 65 tests passed each)"
|
||||
status: pass
|
||||
human_judgment: false
|
||||
- id: D2
|
||||
description: "Repository exposes a deterministic non-watch full-suite test:ci command"
|
||||
requirement: PATH-02
|
||||
verification:
|
||||
- kind: other
|
||||
ref: "pnpm test:ci (11 files, 65 tests passed, exit 0)"
|
||||
status: pass
|
||||
human_judgment: false
|
||||
|
||||
# Metrics
|
||||
duration: 5min
|
||||
completed: 2026-09-10
|
||||
status: complete
|
||||
---
|
||||
|
||||
# Phase 02 Plan 05: Full-suite Vitest gate Summary
|
||||
|
||||
**Full-suite Vitest initialization is stabilized with 30-second hook/test budgets and a reproducible non-watch CI command**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** 5 min
|
||||
- **Started:** 2026-09-10T01:42:00Z
|
||||
- **Completed:** 2026-09-10T01:47:39Z
|
||||
- **Tasks:** 2
|
||||
- **Files modified:** 2
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Root `vite.config.ts` now uses `vitest/config` and sets both `testTimeout` and `hookTimeout` to 30 seconds
|
||||
- Two consecutive post-task `pnpm exec vitest run` executions passed with 11 test files and 65 tests each, with no hook timeouts, skipped tests, or failures
|
||||
- `package.json` now provides `pnpm test:ci` as a non-watch full-suite gate while `pnpm test` remains interactive
|
||||
- No client click adapter or Phase 1 file was modified; D-11 remains intact
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: Stabilize Vitest hook execution under the full-suite load** - `664d809` (fix)
|
||||
2. **Task 2: Add a reproducible CI-style full-suite entry point** - `154df6a` (chore)
|
||||
|
||||
**Plan metadata:** final metadata commit records this SUMMARY, STATE, ROADMAP, and requirements updates.
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `vite.config.ts` - Vitest-aware root configuration with explicit 30-second test and hook budgets
|
||||
- `package.json` - deterministic `test:ci` script using `vitest run`
|
||||
|
||||
## Verification Results
|
||||
|
||||
- `pnpm exec vitest run` consecutive run 1: exit 0; 11 files passed; 65 tests passed; 0 skipped; 0 failed; duration 6.07s
|
||||
- `pnpm exec vitest run` consecutive run 2: exit 0; 11 files passed; 65 tests passed; 0 skipped; 0 failed; duration 5.93s
|
||||
- `pnpm test:ci`: exit 0; 11 files passed; 65 tests passed; 0 skipped; 0 failed; duration 5.96s
|
||||
- Output included only existing Browserslist and test-fixture logger warnings; no hook-timeout, skipped-test, or failed-test summary appeared
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- Explicitly budget both tests and hooks at 30 seconds because the observed failures occurred during full-suite `beforeAll` imports
|
||||
- Preserve the existing interactive `pnpm test` script and add, rather than replace it with, `pnpm test:ci`
|
||||
- Preserve D-11: this gap closure changes only test configuration and package scripts, not client input wiring or Phase 1 behavior
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None - plan executed exactly as written.
|
||||
|
||||
**Total deviations:** 0 auto-fixed. **Impact:** No scope expansion or unplanned changes.
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
- No plan-blocking issues. Existing Browserslist freshness and fixture logger warnings remained non-failing and unrelated to this plan.
|
||||
- The pre-existing untracked `.planning/phases/02-pathfinding/02-VERIFICATION.md` was left untouched.
|
||||
|
||||
## Authentication Gates
|
||||
|
||||
None - no authenticated services were involved.
|
||||
|
||||
## Known Stubs
|
||||
|
||||
None in files created or modified by this plan.
|
||||
|
||||
## Next Phase Readiness
|
||||
|
||||
- The Phase 2 full-suite quality gate is green and has a deterministic CI entry point.
|
||||
- Mobile click/input wiring remains intentionally deferred to Phase 4 under D-11; this plan does not claim to implement that rendering boundary.
|
||||
- Existing repository-wide baseline type/lint/circular concerns from prior plans remain unchanged and are not blockers for this plan's verification.
|
||||
|
||||
---
|
||||
*Phase: 02-pathfinding*
|
||||
*Completed: 2026-09-10*
|
||||
|
||||
## Self-Check: PASSED
|
||||
|
||||
- SUMMARY file exists
|
||||
- Task commits `664d809` and `154df6a` are present in git history
|
||||
- Plan production diff contains only `vite.config.ts` and `package.json`
|
||||
Loading…
Reference in New Issue
Block a user