fix: raise gbrain version-probe timeout to 10s on Windows - #2450
Closed
vaston-viji wants to merge 1 commit into
Closed
fix: raise gbrain version-probe timeout to 10s on Windows#2450vaston-viji wants to merge 1 commit into
vaston-viji wants to merge 1 commit into
Conversation
On Windows the gbrain CLI is a .cmd shim that runs `bun run cli.ts`. A cold spawn takes over the 2s timeout in resolveGbrainBin (warm runs are ~700ms), so the probe times out, localEngineStatus classifies the engine as "no-cli", and the 60s status cache then serves that false negative to every skill preamble and sync run. /sync-gbrain skips the memory stage with "gbrain CLI not on PATH" even though the CLI works. Give the shim 10s of headroom, gated on NEEDS_SHELL_ON_WINDOWS so POSIX keeps the cheap 2s probe. Applies to both resolveGbrainBin and readGbrainVersion. Observed on Windows 11, bun 1.3.14, gbrain 0.42.59.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
9 tasks
Owner
|
Thank you — this was absorbed on main (credited in the v1.6x CHANGELOG entries; roster in PR #2604). Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows the gbrain CLI is a
.cmdshim that runsbun run cli.ts. A cold spawn takes over 2s (warm runs are ~700ms).resolveGbrainBininlib/gbrain-local-status.tsprobesgbrain --versionwith a 2s timeout, so the cold probe times out andlocalEngineStatusreturnsno-cli. The 60s status cache then serves that false negative to every skill preamble and sync run. Net effect:/sync-gbrainskips the memory stage with "gbrain CLI not on PATH; install via /setup-gbrain" on a machine where the CLI works.Fix
Add
VERSION_PROBE_TIMEOUT_MS: 10s whenNEEDS_SHELL_ON_WINDOWS, 2s otherwise. Used by bothresolveGbrainBinandreadGbrainVersion. POSIX keeps the cheap 2s probe; only the Windows shim path gets headroom.Verification
On Windows 11 (bun 1.3.14, gbrain 0.42.59.0):
gstack-gbrain-detectreportedgbrain_on_path: false,gbrain_local_status: "no-cli"; sync skipped the memory stage.gbrain_on_path: true,gbrain_local_status: "ok"; memory stage runs (OK memory — persisted 23 pages).bun test test/gbrain-local-status.test.tsshows the same 7 pass / 17 fail before and after the patch on this Windows machine — the 17 failures are pre-existing environment issues (the tests build fake POSIX shims on PATH), not caused by this change.🤖 Generated with Claude Code