Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.186.0 chore(release): restamp onto master v0.60.185.0

garrytan4767a503bcbb
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 41eef9750b..c6c4505cb3 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 4c96b38257..3f93362861 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/BOOTSTRAP_FOR_AGENTS.md b/BOOTSTRAP_FOR_AGENTS.md
index e977c04c42..c7ef7615fb 100644
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@ -1,4 +1,4 @@
-<!-- gbrain-runbook-stamp: 0.60.185.0 -->
+<!-- gbrain-runbook-stamp: 0.60.186.0 -->
<!-- This stamp must equal the VERSION file at every release; CI enforces it
(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it to
the installed binary and warns on skew. -->
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d6da2a2361..cfa808e487 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,26 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.186.0] - 2026-10-12
+
+**`gbrain serve` on a Supabase transaction pooler (:6543) no longer wedges. Answers stop landing on the wrong statement, and a persistence owner that needs a restart says so in `/health?deep=1` (#6543).** The vendored postgres driver sent several statements down one connection without waiting for each answer (pipelining). Supavisor's transaction mode can't carry pipelined statements across transaction boundaries. On a local Supavisor 2.5.1, 8 workers on a pool of 3 for 20 s gave 13 to 22 statements another statement's rows, plus connections that hung until the in-flight watchdog fired at 330 s. With pipelining off: 6078 ok, 0 errors. The two `pg_statement_build_failed UNDEFINED_VALUE` lines in the report were symptoms: each statement bound a column from a row that belonged to another statement. Three driver defects made it worse, and each is fixed here. Same-day mitigation for an older install: `PGMAX_PIPELINE=0` in serve's environment.
+
+### Itemized changes
+
+- **No pipelining on transaction-pooler URLs.** Read-side pools (module, engine instance, connection manager) default to `max_pipeline: 0` when the URL is on port 6543 or carries `?prepare=false`, or when `GBRAIN_PREPARE=0`. `resolveReadPoolPipeline` reads the URL itself, so `GBRAIN_PREPARE=1` can't hide a 6543 URL. Your explicit `?max_pipeline=` or a non-empty `PGMAX_PIPELINE` still wins. Direct connections and the Supabase session pooler on :5432 keep the driver default. PgBouncer transaction mode carries pipelining correctly. Turning it off measured no cost there. A new PgBouncer E2E pins `?max_pipeline=100` so pipelined-through-a-pooler coverage stays.
+- **Driver: a dropped connection's error no longer poisons its replacement.** `closed()` now clears the saved error, result and row state on every close, not only during startup. Before, the next connection's first statement got the dead socket's `57P01` (direct) or `XX000 DbHandler exited` (Supavisor).
+- **Driver: a statement that fails to build respects the pipeline limit.** Before, the connection always reported itself ready, so statements were sent behind the failed one even with `max_pipeline: 0`. `begin`'s `onexecute` runs once, after a successful build.
+- **Driver: `UNDEFINED_VALUE` names the parameter.** The `pg_statement_build_failed` warn line now prints `param=$n`, and its text says that on a transaction pooler a build failure usually means a misrouted row. Every driver edit goes through `patches/[email protected]`. `test/postgres-driver-vendor.test.ts` checks all three vendored copies offline.
+- **`/health?deep=1` stays report-only, with stable codes.** Each 503 carries `code`, `fix` and `docs`:
+ - `persistence_restart_required` comes from the in-process consumer state and is checked before the pooled probe.
+ - `pool_inflight_over_budget` covers a statement older than the pool budget.
+
+ A `transport` block, read once at startup, shows `prepare`, `max_pipeline` and why, the server `statement_timeout` (`session_timeouts_not_applied` with the `ALTER ROLE` fix when the pooler drops it), and the backend `application_name` when it is Supavisor. Serve logs the same line at startup. The body never carries request ids, hostnames or credentials.
+- **Opt-in self-exit: `GBRAIN_SERVE_RESTART_REQUIRED_EXIT_SECONDS=<n>` (n >= 120).** Serve exits with code 69 (`serve_unhealthy_exit`) after `restart_required` has held continuously for n seconds, so a `Restart=always` supervisor recovers it. The hold resets when the condition clears. Cleanup is bounded at 5 s. After 3 self-exits within an hour (recorded in `serve-self-exit.json` under the gbrain home), serve stops exiting, logs `serve_self_exit_suppressed`, and deep health asks for a manual restart. Off by default.
+- **`--no-delegate` / `GBRAIN_SYNC_NO_DELEGATE=1` runs the sync's own consumer.** `forceOwnConsumer()` had no production caller, so with `persistence.single_consumer` on, an opted-out sync waited behind a wedged serve. Opt-out, a serve that doesn't answer its IPC socket, and a genuinely stale serve now force the sync's own consumer. A healthy current serve with delegation disabled (`unsupported_kind`, `unsupported_flag`, `kill_switch`) does not. Fallback lines stop claiming "uses its own consumer" on rungs that wait behind serve.
+- **Read-only misroute audit: `scripts/audit-pooler-misroute.ts`.** Self-contained, so it runs from a v0.60.180.0 global install. It refuses a transaction-pooler URL and takes an explicit `--url` (direct or session pooler). Each bounded batch is one `REPEATABLE READ READ ONLY` transaction on a single connection. It reports `verified_ok`, `mismatch` and `unknown`, and rows changed during the audit or with missing history count as `unknown`, never as clean. Guide: `docs/guides/pooler-misroute-audit.md`. Any corrective write is a separate, approved step.
+- **Corrected docs.** The claim that a server-side `statement_timeout` bounds every statement is corrected in `db.ts`, `consumer.ts`, `docs/ENGINES.md` and the error registry, since Supavisor drops the startup parameter. `docs/architecture/postgres-cancellation.md`, `docs/mcp/DEPLOY.md`, `docs/guides/exit-codes.md` and the error-code docs are updated. `GBRAIN_SUPAVISOR_URL` passes through `scripts/run-e2e.sh`.
+
## [0.60.185.0] - 2026-10-12
**Agents that share one brain checkout no longer stash, revert or ship each other's half-written files when they commit and push (#6530).** Skills and the committed `scripts/brain-commit-push.sh` used to run `git pull --rebase --autostash` and repo-wide adds in the shared working tree. A rebase that crashed or conflicted left `.git/rebase-merge` holding another agent's edits in its autostash, and a later "repair" could silently revert them. New `gbrain git commit-push` commits only the paths you name, merges a rejected push with the remote in memory, and moves the checkout fast-forward only. Run `gbrain sources harden <id>` once per hardened brain to switch its helper and post-commit hook to it. Brain history now gets merge commits instead of rebased linear history. Guide: `docs/guides/shared-checkout-git.md`.
diff --git a/VERSION b/VERSION
index e11ceeff85..0438f242a0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.185.0
+0.60.186.0
diff --git a/openclaw.plugin.json b/openclaw.plugin.json
index 799179cdaf..8546a50445 100644
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@ -1,7 +1,7 @@
{
"id": "gbrain-context-engine",
"name": "gbrain",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Personal knowledge brain with Postgres + pgvector hybrid search",
"family": "bundle-plugin",
"kind": "context-engine",
diff --git a/package.json b/package.json
index 5a685e65ef..fd37be2102 100644
--- a/package.json
+++ b/package.json
@@ -233,7 +233,7 @@
"bun": ">=1.4.0"
},
"license": "MIT",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"overrides": {
"@ai-sdk/provider-utils": "4.0.56",
"@hono/node-server": "^2.0.5",
diff --git a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
index a133987489..80fc79f22e 100644
--- a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
index f7d7982aeb..b11bd49f68 100644
--- a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/README.md b/plugin-variants/gbrain-coding/README.md
index e3baa7bf81..8da8716bce 100644
--- a/plugin-variants/gbrain-coding/README.md
+++ b/plugin-variants/gbrain-coding/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.185.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.186.0 -->
# gbrain-coding (generated persona variant — do not hand-edit)
Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant.
diff --git a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
index afdf07a1da..34f22f032f 100644
--- a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
index eb6713e9e0..4d052fd073 100644
--- a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.185.0",
+ "version": "0.60.186.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/README.md b/plugin-variants/gbrain-daily/README.md
index efea5358cd..f6fcd2ada3 100644
--- a/plugin-variants/gbrain-daily/README.md
+++ b/plugin-variants/gbrain-daily/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.185.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.186.0 -->
# gbrain-daily (generated persona variant — do not hand-edit)
Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant.
diff --git a/plugin/README.md b/plugin/README.md
index ff6ed68bcf..27934f5313 100644
--- a/plugin/README.md
+++ b/plugin/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.185.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.186.0 -->
# gbrain plugin skill tree (generated — do not hand-edit)
This tree is the curated skill set for the gbrain Codex and Claude Code
diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.md
index 545c86b1cb..4d17e4b0cb 100644
--- a/templates/bootstrap/template-repo/README.md
+++ b/templates/bootstrap/template-repo/README.md
@@ -1,6 +1,6 @@
# gbrain agent workspace — template
-<!-- gbrain-template-stamp: 0.60.185.0 -->
+<!-- gbrain-template-stamp: 0.60.186.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same