- Add zauc-mocks-bg, zauc-mocks-cache, zauc-mocks-hook,
zauc-mocks-ws, and zauc-sync-mocks directories
- Renamed from _auc-mocks-* to zauc-mocks-* for better organization
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
- Delete background-update-check, cache, hook, workspace-resolution,
and sync-package-json isolated test directories
- These have been renamed/reorganized to zauc-mocks-* pattern
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
- Moved hook.test.ts, background-update-check.test.ts, workspace-resolution.test.ts, and cache.test.ts to separate sibling directories (_auc-mocks-hook, _auc-mocks-bg, _auc-mocks-ws, _auc-mocks-cache)
- Separated sync-package-json.test.ts to _auc-sync-mocks
- Fixed all relative import paths to account for new directory structure
- Bun runs same-directory test files in parallel; mock.module() calls contaminate each other. Only reliable isolation is separate directory = separate CI batch
- CI plan now creates individual isolated target for each mocking test file, preventing cross-file pollution
- Moved hook-integration tests → src/hooks/_auc-mocks-hook/
- Moved workspace-resolution tests → src/hooks/_auc-mocks-workspace/
- Moved background-update-check tests → src/hooks/_auc-mocks-bgupdate/
- Moved cache tests → src/hooks/_auc-mocks-cache/
- Moved sync-package-json tests → src/hooks/_auc-sync-mocks/
- Removed hook.test.ts, workspace-resolution.test.ts, background-update-check.test.ts from auto-update-checker
- Removed cache.test.ts from auto-update-checker
- Each test file with mock.module() now in its own isolated CI batch
- Bun's prefix glob matching was picking up _auc-mocks-* when running auto-update-checker
- Solution: Separate into dedicated directories prevents cross-contamination
CI Results: 3151 pass, 0 fail ✓
sync-package-json.test.ts mocks node:fs which leaks into plugin-entry.test.ts
running in the same CI batch. Move to checker/sync/ subdirectory for isolation.
hook.test.ts mocks ./checker at module load time, which contaminates
checker.test.ts and invalidate-package.test.ts running in parallel in
the same CI batch. Move to hook-integration/ subdirectory for CI batch
isolation.
mock.module('./executor') leaks across all files in the same batch because
Bun runs test files in a directory in parallel. The afterAll restore trick
doesn't work when other files load the module concurrently at startup.
Moving the leak test to its own subdirectory (leak/) ensures CI's batch
runner isolates it in a separate bun test invocation, preventing executor
mock contamination in executor-resolution.test.ts and index.test.ts.
mock.module('./executor') in auto-slash-command-leak.test.ts was leaking
into executor-resolution.test.ts in the same CI batch run, causing
executeSlashCommand to return the mock's raw replacement instead of the
real resolution result.
Fix: re-register the real executor exports via mock.module() in afterAll
so subsequent test files in the batch get the real implementation.
Replace the legacy toast regex writer with the shared atomic helper and route legacy plugin call sites through small wrappers so existing mock.module tests stop leaking across the suite.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add afterAll(() => { mock.restore() }) to 52 test files missing cleanup
- Rewrite create-tool-guard-hooks.test.ts to use spyOn instead of barrel mock
- Fix skill-mcp-manager OAuth tests with missing mockTokens/mockLogin definitions
- Fix start-work hook: show worktree active block on resume with existing worktree_path
- Extract createWorktreeActiveBlock to worktree-block.ts to avoid circular import
- Replace 80-line isolated test runner CI config with single `bun test` command