Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(sync): renaming a page is a file move plus sync; put_page at a new slug deduplicates (#5915)
garrytane009b31d48d2
diff --git a/docs/guides/live-sync.md b/docs/guides/live-sync.mdindex b30eac05a9..72f52b28b8 100644--- a/docs/guides/live-sync.md+++ b/docs/guides/live-sync.md@@ -295,6 +295,26 @@ agent runs `gbrain config set sync.include_hidden '.github/'`.Everything else is ordinary synced content — including `ops/` (the bundleddaily-task-manager skill files its canonical page under `ops/tasks`).+### Renaming a page++A page's slug is its file path, so a rename is a file move (#5915). In the+source's checkout, `git mv old/path.md new/path.md`, commit, and run+`gbrain sync --source <id>` (`--no-pull` on a managed source). Sync pairs the+vanished origin with the new file through the page's own origin and+`frontmatter.id`, so the move is imported onto the same page row: its links,+facts, timeline and version history survive, and nothing is deleted and+re-created. On a managed source the import is prepared against the moved page+and refuses `revision_conflict` if that page changed after the sync admitted+it; the Git projection is the sync's own commit. Keep `frontmatter.id` as it+is; a changed id is a different page.++`put_page` at a new slug is not a rename. A content-only write cannot prove the+old file is gone, so a create-only `put_page` whose `frontmatter.id` and+content match an existing page resolves to that page (`duplicate`: the receipt+names the existing slug), and the same id with different content indexes both+pages (`shared_id`). There is no `rename_page` operation; a write-side rename+would need the moved file as evidence, which is what the sync route provides.+### Sync is Idempotent — and ResumableConcurrent runs are safe. Two syncs on the same commit no-op because content