fix(tests): resolve short test performance regression (bd-0v4)

Short tests were timing out after 13+ minutes due to:

1. TestZFCSkipsExportAfterImport spawning subprocess that tried to
   auto-start daemon - now skipped in short mode

2. TestVersionFlag taking 5+ seconds because --version flag did not
   skip PersistentPreRun daemon startup - added early return

3. TestGetVersionsSince* had hardcoded version expectations that
   became stale - made tests dynamic using versionChanges array

Short tests now complete in ~8 seconds instead of timing out.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-27 01:36:57 -08:00
parent 6aa0f58f86
commit 650dcd42f6
3 changed files with 32 additions and 19 deletions
+3
View File
@@ -438,6 +438,9 @@ func TestHasJSONLConflict_MultipleConflicts(t *testing.T) {
// TestZFCSkipsExportAfterImport tests the bd-l0r fix: after importing JSONL due to
// stale DB detection, sync should skip export to avoid overwriting the JSONL source of truth.
func TestZFCSkipsExportAfterImport(t *testing.T) {
if testing.Short() {
t.Skip("Skipping test that spawns subprocess in short mode")
}
ctx := context.Background()
tmpDir := t.TempDir()
oldWd, _ := os.Getwd()