Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(gbrain): distinguish PGLite locks from malformed config#2234

Open
time-attack wants to merge 1 commit into
garrytan:mainfrom
time-attack:time-attack/issue-2194-pglite-lock
Open

fix(gbrain): distinguish PGLite locks from malformed config#2234
time-attack wants to merge 1 commit into
garrytan:mainfrom
time-attack:time-attack/issue-2194-pglite-lock

Conversation

@time-attack

Copy link
Copy Markdown

When a live gbrain session held the local PGLite database, sync wrongly said the user's valid configuration was malformed. It then skipped local code and memory work with advice that could not fix the real conflict.

Sync now identifies this PGLite connect timeout as an engine lock and tells the user to stop the holding process or retry outside the live session. Malformed configurations remain a separate error, and the message does not claim PGLite's lock was removed.

Technical details

  • Classify gbrain's exit 124 / connect timed out result as engine-locked for PGLite.
  • Classify the equivalent non-PGLite failure as broken-db.
  • Preserve broken-config for malformed configuration.
  • Add actionable /sync-gbrain guidance explaining that the holder must be stopped or sync must run outside the live Claude session.
  • Document that this does not remove PGLite's upstream single-process limitation.

Verification

The identical live probe was run before and after against isolated origin/main baseline and candidate environments:

  • gbrain: baseline broken-config, candidate engine-locked
  • memry: baseline broken-config, candidate engine-locked
  • zotero-arxiv-daily: baseline broken-config, candidate engine-locked
  • plane malformed-config control: broken-config before and after
  • twenty malformed-config control: broken-config before and after

Every lock probe launched a real local gbrain serve; the competing gbrain sources list --json exited 124 with connect timed out.

/pr-test-env evidence gate: PASS.

Targeted tests: 36 passed, 0 failed.

Fixes #2194

@trunk-io

trunk-io Bot commented Jul 10, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant