You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: OpenClaw snapshot discovery silently stops at 20 snapshots #351
Verified upstream main 659a7779c1f3be787c4dba1d67cd12b998dd0b32, OpenClaw API mode.
Actual behavior
The public memory_snapshots tool promises “List all known memory snapshots”, and MemoriaClient.listSnapshots() exposes no page controls. Its HTTP transport requests only limit=20&offset=0, drops has_more, and returns the first page as complete. stats() then reports only that page's length as snapshotCount. Users with older snapshots cannot discover them through this tool.
Expected behavior
Follow the API's existing offset/has_more pages within a bounded budget. A truncated or failed scan must report failure, so stats marks the snapshot count unavailable instead of publishing a partial count.
Executed reproduction
A real loopback HTTP server emulating the current REST contract exposes 45 ordinary snapshots. Calling the public client returns only release_0 through release_19 before the fix. The new real-HTTP regression command: npm test -- openclaw/__tests__/snapshot-pagination.test.ts
fails 4 cases and passes 1 against the original transport. It covers complete discovery/counts, a page cap, empty has_more pages, later-page HTTP errors, and explicit low-level page selection.
The minimal candidate keeps explicit transport page calls unchanged and uses maxListPages for public discovery. After the fix: 5/5 regression tests, 220/220 complete plugin tests, and npm run test:pack (6 packed files) pass locally on Node 24.19.0. Independent review: Approve, including an independently executed 5/5 regression. Upstream CI on Node 22 and Rust/DB gates are not yet claimed.
Scope: 3 files, 142 additions/4 deletions. No server/schema/API change, merge, deployment or automatic issue closure. Read-only verification and candidate branch operations are by the signed execution subject above.
Activity
fix(openclaw): follow snapshot discovery pagination (#352)
MatrixAdventurer commentedon Oct 22, 2026
Fixed by #352, which has been merged. Closing as completed.