Stop the transcript-scope brain-sync tests timing out on local runs (GST-2555) (#4322)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-12 15:04:43 +00:00
1 parent 990315df00
commit 5183bb2788
2 files changed
+4 -1

No files matched your search

@@ -0,0 +1 @@
- **The transcript-scope brain-sync tests no longer time out on a bare local `bun test` (2026-11-12 daily flaky pass, GST-2555).** Each of the file's four cases spawns `gstack-brain-sync`, `gstack-config` and git several times, and the two push-retry cases take 3.4 to 5.6 seconds on a 4-core machine with nothing else running. Under bun's 5-second default they timed out in 3 of 8 runs there, while CI and the pregate runner already allow 30 seconds per test. The file now sets that same 30-second default, so a local focused run agrees with CI (12 of 12 cases passed in three bare runs). No assertion, threshold, trial count or retry changed.
+3 -1
View File
@@ -5,7 +5,7 @@
* commits before every push, so a page outside the current consent is never
* published. Local bare repo as the remote; stub gbrain; no network.
*/
import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
import { afterEach, beforeEach, describe, expect, setDefaultTimeout, test } from 'bun:test';
import { spawnSync } from 'child_process';
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'fs';
import { tmpdir } from 'os';
@@ -16,6 +16,8 @@ const BIN = join(ROOT, 'bin');
const DAY = 24 * 60 * 60 * 1000;
const iso = (ms: number) => new Date(ms).toISOString().replace(/\.\d{3}Z$/, 'Z');
setDefaultTimeout(30_000);
let home: string;
let gstackHome: string;
let remote: string;