Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/sync-feeder-fast-writes' into capy/6278-preparation-deadline

garrytan1204172815a4
diff --cc src/core/persistence/sync-waivers.ts
index 7d13731af5,6e00186386..edc18ed0a9
--- a/src/core/persistence/sync-waivers.ts
+++ b/src/core/persistence/sync-waivers.ts
@@@ -132,15 -76,14 +132,14 @@@ export async function screenWaiver(engi
const intent = pending.intent;
if (intent.kind === 'managed_sync_delete') {
if (intent.unownedDeletion || intent.renameFrom || intent.rawHash !== null || typeof intent.path !== 'string' || typeof intent.sourcePath !== 'string') return null;
- // The authority check runs beside the snapshot read; its refusal counts only for an entry that would be waived.
- const [snapshot, denied] = await Promise.all([engine.readPageSnapshot(pending.slug, { sourceId: cursor.sourceId, includeDeleted: true }), authorityRefusal(engine, cursor, pending)]);
+ const snapshot = await engine.readPageSnapshot(pending.slug, { sourceId: cursor.sourceId, includeDeleted: true });
if (!softDeletedAt(snapshot, pending)) return null;
- if (denied) throw denied.error;
+ await validateSyncAuthority(engine, cursor.authority, pending.slug);
return { kind: 'delete', kernel: [] };
}
- const [kernel, denied] = await Promise.all([unchangedSyncImport(engine, cursor, pending, config, signal), authorityRefusal(engine, cursor, pending)]);
- const kernel = await unchangedSyncImport(engine, cursor, pending, config);
++ const kernel = await unchangedSyncImport(engine, cursor, pending, config, signal);
if (!kernel) return null;
- if (denied) throw denied.error;
+ await validateSyncAuthority(engine, cursor.authority, pending.slug);
return { kind: 'import', kernel };
}