Skip to content

fix(openclaw): filter API memory lists before pagination - #357

Merged
loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-list-type-filter-20261023
Oct 24, 2026
Merged

loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-list-type-filter-20261023

Conversation

@MatrixAdventurer

@MatrixAdventurer MatrixAdventurer commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

What type of PR is this?

  • feat (new feature)
  • fix (bug fix)
  • docs (documentation)
  • style (formatting, no code change)
  • refactor (code change that neither fixes a bug nor adds a feature)
  • perf (performance improvement)
  • test (adding or updating tests)
  • chore (maintenance, tooling)
  • build / ci (build or CI changes)

Which issue(s) this PR fixes

Related to #356.

What this PR does / why we need it

An API-backed listMemories({ memoryType: "episodic" }) currently spends its page budget scanning unrelated memory types and filters afterward. A one-page request can return no episodic memories even when they exist. It also reports an embedded Rust MCP filtering limitation on complete API results.

Forward the existing REST memory_type selector on every cursor page and preserve the requested matching-row limit. Keep embedded MCP bounded scanning unchanged. Add two native loopback HTTP regressions for exhausted page budgets and complete multi-page results. The fixture deliberately caps pages at two rows; this is an emulated short-page contract, not a live MatrixOne measurement.

Validation and independent review

Base: e2aa9071f70b0f7a3b2f53d297ffa220015a3d0b.
Head: b144f5b66fc455085ea369ca0821eceae7435a21.
Product tree: dc5b8b41eb11051e8603f90deb74b134487b82a4, identical to the locally tested commit tree.

From plugins/openclaw:

  • Before production changes, npm test -- openclaw/__tests__/list-pagination.test.ts: 2 failed / 13 passed; both new native HTTP regressions failed.
  • After changes, same command: 15 passed.
  • npm test: 236 tests passed across 15 files (Node 24.19.0).
  • npm run test:pack: build and packed-package verification passed (6 packed files).
  • git diff --check: passed.
  • Independent review agent: Approve; separately reran all 15 pagination tests and inspected REST filtering before SQL LIMIT.

Scope: 3 repository files, +60/-4. No dependency/schema/workflow changes or tracked generated files are required. Rust and live MatrixOne checks were run in the upstream PR CI (not locally). All required runs for the fixed head succeeded:

  • Test OpenClaw Plugin #39870506946: Node 22, 236 tests and package build/6 packed-file verification passed.
  • Test #39870506949: cargo check, cargo clippy -- -D warnings, 252 Rust unit tests, the full single-threaded cargo test suite against MatrixOne, Restore transaction failure regression, Branch capability probe cleanup regression, and Offline restore cleanup regressions all passed. The workflow's normal ignored-test behavior remains unchanged; this is not a claim that every ignored/live-provider test was enabled.
  • PR Title Check #39870507036: passed.

Authorized operation record

Authenticated fork owner MatrixAdventurer, fork parent matrixorigin/memoria, and fork push/admin permissions were verified. Upstream has no dev branch, so this PR targets main under LW's explicit instruction. Created only the independent fork branch fix/openclaw-list-type-filter-20261023 and its signed commit; no upstream branch was changed. Issue #356 and PR #357 are assigned to XuPeng-SH (GitHub readback confirmed). After all three CI workflows succeeded for the fixed head, the signed agent marks this PR ready and requests XuPeng-SH review; the final operation receipt records readback. No automatic merge, deployment or Issue closure.

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

Forward the existing REST memory_type selector on every page and retain the requested matching-row limit. Preserve embedded MCP scan semantics. Add native HTTP regressions for page budgets and partial results. Related to matrixorigin#356.

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

Copy link
Copy Markdown
Contributor Author

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

操作与验证记录:已在用户本人 fork MatrixAdventurer/memoria 的独立分支提交 b144f5b,产品树 dc5b8b41eb11051e8603f90deb74b134487b82a4 与本地测试版本一致。PR 已指派 XuPeng-SH,GitHub 回读确认。上述分支创建、提交、PR 创建、指派及只读核验均由本署名主体执行。

OpenClaw CI 已成功:Node 22,236 项测试及 6 文件打包验证通过。Rust/DB CI 的 cargo check、cargo clippy -- -D warnings 和 252 项 Rust 单元测试通过;真实 MatrixOne 数据库全量测试正在运行,尚不宣称完整 CI 通过。独立 review agent 对最终 3 文件、+60/-4 修复明确 Approve。

PR 暂保持 draft;数据库门禁通过后转 ready 并请求 XuPeng-SH 审阅。不自动合并、部署或关闭 Issue #356。

@MatrixAdventurer
MatrixAdventurer marked this pull request as ready for review October 22, 2026 23:34

@aptend aptend 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 the complete three-file diff at b144f5b and traced the selector through REST routing/service/storage: memory_type is applied before SQL LIMIT/keyset pagination, and the transport preserves it on every page. The matching-row limit, partial flag, cache generation guard, request timeout/error cleanup, and test server teardown remain consistent. No blocking issue found.

Validation: the focused pagination suite completed locally with 15/15 passing on Node 22.22.0. Audited CI job 120143456207: 236/236 tests and build/6-file package verification passed. Its synthetic merge commit and this head have the identical full tree dc5b8b41eb11051e8603f90deb74b134487b82a4. The new HTTP fixtures emulate short pages; this is not a claim of a local live-MatrixOne run.

@mergify

mergify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@loveRhythm1990
loveRhythm1990 merged commit 2108dbb into matrixorigin:main Oct 24, 2026
7 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.

4 participants