fix(git-sync): screen non-page files out of PUSH (CRITICAL — review)
Self-review of phase 3 caught a data-corruption regression: nativeMeta always supplies the run's spaceId, so the planner's 'create-without-spaceId' skip — which had doubled as the only filter for non-page files — went dead. An ADDED .obsidian/*.json, attachment, or dotfile (committed to the vault, no .gitignore) would then be classified as a CREATE: a junk Docmost page, plus a gitmost_id frontmatter written INTO the file, corrupting it. Fix: isPageFile(path) — a .md file with NO dot-segment anywhere — and filter the diff to page files at the very top of computePushActions, BEFORE any classification, so non-page A/M/D/R are ignored (design §Адопция). 2 unit tests pin it (.obsidian/json, attachment, dotfile, dot-segment, .md dotfile all ignored; real pages still created). 614 engine tests green. Also: refreshed stale docmost:meta comments to gitmost_id (review SUGGESTION), and documented the deferred adoption frontmatter-preservation gap (review WARNING) in page-file.ts + the design doc (do NOT roll native onto a real vault with Obsidian properties until phase 4 round-trips them). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -122,6 +122,12 @@ Obsidian резолвит `[[Заметка]]` по **basename** (не по по
|
||||
пути (`parentFolderFile` folder-note-aware). CREATE пишет `gitmost_id` обратно;
|
||||
UPDATE шлёт чистое тело (без frontmatter) на обе стороны 3-way merge. (готово)
|
||||
4. Адопция голых файлов/папок (частично в фазе 3: файл без `gitmost_id` → create).
|
||||
ВАЖНО: тут же сохранить пользовательский frontmatter (Obsidian properties) при
|
||||
адопции — `parsePageFile` сейчас срезает ведущий frontmatter даже без
|
||||
`gitmost_id`, а write-back пишет только `gitmost_id`; нужно врезать `gitmost_id`
|
||||
в существующий frontmatter и сохранять остальные поля И при write-back, И при
|
||||
следующем pull (иначе pull перезатрёт). До этого native-формат НЕ катить на
|
||||
реальный Obsidian-волт с properties.
|
||||
5. Чистка: выпилить старый `docmost:meta` формат-код целиком.
|
||||
6. Ссылки: конвертер Docmost-mention ↔ `[[wikilink]]` + переписывание при retitle.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user