perf(engine): tier 4 slow real-git test files into engine-slow project
`pnpm test` was dominated by a handful of merger and reliability- interaction files that each spawn `mkdtemp` + `git init` + multiple commits per test. Renaming them to `*.slow.test.ts` and routing them to a new `engine-slow` vitest project moves them out of the default local run. Local `pnpm test` drops from 198s to 84s (~57% faster). - `pnpm test` — engine-default + engine-reliability lanes only - `pnpm test:slow` — engine-slow lane (4 files, 63 tests, ~37s) - `pnpm test:all` — everything (for CI / verify:workspace) Files moved: - reliability-interactions/merge-reuse-task-worktree.test.ts (was 20.6s) - merger-overlap-guard.test.ts (was 17.1s) - merger-staging-allowlist.test.ts (was 11.8s) - merger-diff-volume-gate.test.ts (was 8.4s) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --silent=passed-only --reporter=dot",
|
||||
"test": "vitest run --silent=passed-only --reporter=dot --project=engine-default --project=engine-reliability",
|
||||
"test:slow": "vitest run --silent=passed-only --reporter=dot --project=engine-slow",
|
||||
"test:all": "vitest run --silent=passed-only --reporter=dot",
|
||||
"test:executor": "vitest run src/__tests__/executor-*.test.ts",
|
||||
"test:watch": "vitest src/__tests__/executor-*.test.ts --watch"
|
||||
},
|
||||
|
||||
@@ -48,6 +48,10 @@ export default defineConfig({
|
||||
include: ["src/**/*.test.ts"],
|
||||
exclude: [
|
||||
"src/__tests__/reliability-interactions/**/*.test.ts",
|
||||
// Real-git heavy files run in the engine-slow project so local
|
||||
// `pnpm test` stays snappy. CI picks them up via `test:slow`
|
||||
// / `test:all` invoked from the root `test:full` script.
|
||||
"src/**/*.slow.test.ts",
|
||||
"node_modules/**",
|
||||
"dist/**",
|
||||
],
|
||||
@@ -58,6 +62,9 @@ export default defineConfig({
|
||||
test: {
|
||||
name: "engine-reliability",
|
||||
include: ["src/__tests__/reliability-interactions/**/*.test.ts"],
|
||||
// Mirror the engine-default exclusion so reliability slow tests
|
||||
// also tier into engine-slow.
|
||||
exclude: ["src/**/*.slow.test.ts"],
|
||||
// These tests assert event ordering across real worktrees. Parallel
|
||||
// execution under merger load caused subprocess-guard timeouts and
|
||||
// SQLite rowid interleaving (e.g. FN-5521 hit
|
||||
@@ -66,6 +73,19 @@ export default defineConfig({
|
||||
poolOptions: { threads: { singleThread: true } },
|
||||
},
|
||||
},
|
||||
{
|
||||
extends: true,
|
||||
test: {
|
||||
name: "engine-slow",
|
||||
// Files matching `*.slow.test.ts` are the long-tail real-git suites
|
||||
// (`mkdtemp` + `git init` + multiple commits per test). They run
|
||||
// single-threaded to avoid spawning many concurrent git processes
|
||||
// and inflating wall time further. Excluded from the default
|
||||
// `pnpm test` lane; run via `pnpm test:slow` / `pnpm test:all`.
|
||||
include: ["src/**/*.slow.test.ts"],
|
||||
poolOptions: { threads: { singleThread: true } },
|
||||
},
|
||||
},
|
||||
],
|
||||
coverage: {
|
||||
enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user