Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(changelog): W-P2 community Postgres/migration/sync-cost wave
garrytanc3ebd59e6ec9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8cadb056cf..d6910f30e0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,23 @@ credits are retained; no result has been reassigned to another provider. Originaidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [Unreleased]++**Eight Postgres, migration and sync-cost fixes from community bug reports, each reproduced on master and rewritten.** A Postgres pool that finishes opening after a reconnect is closed instead of leaking. A managed-sync preparation read gives up at its deadline instead of waiting on a saturated pool. `gbrain serve` stops rewriting an unchanged type-cache file every few seconds. The sync cost check no longer scans every chunk when nothing has drifted. Adoption recovery reads git history before it takes row locks. Sync writes a page's timeline rows in one transaction. A failed migration 0.53.0 export can retry with a new root, and an init retried after an upgrade resumes its first skills publication.++### Itemized changes++- `src/core/connection-manager.ts`: `disconnect()` and `retire()` bump an epoch; a direct or session-fallback pool that finishes initializing after either is ended (bounded) and its waiters get `CONNECTION_ENDED`, and a late failure starts no retry. Reported and first fixed by @javieraldape (#8478, supersedes #8569).+- `src/core/postgres-engine/bounded-statement.ts`, `src/core/read-deadline.ts`, `src/core/persistence/bounded-reads.ts`: a deadline read refuses once expired, reserves with an abort signal at the deadline, and discards a connection whose COMMIT is still pending; the refusal surfaces as `preparation_deadline`. Reported and first fixed by @javieraldape (#8651, supersedes #8698).+- `src/core/pg-type-cache.ts`: re-describing a statement with the same parameter types no longer marks the cache dirty. Reported and first fixed by @Masashi-Ono0611 (#8647, supersedes #8657).+- `src/core/engine-sql/chunks.ts`: with a signature, `sumStaleChunkChars` sums disjoint unembedded and drifted arms through UNION ALL, so the partial stale index serves the common case (measured 100 ms to 12 ms on a 200k-chunk fixture with no drift); totals are unchanged. Reported and first fixed by @Masashi-Ono0611 (#8811, supersedes #8813).+- `src/core/persistence/coordinator.ts`, `src/core/persistence/local-edit-adoption.ts`: adoption recovery gathers its landed-commit proof before the recovery transaction and rechecks HEAD and the request's pin under the row lock, staying `recovery_required` on any change. Reported and first fixed by @javieraldape (#8869, supersedes #8914).+- `src/commands/extract.ts`: sync's inline timeline extraction writes each page's rows through one batch projection (same trust gate and dedup), falls back to row-by-row only when the batch fails, and counts rows actually inserted. Reported and first fixed by @troyhoffman-oss (supersedes #6805).+- `src/core/shared-skills/migration-export.ts`: an exported or inventory-stage checkpoint with no bound source and no started topology claim can move to a new root, restarting at inventory with a fresh request; a bound or claimed checkpoint still refuses. Reported and first fixed by @Masashi-Ono0611 (#8528, supersedes #8628).+- `src/core/shared-skills/setup.ts`: `installPackagedSharedSkills` resumes the caller's open or committed default-pack publication in the same source incarnation instead of submitting a second one. Reported and first fixed by @javieraldape (#8453, supersedes #8493).+- Docs: key-files entries. `scripts/module-size-limits.tsv` (extract.ts), `scripts/structural-suites.tsv`.+- Tests: `test/connection-manager.serial.test.ts`, `test/e2e/engine-open-postgres.test.ts`, `test/postgres-deadline-read.test.ts`, `test/e2e/persistence-preparation-pool-wait-postgres.test.ts`, `test/pg-type-cache.test.ts`, `test/sum-stale-chunk-chars-8811.test.ts` (PGLite and Postgres), `test/adopt-local-edit.test.ts`, `test/extract-timeline-for-slugs-batch.test.ts`, `test/shared-skills-export.serial.test.ts`, `test/shared-skills-packaged-key-7734.test.ts`.+## [0.60.620.0] - 2026-11-09**A diverged managed checkout now publishes its local commits on refresh by default when Git durability is on, after a secret scan of those commits.** Commits a script made with plain `git commit` in a managed checkout used to strand there whenever the remote moved: every `gbrain sources refresh` refused `refresh_diverged` and asked the user, unless `sources.refresh_publish_diverged` was set to `true`. With the setting unset, a worktree whose Git durability is on (`gbrain sources writer git-durability <source> --enable`, or the legacy hook) now publishes them itself: the local commits merged with the upstream in memory, never a rebase or force-push, then the fast-forward. The publish child scans, under its publish lock and for the exact commits it pushes, what they add: commit messages, added lines (including a value a later commit removed) and merge-commit conflict resolutions. A value that looks like a secret, added text too large to scan, or a commit that changes `.gbrain-scan-allow` or a `.gitattributes` refuses the new `publish_secret_found` naming the file, line, rule and commit, never the value, with nothing pushed; commits the scan cannot read in full refuse `publish_scan_unreadable` instead. The rewritten-upstream refusal and the `--expect-remote` bound are unchanged. `false` turns it off; `true` still publishes with durability off.