Skip to content

ENG-1857 Validate Obsidian importer with Roam-origin nodes#1225

Draft
sid597 wants to merge 1 commit into
eng-2019-extract-shared-cross-space-node-discovery-intofrom
eng-1857-validate-obsidian-importer-with-roam-origin-nodes-v2
Draft

ENG-1857 Validate Obsidian importer with Roam-origin nodes#1225
sid597 wants to merge 1 commit into
eng-2019-extract-shared-cross-space-node-discovery-intofrom
eng-1857-validate-obsidian-importer-with-roam-origin-nodes-v2

Conversation

@sid597

@sid597 sid597 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #1216 / eng-2019-extract-shared-cross-space-node-discovery-into.

This validates and fixes the existing Obsidian shared-node importer for Roam-origin nodes. The importer now:

  • imports Roam-origin full markdown payloads without requiring source frontmatter
  • derives the source node type from source my_concepts schema rows before mapping it locally
  • writes stable imported identity frontmatter (nodeInstanceId, mapped nodeTypeId, importedFromRid, lastModified, authorId)
  • prevents duplicate imports by source space + source node identity instead of title alone
  • avoids overwriting same-title imports by choosing an available import path

Root Cause

Roam-origin shared node markdown does not include the Obsidian-style frontmatter that the importer was previously parsing from rawContent. That meant the importer could create the file, fail to find nodeTypeId / nodeInstanceId, and then delete the file as invalid.

Runtime Proof

Validated through the real Obsidian command, not a stubbed surface:

  1. Opened Discourse Graph: Import nodes from another space in the Obsidian plugin.
  2. Registered the Obsidian vault user into the same local Supabase group as the Roam source data: eng1890testgroups.
  3. Discovery showed two Roam-origin nodes from test-1-graph:
    • [[EVD]] - This is a Evidence page. - {Source}
    • [[CLM]] - cat -
  4. Selected the Claim node.
  5. Preview showed 1 node, 0 relations, and no new schemas/relations.
  6. Confirmed import.
  7. Obsidian created import/test-1-graph/[[CLM]] - cat -.md with mapped frontmatter and the Roam markdown body.
  8. Reopened the import modal; the imported Claim was hidden while the unimported Evidence node remained visible, proving stable duplicate prevention.

Known Limit

The existing Obsidian materializer normalizes source [[CLM]] into [[CLM|CLM]]. The semantic body and nested bullets are preserved, but byte-for-byte markdown fidelity is still a follow-up concern already covered by ENG-1882.

Validation

  • git diff --check
  • pnpm --filter @discourse-graphs/obsidian test:unit
  • pnpm --filter @discourse-graphs/obsidian check-types
  • pnpm --filter @discourse-graphs/obsidian build

Note: the local shell still reports the repo's existing engine warning because it is using Node 20.20.2 while the package asks for Node >=22; the checks above passed.

@linear-code

linear-code Bot commented Jul 12, 2026

Copy link
Copy Markdown

ENG-1857

@supabase

supabase Bot commented Jul 12, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Jul 12, 2026 6:44pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant