Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(persistence): the pending conversion push notice says nothing retries before the next page write (#7644, #7655)

garrytan8cc6bb30190e
diff --git a/src/core/persistence/git-conversion.ts b/src/core/persistence/git-conversion.ts
index fe925e5bd8..65646594f7 100644
--- a/src/core/persistence/git-conversion.ts
+++ b/src/core/persistence/git-conversion.ts
@@ -530,7 +530,7 @@ export async function applyGitConversion(engine: BrainEngine, sourceId: string,
async function pushConversion(engine: BrainEngine, context: ManagedSyncContext): Promise<ConversionPush> {
const { root } = context;
const pending = (code: string, why: string): ConversionPush => ({ state: 'pending', code,
- notice: `The conversion's door commits are committed locally, but their push did not land (${why}). The next page write's push sends them; to push now, run gbrain git commit-push --push-only --path ${root}.` });
+ notice: `The conversion's door commits are committed locally, but their push did not land (${why}). Nothing retries it until the next page write, whose push sends them; to push now, run gbrain git commit-push --push-only --path ${root}.` });
try {
if (!(await gitDurabilityPolicy(context.binding, root)).durable) return { state: 'skipped', reason: DURABILITY_NOT_ENABLED_REASON };
if (!(await gitRootAhead(root))) return { state: 'skipped', reason: 'nothing_to_push' };
diff --git a/test/git-canonical-conversion-progress.test.ts b/test/git-canonical-conversion-progress.test.ts
index fbe4ebf65a..3d4fe95958 100644
--- a/test/git-canonical-conversion-progress.test.ts
+++ b/test/git-canonical-conversion-progress.test.ts
@@ -82,7 +82,8 @@ for (const backend of testBackends()) describe('[' + backend + '] #7644: a conve
finally { process.stderr.write = write; console.log = log; _resetCliExitVerdictForTests(); process.exitCode = priorExitCode ?? 0; }
expect(JSON.parse(out.at(-1)!)).toMatchObject({ status: 'converted' });
const lines = err.join('').split('\n').filter(line => line.includes('"conversion_progress"')).map(line => JSON.parse(line));
- expect(lines.map(line => line.phase)).toEqual([...CONVERSION_PHASES]);
+ // A line at each change of phase; a phase longer than PROGRESS_EVERY_MS repeats its line on the interval.
+ expect(lines.map(line => line.phase).filter((phase, i, all) => phase !== all[i - 1])).toEqual([...CONVERSION_PHASES]);
expect(lines.at(-1)).toMatchObject({ event: 'conversion_progress', source_id: 'default', phase: 'strict_pass_2', groups_committed: 2 });
}, { databaseUrl, setup: bulkSetup }), 300_000);