Skip to content

feat: room links travel with export and import (#1588) - #1591

Merged
ajianaz merged 2 commits into
developfrom
feat/export-room-links-1588
Oct 29, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/export-room-links-1588

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What

  • uteke export (JSONL) carries each memory's room ids as rooms (absent for a memory in no room, so a store without rooms exports exactly as before).
  • uteke import, POST /import and Uteke::import link every memory to the rooms that exist in the target store, also for a duplicate of a memory that is already stored (the existing memory is linked, nothing is copied).
  • The result reports room_links (new links) and rooms_missing (rooms named by the file that the target lacks); both are omitted when empty, in the JSON result, the HTTP response and the CLI text (which also tells the user to create the rooms and import again).
  • The link author is the memory's author, or import.

Why

#1588: room membership was lost on export and not restored on import (3,602 memories in 194 rooms arrived with every room empty). Re-importing after creating the missing rooms now completes the links, so a server that was already filled without links can be repaired from the same file.

Testing

  • cargo fmt, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo run -p docgen (no diff).
  • New tests: core round trip (rooms exported, links restored), missing rooms reported and a second import completes the links without a copy, a file without rooms imports exactly as before (no new keys in the result); HTTP /export then /import round trip.
  • Touches the import path, so the benchmark guard applies: LongMemEval fast50 on Modal for this commit (result below, merge waits for it). Entries without rooms take no new branch except an empty-vector take.

Each exported memory carries its room ids. Import links the memory to every room that exists in the target store, also for a duplicate of a stored memory, and reports room_links and rooms_missing.
if !known {
self.missing.insert(room.clone());
continue;
}
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz

ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Benchmark guard (import path touched): LongMemEval fast50 on Modal for 440b13c (code identical to the head, which only adds a comment): overall R@5 0.9800 vs 0.9800 baseline, 0 improved / 0 regressed (compare_fast50.py).

@ajianaz
ajianaz merged commit 70f98fb into develop Oct 29, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/export-room-links-1588 branch October 29, 2026 09:12
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.

2 participants