feat(test): add curated engine-core gate suite and test:gate command

This commit is contained in:
gsxdsm
2026-06-05 08:55:43 -07:00
parent 653b588fe4
commit 98d5d83e95
4 changed files with 45 additions and 0 deletions

View File

@@ -16,6 +16,9 @@
"scripts": {
"pretest": "node scripts/check-no-nohup.mjs && node scripts/check-no-kill-4040.mjs",
"pretest:full": "node scripts/check-no-nohup.mjs && node scripts/check-no-kill-4040.mjs",
"pretest:gate": "node scripts/check-no-nohup.mjs && node scripts/check-no-kill-4040.mjs",
"test:gate": "pnpm --filter @fusion/engine test:core && pnpm --filter @runfusion/fusion test:ci-shape",
"smoke:boot": "node scripts/boot-smoke.mjs",
"local": "node scripts/start-local.mjs",
"dev": "node scripts/dev-with-memory.mjs",
"dev:ui": "pnpm --filter @fusion/dashboard dev",

View File

@@ -50,6 +50,7 @@
"build:exe:all": "bun run build.ts --all",
"typecheck": "tsc --noEmit",
"test": "vitest run --silent=passed-only --reporter=dot",
"test:ci-shape": "vitest run src/__tests__/ci-workflow.test.ts --silent=passed-only --reporter=dot",
"test:slow-cli": "cross-env FUSION_TEST_SLOW_CLI=1 vitest run src/commands/__tests__/agent-export.test.ts --silent=passed-only --reporter=dot",
"test:extension-integration": "cross-env FUSION_TEST_EXTENSION_INTEGRATION=1 vitest run src/__tests__/extension-integration.test.ts --silent=passed-only --reporter=dot",
"test:build-exe": "cross-env FUSION_TEST_BUILD_EXE=1 vitest run --config vitest.build-exe.config.ts --silent=passed-only --reporter=dot",

View File

@@ -31,6 +31,7 @@
"build": "tsc",
"typecheck": "tsc --noEmit",
"test": "vitest run --silent=passed-only --reporter=dot --project=engine-default --project=engine-reliability",
"test:core": "vitest run --silent=passed-only --reporter=dot --project=engine-core",
"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",

View File

@@ -48,6 +48,46 @@ export default defineConfig({
// does not inherit full-suite include and rerun everything single-threaded
// (FN-5537: this caused long runs and external SIGTERM 143 kills).
projects: [
{
extends: true,
test: {
name: "engine-core",
// The curated merge-gate suite (see docs/testing.md "Merge gate").
// Membership is an explicit allow-list, NOT a glob: tests earn their
// way in with evidence of value, and a flaky gate test is evicted by
// deleting its line here (no need for the flaky test to pass).
// Selection criteria: deterministic (no real git subprocesses, no
// real timers/network), fast (<~3s/file per scripts/test-timings.json),
// covering regression-prone core invariants: merge lifecycle and
// scope, files-changed/fork-point attribution, executor core paths,
// triage, scheduling, self-healing.
// Budget: the whole project must stay under ~60s wall-clock so the
// CI gate job's test run lands under ~1 minute.
include: [
"src/__tests__/merger-merge-lifecycle.test.ts",
"src/__tests__/merger-post-merge.test.ts",
"src/__tests__/merger-conflict-resolution.test.ts",
"src/__tests__/merger-diff-scope.test.ts",
"src/__tests__/merger-file-scope-invariant.test.ts",
"src/__tests__/merger-landed-files-capture.test.ts",
"src/__tests__/branch-attribution.test.ts",
"src/__tests__/executor-core.test.ts",
"src/__tests__/executor-recovery.test.ts",
"src/__tests__/executor-base-commit-capture.test.ts",
"src/__tests__/executor-capture-modified-files-attribution.test.ts",
"src/__tests__/triage.test.ts",
"src/__tests__/triage-preflight.test.ts",
"src/__tests__/scheduler.test.ts",
"src/__tests__/scheduler-node-routing.test.ts",
"src/__tests__/scheduler-overlap-requeue.test.ts",
"src/__tests__/mission-scheduler.test.ts",
"src/__tests__/self-healing.test.ts",
"src/__tests__/heartbeat-monitor.test.ts",
"src/__tests__/workflow-node-handlers.test.ts",
],
exclude: ["node_modules/**", "dist/**"],
},
},
{
extends: true,
test: {