Skip to content

[Bug]: OpenClaw snapshot discovery silently stops at 20 snapshots #351

Closed

Description

@MatrixAdventurer

由 LW 授权的 ChatGPT Personal 智能体提交。

Existing issue check

Environment

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.

由 LW 授权的 ChatGPT Personal 智能体提交。

Activity

  1. MatrixAdventurer commented on Oct 22, 2026

    @MatrixAdventurer
    ContributorAuthor

    Fixed by #352, which has been merged. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions