From d615f5247df17df16f16f35cd1ad36337d2367e3 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 9 Aug 2026 08:59:41 -0500 Subject: [PATCH 1/4] Update nix flake for v0.19.3 --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index cf5392b7f..db79fe1a1 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -5,7 +5,7 @@ sqlite, }: let - version = "0.19.2"; + version = "0.19.3"; in buildGoModule { pname = "msgvault"; From 35a51c613bf542df9bdbfc945cbb6f2e154d46d5 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 9 Aug 2026 11:51:35 -0500 Subject: [PATCH 2/4] test(serve): allow for slow background startup Four-way Windows CI sharding can make fresh SQLite schema initialization exceed five seconds even when the daemon and analytics initializer are healthy. That resource-sensitive deadline caused the release metadata PR to fail after the required cache build started normally on less-contended runs. Keep the production-path assertions and early-exit checks intact while giving the three background analytics startup tests the same bounded headroom for slow runners. Generated with Codex Co-authored-by: Codex --- cmd/msgvault/cmd/serve_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/msgvault/cmd/serve_test.go b/cmd/msgvault/cmd/serve_test.go index a07499463..3db61b793 100644 --- a/cmd/msgvault/cmd/serve_test.go +++ b/cmd/msgvault/cmd/serve_test.go @@ -307,7 +307,7 @@ func TestRunServeServesHealthWhileAnalyticsBuildBlocked(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(5 * time.Second): + case <-time.After(30 * time.Second): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) @@ -374,7 +374,7 @@ func TestRunServeDuckDBReportsInitializingWithoutSQLFallback(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(5 * time.Second): + case <-time.After(30 * time.Second): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) @@ -467,7 +467,7 @@ func TestRunServeAutoSwitchesToDuckDBAfterBackgroundBuild(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(5 * time.Second): + case <-time.After(30 * time.Second): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) From e6fc848d550860ae1632a4d8e23e8d4b06187782 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 9 Aug 2026 12:25:54 -0500 Subject: [PATCH 3/4] test(serve): stabilize lifecycle waits under CI contention Four concurrent Windows test shards can make fresh database initialization exceed five seconds before the full-daemon tests reach their injected startup seams. Keep those waits bounded but give the complete startup path consistent headroom so resource contention does not masquerade as a lifecycle regression. Generated with Codex Co-authored-by: Codex --- cmd/msgvault/cmd/serve_test.go | 14 ++++++++------ cmd/msgvault/cmd/serve_vector_integration_test.go | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/msgvault/cmd/serve_test.go b/cmd/msgvault/cmd/serve_test.go index 3db61b793..4492a7e12 100644 --- a/cmd/msgvault/cmd/serve_test.go +++ b/cmd/msgvault/cmd/serve_test.go @@ -32,6 +32,8 @@ import ( "go.kenn.io/msgvault/internal/testutil/storetest" ) +const serveLifecycleTestTimeout = 30 * time.Second + func TestServeConfigParsing(t *testing.T) { require := require.New(t) assert := assert.New(t) @@ -203,7 +205,7 @@ func TestRunServeImmediateCancellationWaitsForAPIStart(t *testing.T) { select { case <-started: - case <-time.After(5 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow("API startup seam was not entered") } cancel() @@ -307,7 +309,7 @@ func TestRunServeServesHealthWhileAnalyticsBuildBlocked(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(30 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) @@ -374,7 +376,7 @@ func TestRunServeDuckDBReportsInitializingWithoutSQLFallback(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(30 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) @@ -467,7 +469,7 @@ func TestRunServeAutoSwitchesToDuckDBAfterBackgroundBuild(t *testing.T) { case <-buildStarted: case err := <-errCh: require.NoError(err, "runServe exited before analytics build was blocked") - case <-time.After(30 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow("analytics cache build did not start") } waitForServeHealthBounded(t, c.Server.APIPort, errCh) @@ -610,7 +612,7 @@ func freeTCPPort(t *testing.T) int { func waitForServeHealth(t *testing.T, port int, errCh <-chan error) { t.Helper() url := fmt.Sprintf("http://127.0.0.1:%d/health", port) - deadline := time.Now().Add(5 * time.Second) + deadline := time.Now().Add(serveLifecycleTestTimeout) for time.Now().Before(deadline) { select { case err := <-errCh: @@ -634,7 +636,7 @@ func waitForServeHealthBounded(t *testing.T, port int, errCh <-chan error) { t.Helper() client := &http.Client{Timeout: 100 * time.Millisecond} url := fmt.Sprintf("http://127.0.0.1:%d/health", port) - deadline := time.Now().Add(5 * time.Second) + deadline := time.Now().Add(serveLifecycleTestTimeout) for time.Now().Before(deadline) { select { case err := <-errCh: diff --git a/cmd/msgvault/cmd/serve_vector_integration_test.go b/cmd/msgvault/cmd/serve_vector_integration_test.go index cde5f161c..71bca03af 100644 --- a/cmd/msgvault/cmd/serve_vector_integration_test.go +++ b/cmd/msgvault/cmd/serve_vector_integration_test.go @@ -129,7 +129,7 @@ func TestRunServeGivesAnalyticsInitializationGatePriorityOverVector(t *testing.T case <-analyticsStarted: case err := <-errCh: require.NoError(t, err, "runServe exited before analytics initialization") - case <-time.After(5 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow(t, "analytics initialization did not start") } waitForServeHealth(t, c.Server.APIPort, errCh) @@ -148,7 +148,7 @@ func TestRunServeGivesAnalyticsInitializationGatePriorityOverVector(t *testing.T case <-vectorStarted: case err := <-errCh: require.NoError(t, err, "runServe exited before vector initialization") - case <-time.After(5 * time.Second): + case <-time.After(serveLifecycleTestTimeout): require.FailNow(t, "vector initialization did not start after analytics released the gate") } cancel() From b6e9430db145a41abba0c1d954d95098f067a454 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 9 Aug 2026 12:53:53 -0500 Subject: [PATCH 4/4] test: budget for the contended CLI suite The unsharded CLI package can cross the existing 20-minute aggregate deadline on a contended CI runner even when no individual test is stalled. Keep a bounded package alarm while giving the nearly 1,000-test suite enough headroom to distinguish slow execution from a deadlock. Generated with Codex Co-authored-by: Codex --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a1489df7b..547ca2bf7 100644 --- a/Makefile +++ b/Makefile @@ -85,15 +85,15 @@ clean: rm -f msgvault msgvault.exe mimeshootout rm -rf bin/ -# Run tests. The 20m timeout matches CI's sharded jobs: heavy DuckDB -# packages (cmd, api, query) run concurrently on 2-core CI runners, and the -# per-package wall clock can exceed go test's 10m default under contention. +# Run tests. The CLI package has nearly 1,000 tests, including heavy DuckDB +# coverage, and its per-package wall clock can exceed 20m on contended CI +# runners even when no individual test is stalled. test: - go test -timeout 20m -tags "$(BUILD_TAGS)" ./... + go test -timeout 30m -tags "$(BUILD_TAGS)" ./... # Run tests with verbose output test-v: - go test -timeout 20m -tags "$(BUILD_TAGS)" -v ./... + go test -timeout 30m -tags "$(BUILD_TAGS)" -v ./... # Run tests against PostgreSQL with the pgvector tag (set MSGVAULT_TEST_DB # first). Needs a server with the vector extension available.