Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.316.0 chore(release): restamp onto master v0.60.315.0

garrytan25ba0ed93378
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 7b5b4c24f1..1b23c82c3c 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.315.0",
+ "version": "0.60.316.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 58d5c6ce40..0824800f1c 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.315.0",
+ "version": "0.60.316.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 a0220b5d17..bec7db3ba2 100644
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@ -1,4 +1,4 @@
-<!-- gbrain-runbook-stamp: 0.60.315.0 -->
+<!-- gbrain-runbook-stamp: 0.60.316.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 caf8a4ed4f..7a80ec5f6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,30 @@ 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.316.0] - 2026-10-19
+
+**A commit is searchable within about a second whenever any gbrain process is running, and a sync request is never dropped.** Before this, only `gbrain serve` watched for commits: managed sources only, after a 3 s debounce, and a wake could be lost. Classic sources never synced on commit, a lone `gbrain jobs work` took 5 s, and the autopilot daemon waited for its next wall-clock tick (up to 7 minutes). `sync.on_commit` is still off by default.
+
+### What changed
+
+| Situation (10k pages, n=10) | Before (p50 / p95) | Now (p50 / p95) |
+|---|---|---|
+| `gbrain serve`, managed source, commit to search | 3.7 / 4.1 s | 0.6–0.7 / 0.9–1.1 s |
+| `gbrain serve`, classic source | never synced | 0.6–1.1 / 0.7–1.1 s |
+| only `gbrain jobs work` running (Postgres) | 5.0–5.3 / 5.1–5.5 s | 0.6–0.7 / 0.8 s |
+| only the autopilot daemon (classic, on_commit off) | 266 / 406 s | 84 / 138 s |
+
+The other changes:
+- **One commit notifier per host.** It runs in `gbrain serve` (stdio and http), `gbrain jobs work` and the autopilot daemon, with one owner per host and brain. It watches classic sources this host synced as well as managed ones, and starts a sync as soon as the checkout is quiet.
+- **Retries instead of drops.** A failed or refused sync is retried at 5 s, 15 s, 1 min and 5 min, then reported as `notifier_stalled` with the fix and a trace file.
+- **Requests are recorded first.** `gbrain sync trigger`, webhooks and busy delegated syncs record a wanted marker before they run. Whoever drains the source re-checks it afterwards, so a request is never lost to a sync already running. `sync trigger --json` reports queued, coalesced or nudged, and adds a `no_resident` notice with the fix when no resident runs. A managed push webhook answers 409 `refresh_required`.
+- **HEAD-driven autopilot.** The daemon dispatches when a checkout's HEAD moves past the last synced commit, with the wall-clock rule kept as a backstop. Its `--status` grades from a new heartbeat sidecar (#7003).
+- **Worker boot.** On Postgres, `gbrain jobs work` starts the persistence consumer at boot through the existing election (#7002). An idle worker wakes on a queued sync, using LISTEN on a direct session and a 1 s poll behind a pooler.
+- **Visibility.** `gbrain sync status` and the new doctor check `commit_notifier` name the resident that syncs each source, or say none is running and give the fix. Once a resident has run, or `sync.on_commit` is on, search and query responses carry a per-source `freshness` entry (current, behind, syncing, unknown or not_monitored).
+- **Upgrade.** Migration v262 adds `sync_wanted_markers`, `sync_notifier_sources` and `sync_notifier_leases`.
+
+Docs: `docs/guides/on-commit-sync.md`. `GBRAIN_NOTIFIER=0` turns the notifier off for a process.
+
## [0.60.315.0] - 2026-10-19
**Large pages stored in segments get the last of their hardening: a repair for canonical files older versions left holding withdrawn rows, a bounded retry budget for writes the database interrupts under load, and purges that leave no segment text behind.** Brains that ran a gbrain older than v0.60.299.0 with `pages.segmented_storage` on can now find and rewrite canonical files that still hold a withdrawn or purged row with `gbrain repair segmented-mirror`, preview first. A write the database cancels at a statement timeout, or that the owner cancels past the publication ceiling, now retries with backoff against its own budget instead of failing at the second interruption or retrying without limit. Upgrading adds two columns to `persistence_requests` (migration v261, no rewrite of existing rows). Nothing runs on upgrade.
diff --git a/VERSION b/VERSION
index 3e2f2ae880..6de79419fd 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.315.0
+0.60.316.0
diff --git a/openclaw.plugin.json b/openclaw.plugin.json
index ce90cb6a3f..86c3470c69 100644
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@ -1,7 +1,7 @@
{
"id": "gbrain-context-engine",
"name": "gbrain",
- "version": "0.60.315.0",
+ "version": "0.60.316.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 dca4c84142..95b0be72de 100644
--- a/package.json
+++ b/package.json
@@ -241,7 +241,7 @@
"bun": ">=1.4.0"
},
"license": "MIT",
- "version": "0.60.315.0",
+ "version": "0.60.316.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 79ab88983b..b732727ac2 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.315.0",
+ "version": "0.60.316.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 585d6e195a..6d0343f03c 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.315.0",
+ "version": "0.60.316.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 3d6c420e4f..1c8a245f37 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.315.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.316.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 83e5b87241..85e4c716de 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.315.0",
+ "version": "0.60.316.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 474c84d385..bec1fde79e 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.315.0",
+ "version": "0.60.316.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 263d902e60..5faddcdb5d 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.315.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.316.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 a8021ab4fd..b71403058e 100644
--- a/plugin/README.md
+++ b/plugin/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.315.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.316.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/src/core/schema-migrations/latest.generated.ts b/src/core/schema-migrations/latest.generated.ts
index e10967188f..59b7090582 100644
--- a/src/core/schema-migrations/latest.generated.ts
+++ b/src/core/schema-migrations/latest.generated.ts
@@ -4,4 +4,4 @@
// The highest schema migration version (migrate.ts LATEST_VERSION), importable without
// loading the migrations themselves.
-export const LATEST_SCHEMA_VERSION = 261;
+export const LATEST_SCHEMA_VERSION = 262;
diff --git a/src/core/schema-migrations/registry.generated.ts b/src/core/schema-migrations/registry.generated.ts
index 6ab015000d..a86757a665 100644
--- a/src/core/schema-migrations/registry.generated.ts
+++ b/src/core/schema-migrations/registry.generated.ts
@@ -262,6 +262,7 @@ import { v258 } from './v258-pages-links-extract-failure.ts';
import { v259 } from './v259-ingest-log-marked-index.ts';
import { v260 } from './v260-segmented-page-size-index.ts';
import { v261 } from './v261-persistence-request-transient-retries.ts';
+import { v262 } from './v262-commit-notifier.ts';
// Array order is historical (see HISTORICAL_ARRAY_ORDER in the generator); the
// runner sorts by version before applying.
@@ -522,4 +523,5 @@ export const MIGRATIONS: Migration[] = [
v259,
v260,
v261,
+ v262,
];
diff --git a/src/core/schema-migrations/v261-commit-notifier.ts b/src/core/schema-migrations/v262-commit-notifier.ts
similarity index 98%
rename from src/core/schema-migrations/v261-commit-notifier.ts
rename to src/core/schema-migrations/v262-commit-notifier.ts
index 75b5fad6f1..e5097f61ca 100644
--- a/src/core/schema-migrations/v261-commit-notifier.ts
+++ b/src/core/schema-migrations/v262-commit-notifier.ts
@@ -18,8 +18,8 @@ import type { Migration } from './types.ts';
// and the coverage record the freshness notice reads (observed HEAD, time,
// detection mode, owner liveness). Written on change, never on every poll.
// DDL only, nothing to backfill: an absent row reads as "not monitored".
-export const v261: Migration = {
- version: 261,
+export const v262: Migration = {
+ version: 262,
name: 'commit_notifier',
idempotent: true,
sql: `
diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.md
index 452bc597cf..3cbf168cf0 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.315.0 -->
+<!-- gbrain-template-stamp: 0.60.316.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same
diff --git a/test/fixtures/goldens/migrations/records.json b/test/fixtures/goldens/migrations/records.json
index 3066678fd9..3816c0a2da 100644
--- a/test/fixtures/goldens/migrations/records.json
+++ b/test/fixtures/goldens/migrations/records.json
@@ -1,6 +1,6 @@
{
"golden": {
- "count": 256,
+ "count": 257,
"gaps": [
17,
18,
@@ -69,7 +69,7 @@
"tableRows": "906d2413b13d76a06d5910885e47ed5c544be4ff3a2266e83146715721b24270",
"verifyProjectionStatistics": "0d231b04ecfbc5a4109d6fca9567bf4e8c9e9db6c3fbbb35212e026579ed6f67"
},
- "latest": 261,
+ "latest": 262,
"records": [
{
"handler": {
@@ -4108,6 +4108,19 @@
"transaction": "absent",
"verify": "absent",
"version": 261
+ },
+ {
+ "handler": "absent",
+ "idempotent": true,
+ "name": "commit_notifier",
+ "sql": {
+ "length": 1716,
+ "sha256": "92b10ec00767e181fc76c3e945a9085e37c16f06ba6235512ae6b55c409ba695"
+ },
+ "sqlFor": "absent",
+ "transaction": "absent",
+ "verify": "absent",
+ "version": 262
}
],
"versions": [
@@ -4366,7 +4379,8 @@
258,
259,
260,
- 261
+ 261,
+ 262
]
},
"normalizer": "migrations-record-v1"