Skip to content

Add replace_id parameter to store tool#55

Merged
rendro merged 2 commits intomainfrom
add-replace-id-to-store
Feb 9, 2026
Merged

Add replace_id parameter to store tool#55
rendro merged 2 commits intomainfrom
add-replace-id-to-store

Conversation

@rendro
Copy link
Owner

@rendro rendro commented Feb 9, 2026

Summary

  • Adds replace_id optional parameter to the store tool, collapsing the common forget(id) + store(content) two-call pattern into a single atomic operation
  • When replace_id is set: stores new content, creates a SUPERSEDES graph edge, transfers edges from old to new, deletes the old item. All replace sub-operations are non-fatal.
  • Response includes replaced_id field and updated message on successful replacement

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (all 80 tests pass)
  • cargo test -- --ignored (integration tests test_store_replace_id and test_store_replace_id_invalid)

Collapses the common forget(id) + store(content) pattern into a single
atomic call. When replace_id is set, the new item is stored first, then
a SUPERSEDES edge is created, edges are transferred, and the old item is
deleted. All replace sub-operations are non-fatal — the new item is
stored regardless.
The ubuntu runner runs out of disk during linking. Free up space by
removing unused SDK directories and drop the separate `cargo build`
step since `cargo test` already compiles everything.
@rendro rendro merged commit bade81c into main Feb 9, 2026
2 checks passed
@rendro rendro deleted the add-replace-id-to-store branch February 9, 2026 12:11
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