mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
fix(heavy): frontmatter_scan_wallclock — opt into --no-embedding so CI runners work
Heavy tests workflow run 26542447602 (commit 483a5577) failed on the
first heavy script:
[fm_wallclock] FAIL: gbrain init exited non-zero
No embedding provider configured. Set one of:
OPENAI_API_KEY / ZEROENTROPY_API_KEY / VOYAGE_API_KEY
Or defer setup: gbrain init --pglite --no-embedding
The v0.37 D9 hard-require landed in init.ts: `gbrain init --pglite` now
refuses to proceed without an embedding provider configured. The
heavy-tests GitHub workflow doesn't pipe any embedding API keys
(deliberate — the heavy tests measure ops shape, not LLM behavior), so
every CI invocation now blocks at step 2 of this script.
The script's whole purpose is measuring `gbrain doctor`'s
frontmatter-scan wallclock — it never embeds, never calls
`gbrain embed`, never queries vectors. The right fix is to opt out of
the provider requirement via the same `--no-embedding` flag init.ts
already exposes for this exact "deferred setup" case.
Verified locally:
TMP=$(mktemp -d); GBRAIN_HOME="$TMP" \
bun run src/cli.ts init --pglite --yes --no-embedding
# exit 0, brain initialized.
No production code change. One-line + comment in the script.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
483a557725
commit
7962d312ec
@@ -79,8 +79,11 @@ SEED_ELAPSED=$((SECONDS - SEED_START))
|
||||
echo "[fm_wallclock] fixture seeded in ${SEED_ELAPSED}s" | tee -a "$LOG"
|
||||
|
||||
# Step 2: init brain + register the source.
|
||||
# `--no-embedding` opts out of the embedding-provider hard-require (v0.37 D9).
|
||||
# This script measures doctor's frontmatter-scan wallclock — it never embeds —
|
||||
# so the CI runner doesn't need OPENAI_API_KEY / ZEROENTROPY_API_KEY / VOYAGE_API_KEY.
|
||||
echo "[fm_wallclock] init brain..." | tee -a "$LOG"
|
||||
timeout 120s bun run src/cli.ts init --pglite --yes >> "$LOG" 2>&1 || {
|
||||
timeout 120s bun run src/cli.ts init --pglite --yes --no-embedding >> "$LOG" 2>&1 || {
|
||||
echo "[fm_wallclock] FAIL: gbrain init exited non-zero" >&2
|
||||
echo "Log tail:" >&2
|
||||
tail -30 "$LOG" >&2
|
||||
|
||||
Reference in New Issue
Block a user