Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(sync): the worker's capacityPreflight drain control passes the remote option allowlist (#6696 A x #6706)

garrytand13f4ca7021b
diff --git a/src/core/persistence/sync-authority.ts b/src/core/persistence/sync-authority.ts
index b3b5136cdc..1493c719db 100644
--- a/src/core/persistence/sync-authority.ts
+++ b/src/core/persistence/sync-authority.ts
@@ -129,7 +129,7 @@ export function validateManagedSyncOptions(opts: SyncOpts): void {
if (current?.kind !== 'remote_generic') return;
// #6706: the worker's own drain controls (never read from a remote job's data) bound the run; they cannot widen what it writes.
const allowed = new Set(['repoPath','sourceId','noPull','noEmbed','noExtract','explicitProcessing','signal','concurrency','onProgress','auto_embed_backfill',
- 'drain','deadlineAtMs','drainStartedAt','bulk','lanes']);
+ 'drain','deadlineAtMs','drainStartedAt','bulk','lanes','capacityPreflight']);
if (current.grant.jobName !== 'sync' || opts.repoPath !== current.grant.canonicalRoot || opts.sourceId !== current.grant.sourceId ||
opts.noPull !== true || opts.noEmbed !== true || opts.noExtract !== true ||
(opts.drain !== undefined && opts.drain !== true) || (opts.lanes !== undefined && opts.lanes !== 1) ||