Summary
Two related gaps affect long-term sync reliability:
- Nav title changes do not update Notion page titles on sync (content/tags update only).
rebuild_state_from_wiki matches pages by title under parent, which breaks when titles collide or change.
Problems
- User renames a nav entry (e.g. section or page title); Notion still shows the old title.
rebuild_state_from_wiki may bind the wrong page when duplicate titles exist under the same parent.
- Title drift makes manual recovery and debugging harder.
Proposed solution
Title sync on update/create
- When syncing a leaf or section, if nav
title ≠ current Notion title property, PATCH the title property.
- Optional flag:
--sync-titles (default on when cheap).
Rebuild matching improvements
- Prefer stable keys when available: prior state
id, stored URL, or optional frontmatter notion_page_id.
- Fall back to title+parent matching with warnings on ambiguity.
- Log
ambiguous match when multiple Notion pages share title under same parent.
Optional write-back
- After create/sync, optionally write
notion_url to frontmatter or a sidecar field (config-gated).
Acceptance criteria
Related
- Structure reconciliation (section pages need title sync too)
- Git rename state migration (stable id mapping)
Summary
Two related gaps affect long-term sync reliability:
rebuild_state_from_wikimatches pages by title under parent, which breaks when titles collide or change.Problems
rebuild_state_from_wikimay bind the wrong page when duplicate titles exist under the same parent.Proposed solution
Title sync on update/create
title≠ current Notion title property, PATCH the title property.--sync-titles(default on when cheap).Rebuild matching improvements
id, stored URL, or optional frontmatternotion_page_id.ambiguous matchwhen multiple Notion pages share title under same parent.Optional write-back
notion_urlto frontmatter or a sidecar field (config-gated).Acceptance criteria
Related