Skip to content

fix(openclaw): reject malformed snapshot listing responses - #413

Merged
loveRhythm1990 merged 3 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-snapshot-response-1104
Nov 10, 2026
Merged

loveRhythm1990 merged 3 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-snapshot-response-1104

Conversation

@MatrixAdventurer

@MatrixAdventurer MatrixAdventurer commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

What type of PR is this?

  • fix (bug fix)
  • test (regression coverage)

Which issue(s) this PR fixes

Newly reproduced snapshot discovery defects; no automatic issue closure requested.

What this PR does / why we need it

Malformed successful snapshot responses previously became "Snapshots (0):". A non-boolean has_more also silently ended automatic discovery, presenting a truncated prefix as the complete list.

Reject unsupported response envelopes and explicit non-boolean continuation metadata on every discovery page. Preserve legitimate empty lists, arrays, snapshots/items envelopes, legacy text, and omitted has_more on old unpaginated responses. Explicit limit/offset requests remain single-page requests.

Verification

Published head: ebacd8b.
Tested/published tree: f20dbe97dc1b83f96daa2cdd499c09dbcd9dba45 (exact match).
Complete scope relative to original base 94b3e84: 2 files, +59/-10.

  • Original envelope regression: 16 failed / 8 passed before the envelope fix.
  • New continuation regression on previous PR head 3162f52: 7 failed / 24 passed. Invalid metadata incorrectly returned successful lists.
  • Current npm test: 277 passed across 16 files. New cases cover 7 malformed metadata values on first and later pages.
  • npm run test:pack: build/package checks and all 6 packed files passed.
  • git diff --check: passed.
  • Independent review: Approve; independently ran 36 response/pagination tests. Three-way merge check with current main f796036 preserves the newly merged memory-list and branch validation.
  • Previous-head hosted CI passed; new-head hosted CI is pending. Tests use mocked/loopback HTTP, not a live deployment. No local Rust/database run is claimed.
  • Generated outputs/dependency symlinks are excluded.

Operation record: authenticated MatrixAdventurer, own fork parent matrixorigin/memoria and push permission verified. Updated only the existing own-fork branch, fast-forward with expected-head lease. Assigned to XuPeng-SH with review requested. PR/branch writes and read-only verification are by the signed agent above. No merge or deployment.

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

Copy link
Copy Markdown
Contributor Author

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

Final verification on 3162f52: all hosted workflows succeeded — Test OpenClaw Plugin https://github.com/matrixorigin/memoria/actions/runs/41807553465, repository Test https://github.com/matrixorigin/memoria/actions/runs/41807553650, PR Title Check https://github.com/matrixorigin/memoria/actions/runs/41807553496. This supersedes the pending-hosted-CI note in the initial description. Local 270-test/package validation and independent Approve remain recorded above; no local Rust/database run is claimed.

Moved from draft to ready for review. Assignment to XuPeng-SH and review request were read back successfully. This signed record attributes those writes and the read-only CI verification to the agent. No merge or deployment performed.

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

Copy link
Copy Markdown
Contributor Author

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

Follow-up on ebacd8b: fixed non-boolean has_more silently truncating snapshot discovery. Regression before fix: 7 failed / 24 passed; after fix full plugin suite: 277 passed, package validation and 6 packed files passed. Independent reviewer Approve, 36 focused tests independently passed; verified clean three-way production-file merge with latest main preserving other validation fixes. Complete PR remains 2 files (+59/-10).

New-head hosted OpenClaw CI passed: https://github.com/matrixorigin/memoria/actions/runs/42746312655 ; PR title passed. Repository Test is still running: https://github.com/matrixorigin/memoria/actions/runs/42746312265 . Previous-head success is not being claimed for this revision. Updated only the verified own-fork branch by fast-forward with an expected-head lease. XuPeng-SH assignment was read back. Read-only revisit of #411/#413 found no review submissions or inline threads. No merge/deployment performed.

@loveRhythm1990 loveRhythm1990 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed ce416977d6394107c9099877e84f24768659bbfd.

LGTM. Unsupported snapshot envelopes now fail instead of appearing empty, and invalid has_more values fail on first and later discovery pages instead of silently truncating results. Legacy unpaginated formats and explicit single-page requests remain supported.

Validation: 295 plugin tests and build/package checks (all six packed files) passed locally. Against base, the new response suite has 23 failing regressions and eight passing controls. Current repository CI is green.

Coverage: 2/2 changed files reviewed (including tests where present), 100%; 0 skipped.

@loveRhythm1990
loveRhythm1990 merged commit 1db47b1 into matrixorigin:main Nov 10, 2026
6 checks passed
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.

3 participants