Repository navigation
fix(openclaw): follow snapshot discovery pagination - #352
loveRhythm1990 merged 3 commits into
Conversation
由 LW 授权的 ChatGPT Personal 智能体提交。
由 LW 授权的 ChatGPT Personal 智能体提交。
由 LW 授权的 ChatGPT Personal 智能体提交。
|
由 LW 授权的 ChatGPT Personal 智能体提交。 固定发布与独立复审记录:head RED(原始 transport + 新真实 HTTP 回归):4 failed / 1 passed。GREEN:回归5/5,插件全量220/220,打包校验6文件;Node24.19.0和CI对应Node22.23.3均执行全量与打包成功。上游 Rust/MatrixOne CI 仍待实际结果,不以局部测试代替完整 CI。Issue #351 已指派 |
|
由 LW 授权的 ChatGPT Personal 智能体提交。 本轮 CI 续接证据(head
只读核验及本条交付记录均由上述智能体执行。 |
|
由 LW 授权的 MOI 智能体提交。 本轮续接完成 PR #352 的收尾(此前记录:等待 DB Tests 及余下规定步骤通过后再转 ready、指派并请求审阅):
等待负责人审阅结论;本智能体不合并、不关闭 Issue、不推进部署。 |
|
Code review: LGTM on The reported first-page truncation is real. The server's snapshot endpoint computes Validation: all 220 existing OpenClaw tests and package build/verification passed locally. The unchanged baseline transport fails four of the five new regression cases. I also ran 10 additional checks through the actual registered Non-blocking performance suggestion — CI clarification: the recorded Mergify failure is Coverage: 3/3 changed files reviewed (100%), 0 skipped. No blocking correctness issues found. |
由 LW 授权的 ChatGPT Personal 智能体提交。 ## What type of PR is this? - [x] fix (bug fix) - [x] perf (performance improvement) - [x] test (regression coverage) ## Which issue(s) this PR fixes Related to #354 and the performance suggestion on merged #352. No automatic issue closure requested. ## What this PR does / why we need it Automatic OpenClaw snapshot discovery needs names and timestamps, but its requests default to historical memory-count resolution on the server. Each uncached snapshot may trigger a historical COUNT and cache write whose result the plugin discards. With the default page budget this can touch up to 400 snapshots per scan. Pass the existing resolve_memory_counts=false on every automatic page. Keep explicit transport limit/offset requests unchanged. The formatter/client and stats do not expose per-snapshot memory counts, so the public output stays unchanged. This is verified unnecessary database work, not a measured production latency improvement. ### Verification - Base main c3bb4b5; no dev exists, so main is used as explicitly authorized. - Published head 2a613d0; full tree 5563356 equals tested local commit 6659385bc0b067fdd9c722e2ceed1a0b50fc416e. - RED: npm test -- openclaw/__tests__/snapshot-pagination.test.ts against unchanged transport: 1 failed / 4 passed; all six automatic requests omitted the flag. - GREEN: npm test: 234/234 tests across 15 files; npm run test:pack: build and verification passed, 6 packed files. Repeated full suite and packaging on Node24.19.0 and Node22.23.3. - Real native loopback HTTP regression asserts three discovery and three stats pages request false, while explicit page selection retains the absent parameter. Independent review agent Approve and independent regression 5/5; remote head independently fetched and full-tree equality confirmed. - git diff --check passed. Complete scope: 2 files, +8/-2. Generated dist is build-only and excluded by the repository; no dependencies, schema, server or workflow changes. - Upstream OpenClaw CI [39639072851](https://github.com/matrixorigin/memoria/actions/runs/39639072851) **SUCCESS**; PR Title Check **SUCCESS**. Rust/MatrixOne CI [39639072838](https://github.com/matrixorigin/memoria/actions/runs/39639072838) **SUCCESS**, including 252 unit tests and DB Tests with restore/cleanup regressions. - Local Rust/MatrixOne gates were not executed; actual upstream required CI has now completed successfully. PR is ready for review; XuPeng-SH assignment and review request were read back. - Authenticated login, own fork upstream relationship and push permission verified. Only MatrixAdventurer/memoria:fix/openclaw-snapshot-counts-20261022 created/updated, using the GitHub connector and expected-SHA lease; no default branch written. Branch/commit publication and read-only verification performed by the signed execution subject. Issue #354 assigned to actual login XuPeng-SH; PR is assigned to XuPeng-SH and the review request was read back after required gates succeeded. 由 LW 授权的 ChatGPT Personal 智能体提交。
由 LW 授权的 ChatGPT Personal 智能体提交。
What type of PR is this?
Which issue(s) this PR fixes
Related to #351. No automatic issue closure is requested.
What this PR does / why we need it
OpenClaw advertises “List all known memory snapshots”, but its public client requests only the first 20 REST rows and discards has_more. Older recovery points disappear from discovery, and stats reports the first page's length as the snapshot count.
Follow the existing offset/has_more pages for public discovery, bounded by maxListPages. Report an error on a truncated, empty-but-has-more or failed scan; the existing stats error path then reports an unavailable count. Explicit transport-level limit/offset calls and older unpaginated response shapes retain their existing behavior.
Verification
659a7779c1f3be787c4dba1d67cd12b998dd0b32; no exact upstream dev branch exists, so main is used as authorized.ad2096906ecff33f53bf75d066f60471754ce3e3.npm test -- openclaw/__tests__/snapshot-pagination.test.ts: 5/5;npm test: 220/220 across 14 files;npm run test:pack: build and package validation succeed, 6 packed files. Executed on Node 24.19.0 and repeated full suite/package on CI's Node 22.23.3 series.ad2096906ecff33f53bf75d066f60471754ce3e3. The reviewer independently fetched the remote head and verified complete treee60274553ccd19ff7e87b8efe791062590a38bc4equals reviewed/tested localc0aecfba77ae2b259e9273b99c4c5988c27f1168, with an empty full-tree diff and independently run 5/5 real-HTTP regression.git diff --checkpasses. Scope: 3 files, +142/-4.XuPeng-SHand review requested (read back). No live Memoria or local Rust/DB integration run is claimed.MatrixAdventurer/memoria:fix/openclaw-snapshot-pagination-20261021branch. Destination main was not written. Branch creation/file commits and read-only verification were performed by the signed execution subject.由 LW 授权的 ChatGPT Personal 智能体提交。