Download Latest Version v0.60.152.0 source code.zip (46.6 MB) Google Add to Preferred Sources
Home / v0.60.147.0
Name Modified Size InfoDownloads / Week
Parent folder
gbrain-darwin-arm64 < 8 hours ago 152.8 MB
gbrain-linux-x64 < 8 hours ago 171.2 MB
README.md < 8 hours ago 4.3 kB
v0.60.147.0 source code.tar.gz < 8 hours ago 39.6 MB
v0.60.147.0 source code.zip < 8 hours ago 46.4 MB
Totals: 5 Items   410.1 MB 0

A write that arrives while a brain folder with the Git durability hook is committing a backlog of Git effects now publishes after the group in flight, inside its 5 s wait. Before, it waited out the whole backlog and came back pending. On Postgres, a first sync of an already-imported source now issues 40 statements per unchanged file instead of 82.

Efficiency wave 9 (GBRA-75). Base is master at wave 8 (310371559). Measured on 4-vCPU AMD EPYC / 16 GiB machines with Bun 1.4.2 and synthetic brains, base and branch interleaved, p50 / p95.

Path Engine, brain, N Before After
write submitted while 6 full Git groups (600 effects, 1 s per commit) are committing in a hooked folder PGLite, N=6 6 of 6 still pending at the 5 s wait 6 of 6 published (about 1.8 s)
same Postgres, N=1 pending published
first sync of an already-imported 3,700-file source Postgres 5k, N=3 22,859 / 23,139 ms 21,227 / 21,989 ms
statements per unchanged file in that sync Postgres 5k 82.2 40.3
SET LOCAL statement_timeout statements per sync Postgres 5k 51.8k about 80
1-page sync / no-change sync (guards) Postgres 5k, N=10 1,426 / 737 ms 1,450 / 751 ms

Itemized changes

  • Full Git groups yield to a queued write (persistence/effects.ts). A Git group in a folder with the durability hook already stood aside, for at most 20 claims, when a publication was queued or running on its worktree. Groups of 100 never did, though, so under a backlog every group was full. A write's publication found the worktree lock held, was released as writer_busy, and missed every gap until the backlog ended. Every group now yields, in a single update with publication_pending (250 ms). The attempt cap still bounds the delay under a steady stream of writes. Effects stay in claim order per worktree, and no group spans a publication of its own worktree.
  • A released claim no longer looks like a stalled preparation (persistence/journal.ts). An uncharged release (writer_busy, owner_unavailable, recovery_required, capacity) now clears the claim phase. A row that waits on the worktree lock used to keep reading preparing / waiting_on=unknown. A charged preparation_deadline release keeps its phase, which kill accounting reads.
  • One bounded-read session per waiver run (persistence/bounded-reads.ts withBoundedReadSession, sync-run.ts, sync-waivers.ts, postgres-engine.ts). On Postgres, a waiver run's screens now share one reserved connection and one transaction. SET LOCAL statement_timeout is set again before any read whose bound differs by more than 25 ms, so every read keeps its server-side budget. Before, each bounded read had its own BEGIN; SET LOCAL; read; COMMIT. A failed read rolls back the transaction, and reads it aborted run again in a new transaction. A lost connection, a pool with no long-hold capacity, or PGLite all fall back to the per-read path. Session reads are prepared statements unless the pool is a transaction pooler.
  • Tests:
  • persistence-git-coalescing-5530.slow.test.ts and its Postgres twin add two cases. A write behind six full groups, sent while one is committing, must publish within the wait with at most the in-flight group ahead of it; this fails on base on both engines. A write that finds the worktree locked is requeued as writer_busy with no claim phase.
  • persistence-bounded-read-session.test.ts has 7 cases: sequencing, bound refresh, rollback and retry, joining a run's session, prepared reads, the PGLite and no-permit paths, a real lock wait that ends at its bound with nothing left running, and a re-sync. On the re-sync, base runs 101 bounded transactions for 8 files and the branch runs 16.
  • managed-sync-foreground-priority.test.ts (Postgres arm) flake fixed. "a stream of writes from another process" now boots and connects its writer process before the drain starts. Before, the drain's lead depended on how fast a cold process started, so a slow runner could commit most groups before the first write. Forcing a 600 ms boot fails the old test 4 of 4 times and passes the new one 4 of 4.
  • Crash robot: 600 s on each engine, every seam, with PgBouncer and pooler_disconnect on Postgres.
Source: README.md, updated 2026-10-10