Skip to content

[Bug]: OpenClaw snapshot discovery backfills historical counts it discards #354

Closed

Description

@MatrixAdventurer

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

Existing issue check

Environment

Upstream main c3bb4b5, OpenClaw API mode, Node24.19.0.

Actual behavior

The metadata-only automatic snapshot scan omits resolve_memory_counts. ListSnapshotsQuery defaults it to true. For each snapshot with no cached count, snapshot_summary_value executes count_active_memories_at_snapshot and may persist the result. OpenClaw then discards memory_count; its formatter/client retain name/time and stats only counts returned snapshots. The default 20-page budget can request historical counts for up to 400 snapshots unnecessarily. This is verified code-path work amplification, not a measured production latency claim.

Expected behavior

Use the server's existing resolve_memory_counts=false on every automatic discovery page; preserve explicit low-level limit/offset request behavior.

Actual reproduction and candidate

A real native loopback HTTP server records the query of three discovery pages and three stats pages. Against unchanged transport, npm test -- openclaw/tests/snapshot-pagination.test.ts: 1 failed / 4 passed, receiving six missing flags rather than six false values. The two-file candidate passes all 234 plugin tests and package build/6-file verification; independent review agent Approve and independently executed regression 5/5. Full Rust/MatrixOne CI is not yet claimed.

Scope: 2 files, +8/-2. No server/API/schema change. Verified authenticated MatrixAdventurer, own fork relationship to matrixorigin/memoria and push permission; source branch fix/openclaw-snapshot-counts-20261022 created only in that fork at the pinned base. No dev exists, so main is selected under the user's explicit authorization. All branch operations and read-only checks are by the signed execution subject. No merge/deployment/automatic issue closure.

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

Activity

  1. MatrixAdventurer commented on Oct 22, 2026

    @MatrixAdventurer
    ContributorAuthor

    Fixed by #355, 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