agent-orchestrator/packages
Prateek 5ae019ffe5 fix: clean up hash-based test directories in afterEach
Fixes bugbot issue: "Tests leak directories under home directory without cleanup"

The problem:
- Tests call the real getSessionsDir() which creates ~/.agent-orchestrator/{hash}/
  directories based on hashing the tmpDir path
- Each test run uses a new random tmpDir, creating a unique hash
- afterEach only cleaned up tmpDir, leaving orphaned directories in ~/.agent-orchestrator/
- These directories accumulated indefinitely

The fix:
- Added cleanup for hash-based directories in afterEach for all affected tests
- Uses getProjectBaseDir() to calculate the directory path
- Removes the hash-based directory before cleaning tmpDir
- All 61 tests pass (13 CLI + 48 core)

Files fixed:
- packages/cli/__tests__/commands/session.test.ts
- packages/core/src/__tests__/session-manager.test.ts
- packages/core/src/__tests__/lifecycle-manager.test.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 00:32:01 +05:30
..
agent-orchestrator feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
cli fix: clean up hash-based test directories in afterEach 2026-02-18 00:32:01 +05:30
core fix: clean up hash-based test directories in afterEach 2026-02-18 00:32:01 +05:30
integration-tests fix: migrate to hash-based project isolation architecture 2026-02-18 00:19:55 +05:30
plugins fix: migrate to hash-based project isolation architecture 2026-02-18 00:19:55 +05:30
web fix: migrate to hash-based project isolation architecture 2026-02-18 00:19:55 +05:30