Skip to content

fix(openclaw): forward retrieval memory type filters - #350

Merged
loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-retrieve-memory-types-20261021
Oct 21, 2026
Merged

loveRhythm1990 merged 1 commit into
matrixorigin:mainfrom
MatrixAdventurer:fix/openclaw-retrieve-memory-types-20261021

Conversation

@MatrixAdventurer

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • fix (bug fix)

Which issue(s) this PR fixes

Follow-up to the pre-existing retrieval wiring defect documented during review of #347:
#347 (comment)

What this PR does / why we need it

OpenClaw accepts retrieveMemoryTypes and MemoriaClient.retrieve() already exposes memoryTypes, but the selected values were dropped before the request reached the REST API. As a result, configured type filters could silently retrieve semantic/profile/etc. records together instead of restricting recall.

This change:

  • forwards memoryTypes as memory_types from the client;
  • includes memory_types in the HTTP request body only when supplied;
  • preserves the existing omitted-filter request shape.

The REST API already supports RetrieveRequest.memory_types. No server, storage, authentication, cache, or response parsing behavior changes.

Scope: 3 files, +20/-0. Base: 659a7779c1f3be787c4dba1d67cd12b998dd0b32. Published commit: ccb126290fcfbff1aefb323b0a1d40c2feb22fbb. Tested/reviewed tree: 63a8d65e5bea6d830199cda6161fdce0fa7fcebc.

Reproduction and validation

The identical regression test was run on current main and the fixed tree:

  • Current main: 1 failed / 5 passed; the serialized body lacked memory_types.
  • Fixed focused suite: 6/6 passed.
  • Full OpenClaw suite: 216/216 passed across 13 files.
  • npm run test:pack: build/package validation passed; all 6 packed files verified.
  • git diff --check: passed.

Independent review agent: APPROVE, no blocking findings. It independently reran the focused suite, all 216 tests, package validation, and diff check against the exact tested tree. The remote commit above has that same tree.

Remote Rust/MatrixOne and PR workflow checks are left to CI; no merge or deployment action is requested.

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

Pass configured memory types through the OpenClaw client and HTTP adapter, with regression coverage for supplied and omitted filters.

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

Copy link
Copy Markdown
Contributor Author

CI follow-up on exact head ccb126290fcfbff1aefb323b0a1d40c2feb22fbb: all required workflows completed successfully.

Independent review remains APPROVED on the exact published tree. No merge or deployment action was taken.

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

@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.

Deep review completed at exact head ccb126290fcfbff1aefb323b0a1d40c2feb22fbb, base/merge-base 659a7779c1f3be787c4dba1d67cd12b998dd0b32. No blocking findings.

Read all three changed files and all review/discussion/inline/thread history, including the #347 follow-up linked in the PR. This is a focused restoration of an existing optional filter, not a new retrieval model.

R2 closure: registered memory_retrieve and auto-recall already pass validated retrieveMemoryTypes -> MemoriaClient.retrieve -> callToolText -> HTTP dispatch -> JSON request -> existing RetrieveRequest.memory_types/retrieve_options. The two additions close the previously missing client and adapter forwarding boundaries. Checked specified arrays, omitted values, server enum validation and empty-filter semantics. Omitted filters preserve the old serialized body. Tenant/auth headers, response parsing, cache-generation handling and request cancellation/cleanup remain unchanged.

R1 regression: the existing client suite now inspects the actual serialized fetch body across supplied-filter and subsequent omitted-filter calls, with finally/afterEach cleanup. No new state/resource owner, wait, queue, persistence format or per-record operation is introduced; a deep lifecycle/race/upgrade exercise is not applicable to these two field-forwarding additions.

Verified raw OpenClaw CI 39554709819, job 119071668546: Node 22.23.3/npm 10.9.9, all 216 tests / 13 files pass (changed client suite 6/6); build/package validation verifies 6 packed files. CI checks merge 2a0e9b92444ec15153a6c135c56f5c6740124704; fetched it and verified its complete tree equals the audited head tree 63a8d65e5bea6d830199cda6161fdce0fa7fcebc, so this evidence is semantically exact-head. Local isolated worktree: complete diff and git diff --check passed.

Reused this valid evidence without duplicating npm/Rust/MatrixOne suites. No live-memory service, deployment or new benchmark is claimed.

@loveRhythm1990
loveRhythm1990 merged commit 7560d8c into matrixorigin:main Oct 21, 2026
5 of 6 checks passed
loveRhythm1990 added a commit that referenced this pull request Oct 21, 2026
## What type of PR is this?

- [x] build / ci (build or CI changes)

## What this PR does / why we need it

**Behavior change: this proposal restores valid configuration, but does
not restore automatic enqueueing with the currently reported product
settings. Maintainers would use `@mergifyio queue`. The enqueueing
policy needs a maintainer decision before merge.**

Remove rejected `queue_rules[].autoqueue` and migrate
`commit_message_template` to `commit_message_format`. Keep one approval,
no `do-not-merge`, and `base=main` as queue-level conditions. Squash
merging, timeout, concurrency, and GitHub branch protection remain
unchanged. Approver attribution becomes standard `Approved-by` trailers.

Related: #285; configuration failures on #347, #348, and #350.

## Enqueueing decision

- **Automatic:** enable Merge Protections in the dashboard, then
explicitly configure a conditional list (not unconditional `true`):

  ```yaml
  merge_protections_settings:
    auto_merge_conditions:
      - "#approved-reviews-by>=1"
      - label!=do-not-merge
      - base=main
  ```

This is an alternative, not included in the patch. Once `autoqueue` is
removed, do not rely on the bot to migrate that field automatically.
- **Manual:** accept this proposal and use `@mergifyio queue` for
eligible PRs.

The live configuration check confirms Workflow Automation is disabled,
so the retained `pull_request_rules` are inactive; this is now
documented inline. The Merge Protections prerequisite comes from the
bot's #285 notice; dashboard settings have not been independently
verified or changed.

## Validation

- Official schema validation, parsed-YAML gate checks, and `git diff
--check` passed.
- Live `Configuration changed` passed on `999ccb4`; the latest commit
only adds comments and parses identically. Latest-head CI is pending.
- No tracked references to the old approver-attribution syntax outside
`.mergify.yml` were found.
- `Mergify Merge Queue` still evaluates main's old configuration until
merge, so its `autoqueue` error is separate from proposed-file
validation.

Only `.mergify.yml` changes. No merge or product-setting changes
performed.
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