Problem: - 10 tests in main_test.go were hanging indefinitely - Tests calling flushToJSONL() or autoImportIfNewer() would timeout - Root cause: rootCtx was nil in test environment Solution: 1. Initialize rootCtx with 30s timeout in all affected tests: - TestAutoFlushOnExit - TestAutoFlushJSONLContent - TestAutoFlushErrorHandling - TestAutoImportIfNewer - TestAutoImportDisabled - TestAutoImportWithUpdate - TestAutoImportNoUpdate - TestAutoImportMergeConflict - TestAutoImportConflictMarkerFalsePositive - TestAutoImportClosedAtInvariant 2. Reduce sleep durations by 10x (200ms→20ms, 100ms→10ms) 3. Fix JSONL path issue in TestAutoFlushJSONLContent Results: - Before: Tests hung indefinitely (∞) - After: All 16 tests complete in ~1-2 seconds - 15 passing, 1 skipped (TestAutoFlushDebounce needs config fix) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 KiB
37 KiB