Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

large pages switch-on: pin the writer floor to VERSION until the stamp; doc says how to hold the switch off on an undetected classic brain

garrytan3c0e5761d8f5
diff --git a/docs/guides/memory-boundaries.md b/docs/guides/memory-boundaries.md
index 5e94ef5127..f50390ecd1 100644
--- a/docs/guides/memory-boundaries.md
+++ b/docs/guides/memory-boundaries.md
@@ -153,14 +153,17 @@ files that is only the file at its own place in the checkout, which gbrain
never rewrites; a database-only source takes it by `gbrain import`.
The switch stays off while an older gbrain writes to the same brain: a
-writer older than the release that turned it on, or one that stamps no
-version, that admitted or published a managed write in the last 7 days keeps
-new pages inline, even when the setting is `on`. `gbrain doctor` check
-`segmented_storage` shows the configured and effective value and names each
-blocking host by UUID. Run `gbrain upgrade` there; the hold clears 7 days
-after that writer's last write. An older binary that writes without managed
-persistence (a classic brain shared by several hosts) is not detected, so
-upgrade every host before writing pages over 1 MiB.
+gbrain older than the release that turned it on by default (v0.60.290.0
+included), or one that stamps no version, that in the last 7 days admitted or
+published a managed write, logged an import, sync or connector run, or ran a
+resident process keeps new pages inline, even when the setting is `on`.
+`gbrain doctor` check `segmented_storage` shows the configured and effective
+value and names each blocking host by UUID. Run `gbrain upgrade` there; the
+hold clears 7 days after that writer's last write. An older binary's
+single-page write on a brain without managed persistence (a classic brain
+shared by several hosts) is not detected: upgrade every host that writes to
+such a brain, or run `gbrain config set pages.segmented_storage off` until
+they are upgraded.
<a id="segmented-searchable"></a>
**When a segmented write is searchable.** The receipt of a write that stores a
diff --git a/test/large-pages/segmented-switch.test.ts b/test/large-pages/segmented-switch.test.ts
index 4ad6f5a420..d7fa7eb98d 100644
--- a/test/large-pages/segmented-switch.test.ts
+++ b/test/large-pages/segmented-switch.test.ts
@@ -43,10 +43,10 @@ async function storage(engine: BrainEngine, slug: string): Promise<string | unde
return (await engine.executeRaw<{ body_storage: string }>('SELECT body_storage FROM pages WHERE slug=$1', [slug]))[0]?.body_storage;
}
-test('SEGMENTED_WRITER_FLOOR is the release of the switch-on BEHAVIOR_CHANGES row once stamped, and never above this build', () => {
+test('SEGMENTED_WRITER_FLOOR is this build\'s VERSION until the stamp, then the release of the switch-on BEHAVIOR_CHANGES row, and never above this build', () => {
const row = BEHAVIOR_CHANGES.find(c => typeof c.text === 'string' && c.text.startsWith('Pages over 1 MiB are now stored in segments'));
expect(row).toBeDefined();
- if (row!.since !== 'TBD') expect(row!.since).toBe(SEGMENTED_WRITER_FLOOR);
+ expect(row!.since === 'TBD' ? VERSION : row!.since).toBe(SEGMENTED_WRITER_FLOOR);
expect(compareWriterVersions(SEGMENTED_WRITER_FLOOR, VERSION)).toBeLessThanOrEqual(0);
});