Skip to content

gbrain sync --skip-failed drops bare-markdown log files from the index #1433

@infiniteGameExp

Description

@infiniteGameExp

Filed via brain-janitor from Learning and Strategy/Wiki/reference/gbrain-known-bugs.md (bug #6).

  • Filed: 2026-05-24 (pending upstream filing — not yet posted)
  • Symptom: After running gbrain sync --skip-failed, a domain log.md that was previously indexed is silently removed from the gbrain page store. The sync output includes a single line Deleted un-syncable page: <slug> and proceeds. The on-disk file is untouched (all entries intact), but mcp__gbrain__get_page for that slug returns page_not_found and the page no longer surfaces in retrieval. Distinct from bug feat: GBrain v0.3.0 — contract-first architecture + ClawHub plugin #7 (createVersion) — that fails on edit, this one deletes on --skip-failed.
  • Root cause (suspected): the sync's --skip-failed parse-failure handler treats "no YAML frontmatter" as un-syncable rather than as bare-markdown-valid. Domain log.md files are valid per the vault schema (Append-only chronological record. Format: ## [YYYY-MM-DD] <op> | <subject>) and intentionally have no frontmatter — they are operational logs, not typed pages. The sync collapses two different conditions (genuinely malformed vs. valid-but-untyped) into the same deletion path.
  • India's encounter: Ran gbrain sync --skip-failed on 2026-05-24 after the [[phase-6-architecture-blind-spots-2026-05-23]] decision-log landed. Sync output: Deleted un-syncable page: learning-and-strategy/log. The file at Learning and Strategy/log.md (3755 bytes, 37 lines, two recent appends from the same session) was unchanged on disk but mcp__gbrain__get_page returned 404 for learning-and-strategy/log immediately after.
  • Workaround: None applied yet. Two options India can pick from:
    1. Add a minimal ---\ntype: log\nid: <slug>\n---\n frontmatter to every domain log.md so gbrain parses them as typed pages. Requires extending the schema with a log page type (or repurposing reference-list).
    2. Pin the affected log files in an ~/.gbrain/sync-exclude (if such a mechanism exists in this version) so sync ignores them entirely, preserving the bare-markdown convention.
  • Scope of impact: Only learning-and-strategy/log.md confirmed dropped (only modified log in this session — the file is what triggered the re-parse attempt). Other domain logs (Ninjacat/log.md, Tall Pines/log.md, IGE/log.md, etc.) are likely still indexed from earlier successful syncs, but will hit the same deletion path the next time they are edited and re-synced with --skip-failed. Vault root log.md is in the same risk class. Pattern is vault-wide; impact will surface incrementally as each log gets touched.
  • Status: Pending upstream filing. Filing will request --skip-failed distinguish between "parse error in YAML" (drop) and "no frontmatter at all" (treat as bare markdown, index with synthesized minimal metadata or leave unchanged) — the second case is intentional per vault conventions like Karpathy's, not an error to acknowledge-away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions