Skip to content

test(integrations): match bm_write's 1.0 refusal in OpenClaw integration test - #1992

Merged
groksrc merged 1 commit into
mainfrom
fix/openclaw-memory-quest-int-test
Oct 30, 2026
Merged

groksrc merged 1 commit into
mainfrom
fix/openclaw-memory-quest-int-test

Conversation

@groksrc

@groksrc groksrc commented Oct 30, 2026

Copy link
Copy Markdown
Member

This fixes the OpenClaw integration test "round-trips Memory Quest fields through the OpenClaw tools", which fails on main. The assertion was stale. The plugin itself behaves correctly, so this PR changes only the test.

Why it failed

  • On 2026-10-11 (4bbc1023) the test began asserting that a refused second write_note shows "Note already exists". That was the plugin's own fallback text, from NoteAlreadyExistsError in integrations/openclaw/bm-client.ts.
  • On 2026-10-23, feat(mcp): add bm_write, bm_edit, bm_move and bm_delete #1838 gave bm_write its own refusal message: A note already exists at '<path>'. Nothing was written. (src/basic_memory/mcp/tools/write.py:257, documented in man3/bm-write(3).md:77).
  • The plugin forwards the server's message when one is present (message ?? fallback), so agents now see the 1.0 text, which is the intended behavior.
  • CI's OpenClaw job runs just package-check-openclaw but not the integration suite (.github/workflows/consolidated-packages.yml, job openclaw), so nothing caught the drift.

Change

integration/bm-client.integration.test.ts now asserts the full 1.0 text, A note already exists at 'memory-quest/Memory Master.md'. Nothing was written. The details.error === "note_already_exists" check is unchanged.

Verification

  • bun run test:int against a real bm mcp from this checkout: 5 pass, 0 fail. Before this change, the Memory Quest test failed on main (727a4700) with Received: "A note already exists at 'memory-quest/Memory Master.md'. Nothing was written. ...".
  • just package-check-openclaw: exit 0, 286 pass.

Follow-up (not in this PR)

The integration suite can drift again, because CI doesn't run it. Adding it to the openclaw job would need uv and the Python package in that job. That deserves its own PR if we want it.

🤖 Generated with Claude Code

…ion test

The Memory Quest integration test failed on main. It asserted the
plugin's fallback text "Note already exists", written on 2026-10-11.
Since #1838 (2026-10-23), bm_write sends its own refusal message, and
the plugin passes it to the agent: "A note already exists at '<path>'.
Nothing was written." The tool behaves correctly; the assertion was
stale. CI's OpenClaw job does not run the integration suite, so the
drift went unnoticed.

Assert the 1.0 text, including the path and "Nothing was written.".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T04:07:43.555782Z 331d2b0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@groksrc
groksrc merged commit 6a5eff5 into main Oct 30, 2026
24 checks passed
@groksrc
groksrc deleted the fix/openclaw-memory-quest-int-test branch October 30, 2026 04:15
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.

1 participant