Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge commit 'd93642450' into capy/6712-pr4b-core

garrytanf45fb9894183
diff --cc src/core/persistence/sync-pass-run.ts
index 87732e2149,df2dcee047..c5f167b59e
--- a/src/core/persistence/sync-pass-run.ts
+++ b/src/core/persistence/sync-pass-run.ts
@@@ -508,11 -518,9 +521,11 @@@ export async function runSyncPass(engin
assertActive();
value.telemetry.round = round;
input.onLevelRead(head);
+ // The previous round's level is done with: dropped before the next one is read, so a large source holds one level, not two.
+ lastLevel = null;
const level = await readShadowLevel(engine, { sourceId, context, workingTree: mode === 'working',
pass: { noSchemaPack: processingOptions.noSchemaPack, episodeFullId: episode?.full_id ?? null, retryConsumed: round > 1 ? retryConsumed : undefined, exclude: opts.exclude, includeHidden: opts.includeHidden, strategy: opts.strategy, bootstrap: markersOwed(),
- cache: levelCache } });
- slugMode: value.obligations.slug_mode } });
++ slugMode: value.obligations.slug_mode, cache: levelCache } });
assertActive();
if (!level) throw new Error(`Source ${sourceId} became a company-brain source during its sync pass.`);
// Each round reads the level at the current HEAD, and its batches freeze that commit (a commit landing mid-pass is
diff --cc src/core/persistence/sync-pass.ts
index 3def1e3fd0,ea28494977..688604a3f4
--- a/src/core/persistence/sync-pass.ts
+++ b/src/core/persistence/sync-pass.ts
@@@ -59,8 -58,8 +59,10 @@@ export interface PassLevelInput
bootstrap?: boolean;
/** The pass imports without the schema pack (`no-schema-pack` or an episode carrying it): its parser expects no pack. */
noSchemaPack?: boolean;
+ /** #6694: the slug-root mode an unstamped pass of this source admitted under (`obligations.slug_mode`); a subdirectory source reads under it, not its pin. */
+ slugMode?: 'git-root' | 'source-root';
+ /** The pass's own cache (it dies with the pass): the eligible tree of the commit and selection its last round read. */
+ cache?: PassLevelCache;
}
/** PGLite's keyset page size (design v3.2 §2.1); Postgres reads `I⋈P` in one statement of its snapshot. */
const PGLITE_KEYSET_ROWS = 2_000;