Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: restore head schema after the v66 replay; pre-v0.18 fixture drops v230 triggers (nightly E2E + Heavy red)

garrytan056f97ffb559
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2422dfd979..e2bd0eab6a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,19 @@ 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.148.0] - 2026-10-10
+
+**The nightly E2E and Heavy Tests runs are green again.**
+
+Both failures came from this week's migrations meeting older tests, and gbrain itself behaves the same.
+
+- **E2E:** v225 drops `idx_chunks_embedding_null`, a duplicate of `content_chunks_stale_idx`. The invalid-index recovery test replays v66, which re-creates that index on a brain already at the latest version, and left it behind. The nightly shard runs files one after another on one database without replaying migrations, so `embed-stale-pagination`, several files later, found the duplicate. The recovery test now runs v225 again when it finishes, putting the schema back where the latest version leaves it.
+- **Heavy:** the Postgres upgrade test builds a pre-v0.18 brain by dropping `pages.source_id` from a current one. v230's trust-generation triggers depend on that column, so the drop failed. The fixture now drops those triggers first; the walk forward re-creates them when v230 runs again (checked: every trigger is back at the latest version).
+
+## To take advantage of v0.60.148.0
+
+`gbrain upgrade` installs the binary. There are no schema migrations.
+
## [0.60.147.0] - 2026-10-10
**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.**
diff --git a/test/e2e/migration-drop-invalid-concurrent-index.test.ts b/test/e2e/migration-drop-invalid-concurrent-index.test.ts
index 24b74a3fd8..c95b5437cd 100644
--- a/test/e2e/migration-drop-invalid-concurrent-index.test.ts
+++ b/test/e2e/migration-drop-invalid-concurrent-index.test.ts
@@ -70,7 +70,11 @@ describeE2E('migration invalid-remnant recovery (#1178)', () => {
await runMigrationsUpTo(getEngine(), LATEST_VERSION);
}, 30_000);
+ // The v66 cases leave idx_chunks_embedding_null on a head-version brain, but v225 drops it as
+ // a duplicate of content_chunks_stale_idx. The next file on this shared database starts warm at
+ // head without replaying migrations, so put the schema back where head leaves it.
afterAll(async () => {
+ await MIGRATIONS.find(m => m.version === 225)!.handler!(getEngine());
await teardownDB();
});
diff --git a/tests/heavy/fixtures/down-mutate-pre-v0.18.sql b/tests/heavy/fixtures/down-mutate-pre-v0.18.sql
index 743d9f36fc..063d60842b 100644
--- a/tests/heavy/fixtures/down-mutate-pre-v0.18.sql
+++ b/tests/heavy/fixtures/down-mutate-pre-v0.18.sql
@@ -18,6 +18,18 @@ BEGIN;
ALTER TABLE pages DROP CONSTRAINT IF EXISTS pages_source_slug_key;
ALTER TABLE pages ADD CONSTRAINT pages_slug_key UNIQUE (slug);
+-- v230's trust-generation triggers fire on pages.source_id changes, so they
+-- depend on the column. Pre-v0.18 brains had no such triggers; the walk
+-- forward re-creates them when v230 runs again.
+DO $$
+DECLARE r record;
+BEGIN
+ FOR r IN SELECT tgname, tgrelid::regclass AS tbl FROM pg_trigger
+ WHERE tgname LIKE 'trust\_generation\_%' AND NOT tgisinternal LOOP
+ EXECUTE format('DROP TRIGGER %I ON %s', r.tgname, r.tbl);
+ END LOOP;
+END $$;
+
DROP INDEX IF EXISTS idx_pages_source_id;
ALTER TABLE pages DROP COLUMN IF EXISTS source_id;