Skip to content

fix(core): count relations written by memory-json import - #2187

Open
spark142857142857 wants to merge 1 commit into
basicmachines-co:mainfrom
spark142857142857:fix/memory-json-relation-count
Open

spark142857142857 wants to merge 1 commit into
basicmachines-co:mainfrom
spark142857142857:fix/memory-json-relation-count

Conversation

@spark142857142857

Copy link
Copy Markdown

Fixes #2186

The importer grouped relations by source but counted every input group, including those without a source entity in the import. Count each note's outgoing relations after the note is written. An imported source can still link to an unresolved target.

The API regression test supplies one relation in each direction, verifies both reported counts, and checks the generated Markdown.

Verification

  • Reproduced with the local CLI on Windows and Python 3.13.2. The missing-source case now reports zero. The reversed case writes the link and reports one.
  • The regression test failed on the original code (two reported, one written) and passed with the fix. All 26 focused memory-JSON tests passed. Ruff, formatting, and type checking of the changed files passed.
  • just test with four workers and fail-fast stopped during the SQLite unit suite (724 passed, 5 skipped, 4 failed). All four failures reproduced on unmodified 27ac74c3: three tests require Windows symlink creation privileges, and one ChatGPT import assertion expects a different local date. The PostgreSQL stage was not reached. Full-tree type checking reported the same four platform-specific diagnostics on both revisions.

Signed-off-by: spark142857142857 <spark142857@gmail.com>
@CLAassistant

CLAassistant commented Nov 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T09:57:22.630732Z 5aa31cc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

[BUG] memory-json import counts relations whose source entity is absent from the input

2 participants