Skip to content

fix: exclude stale aegis/ directory from vitest runs#4398

Open
OneStepAt4time wants to merge 2 commits into
developfrom
fix/vitest-exclude-stale-aegis-dir
Open

fix: exclude stale aegis/ directory from vitest runs#4398
OneStepAt4time wants to merge 2 commits into
developfrom
fix/vitest-exclude-stale-aegis-dir

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Problem

The aegis/ directory on disk contains a stale copy of source code and tests that is not git-tracked but is picked up by vitest. The root vitest.config.ts excluded dashboard/** but not the mirrored paths under aegis/.

This caused 33 test failures across every local run:

  • 28 failures in aegis/src/__tests__/dead-session.test.ts (stale monitor class)
  • 4 failures in aegis/src/__tests__/content-length-static.test.ts (stale dashboard build)
  • 1 failure in aegis/e2e/e2e-dogfood.test.ts (missing dist/server.js)

Also: the open package was declared in package.json dependencies but not installed, causing 5 TypeScript errors in tsc --noEmit.

Fix

  • Added aegis/dashboard/**, aegis/src/**, aegis/e2e/** to vitest exclude list
  • Installed missing open dependency (resolves TS2307 errors)

Verification

  • 5,831 tests passed, 0 failures (was 33 failures)
  • tsc --noEmit clean (was 5 errors)
  • Build passes clean
  • All failing tests are from the stale aegis/ copy — real source at src/ passes all tests

Files Changed

  • vitest.config.ts — 3 exclude patterns added
  • package-lock.jsonopen dependency resolved

OneStepAt4time added 2 commits May 28, 2026 09:47
The aegis/ directory contains a stale copy of source and tests that is not
git-tracked but present on disk. Root vitest.config.ts excluded dashboard/**
but not aegis/dashboard/**, aegis/src/**, or aegis/e2e/**, causing:

- 28 dead-session test failures from stale monitor class
- 4 content-length-static test failures from stale dashboard build
- 1 e2e-dogfood test failure (missing dist/server.js in stale copy)

Also installed missing 'open' dependency that caused TypeScript errors in
cli-init, zero-config-init, init.ts, and login.ts.

Test results: 406 files passed, 5,831 tests passed, 0 failures
Local check-bundle-size.sh had THRESHOLD_KB=2244 while CI uses 2508.
This caused false failures in 'npm run gate' that wouldn't fail in CI.

Synced to match the CI value from .github/workflows/ci.yml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant