Skip to content

fix delete/move tree dry-run count cap at 1000 (TNT-59)#50

Merged
jgpruitt merged 1 commit into
mainfrom
jgpruitt/tnt-59-delete-command-may-show-incorrect-count
Apr 27, 2026
Merged

fix delete/move tree dry-run count cap at 1000 (TNT-59)#50
jgpruitt merged 1 commit into
mainfrom
jgpruitt/tnt-59-delete-command-may-show-incorrect-count

Conversation

@jgpruitt
Copy link
Copy Markdown
Collaborator

The dryRun branches of memory.deleteTree and memory.move used searchMemories with limit:1000 and returned its total, but total is just the length of the limited result set — so previews capped at 1000 even when more rows would be affected.

Add a memory.countTree op/RPC method that does an unbounded COUNT(*) under the tree path, and route both dry-run paths through it. Expose countTree on the engine client too.

The dryRun branches of memory.deleteTree and memory.move used
searchMemories with limit:1000 and returned its total, but total is
just the length of the limited result set — so previews capped at
1000 even when more rows would be affected.

Add a memory.countTree op/RPC method that does an unbounded
COUNT(*) under the tree path, and route both dry-run paths through
it. Expose countTree on the engine client too.
@jgpruitt jgpruitt merged commit ca8c395 into main Apr 27, 2026
3 checks passed
@jgpruitt jgpruitt deleted the jgpruitt/tnt-59-delete-command-may-show-incorrect-count branch April 27, 2026 15:14
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