-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Expand file tree
/
Copy pathbunfig.toml
More file actions
60 lines (59 loc) · 3.75 KB
/
Copy pathbunfig.toml
File metadata and controls
60 lines (59 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[test]
# PGLite WASM cold start + initSchema() runs ~5–20s on loaded machines.
# Default 5s is too short for those tests' beforeAll hooks. 60s is the
# empirical ceiling we observed for the slowest cold-init paths.
#
# v0.26.4: scripts/run-unit-parallel.sh and scripts/run-unit-shard.sh
# also pass `--timeout=60000` explicitly so the ceiling is consistent
# whether tests are invoked through the wrapper or directly via bun test.
timeout = 60_000
# v0.37 fix wave: pin gateway defaults to legacy OpenAI/1536 BEFORE any
# test runs, so the 20+ test files with hardcoded 1536-d Float32Array
# fixtures still match the schema. The production default is Voyage/1024;
# tests that want the new default call configureGateway() explicitly in
# their own beforeAll.
#
# #2823: redirect GBRAIN_AUDIT_DIR to a per-run scratch dir BEFORE any test
# runs, so audit-emitting code paths (content-sanity, shell-audit, etc.)
# can't leak fixture events into the operator's real ~/.gbrain/audit/. See
# test/helpers/audit-dir-preload.ts for the full rationale.
#
# Same treatment for the sync failure ledger: broken-fixture import/sync tests
# were appending rows into the operator's real ~/.gbrain/sync-failures.jsonl,
# which `gbrain doctor` reads and warns on. See
# test/helpers/sync-failures-preload.ts.
# #3485: database-url-guard-preload runs FIRST — it refuses to start the run
# while DATABASE_URL/GBRAIN_DATABASE_URL is ambient without the explicit
# GBRAIN_TEST_ALLOW_DATABASE_URL=1 opt-in that the e2e wrappers set at their
# own subprocess boundary. See test/helpers/database-url-guard-preload.ts.
#
# operator-env-preload (#4023): drop the operator's ambient CONDUCTOR_/MCP_/
# OPENCLAW_ workspace context and GBRAIN_ config overrides (a stray
# GBRAIN_SOURCE, GBRAIN_CYCLE_FRESHNESS_WARN_HOURS, ...) that run-e2e.sh
# already scrubs for the E2E lane but the unit lane inherited. Runs right
# after the database-url guard so every later preload — especially
# legacy-embedding-preload's `env: {...process.env}` snapshot — sees the
# scrubbed environment. Test-machinery vars the runners/CI export
# (GBRAIN_TEST_*, GBRAIN_CI_*, GBRAIN_E2E_*, GBRAIN_REAL_*, GBRAIN_HOME,
# GBRAIN_DATABASE_URL, snapshot/bin fast paths) survive via keep-lists. See
# test/helpers/operator-env-preload.ts.
#
# gbrain-home-preload: point GBRAIN_HOME at per-run scratch so tests never
# read (or clobber) the operator's real ~/.gbrain config/brain — the live
# config.json changing mid-day flipped 27 config-honoring cycle/dream tests
# red on dev boxes while CI stayed green. Respects a pre-set GBRAIN_HOME
# (the e2e wrapper sets its own). See test/helpers/gbrain-home-preload.ts.
#
# git-hermetic-preload: inject commit.gpgsign=false/tag.gpgsign=false via
# GIT_CONFIG_COUNT env config so a dev box's global signing config can't
# route test-repo commits through gpg-agent (which intermittently fails
# under full-suite load). See test/helpers/git-hermetic-preload.ts.
#
# provider-keys-preload: strip ambient ANTHROPIC_API_KEY/OPENAI_API_KEY so
# key-aware model routing (resolveTierDefault) resolves identically to
# keyless CI — a chat key exported in the dev shell otherwise flips default-
# model assertions AND turns gated paths into real network calls (observed:
# 183 failures + 15-minute retry hangs on an OPENAI-only shell). The e2e
# wrapper sets GBRAIN_TEST_KEEP_PROVIDER_KEYS=1 to opt back in. See
# test/helpers/provider-keys-preload.ts.
preload = ["./test/helpers/database-url-guard-preload.ts", "./test/helpers/operator-env-preload.ts", "./test/helpers/provider-keys-preload.ts", "./test/helpers/real-home-guard-preload.ts", "./test/helpers/legacy-embedding-preload.ts", "./test/helpers/audit-dir-preload.ts", "./test/helpers/sync-failures-preload.ts", "./test/helpers/gbrain-home-preload.ts", "./test/helpers/git-hermetic-preload.ts"]