Repository navigation
[codex] Harden file graph import - #12815
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the file-graph-to-DB import pipeline to better handle malformed/edge-case graphs (missing/duplicate refs, legacy journal filename refs, empty files, linked external PDF annotations, repeated task metadata, and very large flat files), and adds regression tests + documentation to prevent reintroductions.
Changes:
- Adds importer logic to (a) avoid transacting
nil:block/refs, (b) repair duplicated block UUIDs, (c) resolve legacyyyyy_MM_ddjournal filename refs, (d) support linkedfile://...pdfannotations, (e) ensure repeat-type built-in property exists when repeat metadata appears, and (f) reduce lazy-seq stack overflow risk for large imports. - Adds new regression coverage for recursive self refs, empty files, mixed repeated timestamps, external linked PDF annotations, legacy journal filename refs, missing pages, duplicated IDs, and large flat files.
- Documents audited OG import issue classes and which cases are now fixed/covered.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/og_import_graph_cases.md |
New documentation of audited import issue classes and mapped regression tests/cases. |
deps/outliner/test/logseq/outliner/pipeline_test.cljs |
Adds regression test ensuring ref rebuild does not introduce self-recursive refs. |
deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs |
Adds multiple importer regression tests covering edge-case graphs and large imports. |
deps/graph-parser/src/logseq/graph_parser/exporter.cljs |
Implements importer hardening for legacy journal filename refs, empty files (nil refs), repeat-type property presence, external file:// PDF assets, and large-file tx building. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| GitHub `logseq/db-test` issues with the `import` label were audited on 2026-06-24. The file-graph importer cases fall into these classes: | ||
|
|
||
| - Block identity and references: #213, #226, #340, #426, #525, #641, #679, #684, #748, #927, #931. |
1 of 2 tasks
This was referenced Aug 31, 2026
“Maximum call stack size exceeded” when importing a Logseq folder into a DB graph
logseq/db-test#931
Closed
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
[codex] Harden file graph import
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
[codex] Harden file graph import
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
[codex] Harden file graph import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
logseq/db-testimport reports:logseq/db-testimport issue classes and fixed cases indocs/og_import_graph_cases.mdValidation
rtk proxy node node_modules/@logseq/nbb-logseq/cli.js -cp src:test -m logseq.graph-parser.test-runner -n logseq.graph-parser.exporter-test --exclude :integrationrtk proxy node node_modules/@logseq/nbb-logseq/cli.js -cp src:test -m nextjournal.test-runner -n logseq.outliner.pipeline-test:errors 0org-import.zipimport: 193 blocks,:errors 0, no ignored files/propertiesrtk bb lang:lint-hardcoded --git-changedgit diff --checkNo CLJS recompilation was run.