Delete .planning directory

This commit is contained in:
gsxdsm
2026-04-24 17:02:11 -07:00
committed by GitHub
parent 613ac75b81
commit 31a0c7cc07
4 changed files with 0 additions and 111 deletions

View File

@@ -1,7 +0,0 @@
=== RUN 1 start: 2026-04-24T15:39:53Z ===
RUN 1 duration=151s exit=1
=== RUN 2 start: 2026-04-24T15:42:24Z ===
RUN 2 duration=137s exit=0
=== RUN 3 start: 2026-04-24T15:44:41Z ===
RUN 3 duration=95s exit=0
=== ALL RUNS DONE ===

View File

@@ -1,67 +0,0 @@
# Phase 0 Baseline — Test Suite Measurement
Captured 2026-04-24. Three consecutive `pnpm test` runs from a warm-ish state (cache existed from prior work). No code changes between runs.
## Wall-clock per full run
| Run | Duration | Exit | Notes |
|----:|---------:|:----:|-------|
| 1 | 151s | ❌ 1 | 2 failed tests (see Flakes) |
| 2 | 137s | ✅ 0 | 9,680 tests passed |
| 3 | 95s | ✅ 0 | fully warm cache |
Warm-cache floor ≈ **95s**. Full-rebuild ceiling ≈ **151s**. Variance driven mostly by vitest collect + core's SQLite setup.
## Per-package (run 2, representative)
| Package | Files | Wall (s) | Test CPU (s) | Notes |
|---|---:|---:|---:|---|
| **core** | 67 | 91.4 | 274.0 | **dominant wall cost**; heavy SQLite, worker-pool capped |
| **dashboard** | 329 | 33.9 | 220.2 | massively parallel, highest test count |
| engine | 64 | 5.9 | 15.9 | lean |
| cli | 41 | 3.7 | 12.5 | lean |
| tui | 4 | 2.1 | 2.5 | |
| desktop | 14 | 0.9 | 0.9 | |
| pi-claude-cli | 9 | 0.6 | 0.2 | |
| mobile | 3 | 0.5 | <0.1 | |
| plugin-sdk | 1 | 0.17 | <0.01 | |
| 7 plugins | 8 | <0.4 ea | trivial | |
| **TOTAL** | **540** | ≈137s | ≈526s CPU | |
**Where the time goes** — core (67%) + dashboard (25%) = 92% of wall-clock. Everything else combined is < 10s.
## Flakes detected
Run 1 failed; runs 2 & 3 were green → **1/3 flake rate at the suite level**. Two distinct flaky tests, both in `packages/dashboard`:
1. `src/__tests__/routes-diff.test.ts > GET /api/tasks/:id/diff > returns 404 when task not found`
- Mode: 5000ms testTimeout exceeded. Test just calls a handler with a mock store — no legitimate reason to take >5s. Almost certainly state leakage or fake-timer hang.
2. `app/components/__tests__/QuickEntryBox.test.tsx > Rich creation features > resets all state after successful creation (disclosure resets to collapsed)`
- Mode: assertion `textarea.value === ""` got `"Task to reset"`. State leak from a prior test in the same file (textarea re-used across iterations before reset).
Both are in the `__tests__/` variant of the dashboard dual-test-dir duplication (see test-cull-duplicates.md). Note: these files may be the newer/larger replacements — deleting the companion flat-dir copies is still safe, but these two cannot just be deleted since they cover real endpoints. Fix or skip candidates for Phase 4.
## Confirmed Phase 1 duplicates
9 component/hook test files are duplicated between `packages/dashboard/app/**/*.test.tsx` (flat) and `packages/dashboard/app/**/__tests__/*.test.tsx`. Full table in `.planning/test-cull-duplicates.md`. Back-of-envelope LOC the flat copies alone: ~5,150 LOC; some `__tests__` copies are smaller and are the redundant side. Cheap win — just need to diff each pair and delete the less-complete one.
## Headline numbers to beat
- **540 test files → target <300** after Phases 1+2
- **137s warm-ish wall time → target < 90s**
- **Flake rate 1/3 → target 0/5**
- **9,680 passing tests → target unchanged in *meaningful* coverage**, but LOC down ≥ 30%
## Raw artifacts
- `.planning/test-baseline-run1.log` (failed — includes flake stack traces)
- `.planning/test-baseline-run2.log` (green)
- `.planning/test-baseline-run3.log` (green)
- `.planning/test-baseline-times.txt`
## Ready for Phase 1
Next step: diff each of the 9 duplicate pairs and delete the redundant copy. `QuickScriptsDropdown`, `useProjects`, `useUsageData`, `useActivityLog` have the flat version *larger* — suggests the `__tests__` copy is the stale one for those. For the other five, `__tests__` is larger.
Awaiting go-ahead before deletions.

View File

@@ -1,30 +0,0 @@
# Confirmed dashboard test duplicates
9 components/hooks have two parallel test files in `packages/dashboard`: one in the flat dir and one in a sibling `__tests__/` dir. Same filename, different content.
| Subject | flat (LOC) | `__tests__/` (LOC) | Larger |
|---|---|---|---|
| TaskCard.test.tsx | 556 | 4399 | __tests__ |
| SettingsModal.test.tsx | 893 | 4317 | __tests__ |
| Header.test.tsx | 1125 | 1710 | __tests__ |
| QuickScriptsDropdown.test.tsx | 510 | 196 | flat |
| MissionInterviewModal.test.tsx | ? | ? | — |
| AgentImportModal.test.tsx | ? | ? | — |
| useProjects.test.ts | 446 | 419 | flat |
| useUsageData.test.ts | 108 | 59 | flat |
| useActivityLog.test.ts | 280 | 92 | flat |
Both vitest configs (if any per-pkg excludes) need checking — some of these may already be excluded from the run.
## Cross-package integration overlap
| File | core (LOC) | engine (LOC) |
|---|---|---|
| mission-factory-parity.integration.test.ts | 544 | 666 |
| run-audit.integration.test.ts | 560 | 703 |
Not true duplicates (different packages own different implementations) but contract overlap warrants review before Phase 1 deletion.
## Next step
Before deleting any flat-vs-`__tests__` pair, `diff` the two to confirm they really cover the same thing. Auto-assumption: `__tests__/` is newer and larger wins; flat version is stale. QuickScriptsDropdown, useProjects, useUsageData, useActivityLog break that pattern — the flat file is larger, so the `__tests__` copy may be the redundant one.

View File

@@ -1,7 +0,0 @@
=== POST-RUN 1 start: 2026-04-24T17:07:07Z ===
POST-RUN 1 duration=150s exit=0
=== POST-RUN 2 start: 2026-04-24T17:09:37Z ===
POST-RUN 2 duration=147s exit=0
=== POST-RUN 3 start: 2026-04-24T17:12:04Z ===
POST-RUN 3 duration=141s exit=0
DONE