Commit Graph

5 Commits

Author SHA1 Message Date
Steve Yegge
0fc4da7358 Optimize test suite performance (15-18x speedup)
- Add t.Parallel() to CLI and export/import tests for concurrent execution
- Remove unnecessary 200ms sleep in daemon_autoimport_test (Execute forces sync)
- Reduce filesystem settle wait from 100ms to 50ms on non-Windows
- Optimize debouncer test sleeps (9 reductions, 30-50% faster)

Results:
- cmd/bd: 5+ minutes → 18 seconds
- internal/importer: < 1 second
- Most packages: < 2 seconds

Closes bd-gpe7
2025-11-05 10:26:58 -08:00
Steve Yegge
94e71642f9 fix: increase Windows filesystem delays in flaky tests
- TestDaemonAutoImportAfterGitPull: 200ms -> 500ms for filesystem timestamp precision
- TestSyncBranchPull_Success: 100ms -> 300ms for file I/O settling
- Also increase Linux delays slightly for more reliability
2025-11-04 10:20:12 -08:00
Steve Yegge
859fbd4976 fix: resolve CI test failures on Linux and Windows
- Fix TestMigrateCommand: Use correct sqlite3 driver name and file URI format
- Fix TestDaemonAutoImportAfterGitPull: Add Windows-specific delay for filesystem timestamp precision
- Fix TestSyncBranchPull_Success: Add Windows-specific delay for file I/O settling

Amp-Thread-ID: https://ampcode.com/threads/T-5abd1f2f-9607-4111-af9d-19df64362ac7
Co-authored-by: Amp <amp@ampcode.com>
2025-11-04 10:02:08 -08:00
Steve Yegge
09bd4d3462 Fix CI test failures (bd-1231)
- Always recompute content_hash in importer to avoid stale hashes from JSONL
- Add .gitignore to test repos to prevent database files from being tracked
- Fix daemon auto-import test to use correct RPC operation ('show' not 'get_issue')
- Set last_import_time metadata in test helper to enable staleness check
- Add filesystem settle delay after git pull in tests

Root cause: CloseIssue updates status but not content_hash, so importer
thought issues were unchanged. Always recomputing content_hash fixes this.

Amp-Thread-ID: https://ampcode.com/threads/T-63ef3a7d-8efe-472d-97ed-6ac95bd8318b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-02 08:55:34 -08:00
Steve Yegge
70358d02c9 Add two-repo daemon auto-import test for bd-09b5f2f5
Test proves the bug exists:
- Agent A closes issue and pushes
- Agent B does git pull (JSONL shows 'closed')
- Daemon query returns 'open' (stale SQLite)

Test currently fails, confirming daemon doesn't auto-import
after git pull updates JSONL. Will pass once fix is complete.
2025-11-01 12:41:49 -07:00