Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(sync): the renamed-file source_changed refusal names the plain sync, not the deprecated --retry-failed (#6729)
garrytan56783bd29692
diff --git a/docs/guides/live-sync.md b/docs/guides/live-sync.mdindex 945cc3f79a..81e1cf76ad 100644--- a/docs/guides/live-sync.md+++ b/docs/guides/live-sync.md@@ -380,7 +380,7 @@ With `--working-tree`, the decision reads the files on disk and holds only forthe bytes it read. A renamed file edited before its page moves keeps nothing:classic sync fails that file and the next sync decides again, and a managedsync refuses `source_changed` and names-`gbrain sync --no-pull --retry-failed --working-tree --source <id>`. A managed sync refuses `page_identity_changed`+`gbrain sync --no-pull --working-tree --source <id>`. A managed sync refuses `page_identity_changed`(`rename_identity_conflict`) when a file would take over a page whose`frontmatter.id` differs from the file's own.diff --git a/src/core/persistence/sync-discovery.ts b/src/core/persistence/sync-discovery.tsindex 16ff1083c9..905000729d 100644--- a/src/core/persistence/sync-discovery.ts+++ b/src/core/persistence/sync-discovery.ts@@ -647,9 +647,9 @@ export function readSyncContent(discovery: SyncDiscovery, entry: SyncEntry): str`${entry.path} left the working tree of ${discovery.sourceId} between discovery and import, so nothing was imported from it. Run gbrain sync --no-pull --source ${discovery.sourceId} to rediscover the tree.`,{ fix: managedSyncFix(discovery.sourceId, 'A new discovery reads the working tree as it is now.') });if (entry.identityHead && identityHeadDigest(bytes) !== entry.identityHead) throw opError('source_changed', 'A renamed working-tree file changed after its page identity was confirmed.',- `${entry.path} changed in the working tree of ${discovery.sourceId} after sync confirmed it keeps the page of its rename, so nothing was imported from it and no identity moved. Run gbrain sync --no-pull --retry-failed --working-tree --source ${discovery.sourceId} to re-check it.`,+ `${entry.path} changed in the working tree of ${discovery.sourceId} after sync confirmed it keeps the page of its rename, so nothing was imported from it and no identity moved. Run gbrain sync --no-pull --working-tree --source ${discovery.sourceId} to re-check it.`,{ fix: { ...managedSyncFix(discovery.sourceId, 'A retry rediscovers the tree and re-checks the rename against the file as it is now.'),- argv: ['gbrain', 'sync', '--no-pull', '--retry-failed', '--working-tree', '--source', discovery.sourceId] } });+ argv: ['gbrain', 'sync', '--no-pull', '--working-tree', '--source', discovery.sourceId] } });return bytes.toString('utf8');}return syncGit(discovery.gitRoot, ['show', `${discovery.target}:${syncGitPath(discovery, entry.path)}`]);