Fix OpenClaw verbatim memory ingest rejection - #50
Merged
Conversation
## Summary Fix the OpenClaw plugin's `memory_ingest` tool schema, which silently rejected every verbatim ingest because it never declared the `contentClass` parameter, and add a CI check that verifies every plugin surface can satisfy the content-class contract. ## Changes - Add a `contentClass` enum (`summary`, `redacted`, `raw`) to OpenClaw's `memory_ingest` schema, forwarded to MCP as a top-level argument rather than nested under `metadata`. - Add regression tests confirming the schema declares `contentClass` and that it is forwarded correctly on a live call. - Add `scripts/check-ingest-contract-conformance.mjs`, a CI check that verifies every plugin in the release family (MCP server, OpenClaw, Hermes, Claude Code, Codex, Cursor) declares, stamps, or delegates `content_class` handling, with structural checks that reject commented-out or handler-only mentions. - Wire the new conformance check and its unit tests into CI. - Export `families` from `scripts/version-families.mjs` so the conformance check can enumerate plugin family members instead of duplicating the list. - Fix llmwiki provider tests to use per-test temp directories instead of a shared `/tmp/x` path, removing a source of cross-process test flakiness. - Bump plugin package and manifest versions to 0.2.1. ## Why Core defaults to `RAW_CONTENT_POLICY=reject`, so an unstamped verbatim ingest is refused with a 422. Because OpenClaw's tool schema sets `additionalProperties: false`, a call without a declared `contentClass` property was rejected before it ever reached MCP — making verbatim ingest impossible from OpenClaw even though its docs and skill instructions already told the agent to send it. The conformance check closes the gap that let this ship: it enumerates every plugin in the release family and fails if a new or existing surface can't demonstrably satisfy the contract. ## Validation - Added unit tests for the OpenClaw schema and tool-call forwarding behavior. - Added unit tests for the new conformance check covering declaring, stamping, and delegating surfaces, missing files, and unmapped family members. - Wired both test suites into the CI workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the OpenClaw plugin's
memory_ingesttool so verbatim ingests are no longer rejected, and add a CI check that keeps every plugin surface (OpenClaw, Hermes, Claude Code, Codex, Cursor, MCP server) in sync on how they declare content classification.Changes
contentClassenum property to the OpenClawmemory_ingesttool schema, forwarded to MCP as a top-level argument.scripts/check-ingest-contract-conformance.mjs, a CI check that verifies each plugin surface declares, stamps, or delegatescontent_classsupport consistent with the provider contract.llmwikiprovider/registration tests to use isolated temp directories instead of a shared, ambient/tmppath.familiesfromscripts/version-families.mjsso the conformance check can enumerate plugin family members instead of duplicating the list.0.2.1.Why
Core defaults to
RAW_CONTENT_POLICY=reject, which refuses an unstamped verbatim ingest with a422 raw_content_rejectederror. The OpenClaw plugin'smemory_ingestschema pinsadditionalProperties: false, so even though its skill instructions told the agent to sendcontentClass, the undeclared property was rejected before the call could be made - the agent reported a validation error rather than sending an unstamped ingest. The published plugin could not perform any verbatim ingest, which is the path its own skill prescribes for session snapshots and handoffs. The new conformance check ensures a future contract change can't silently miss one plugin surface again.Validation
pnpm testinplugins/openclaw: 5 passed, including two regression tests verified to fail when the schema declaration is removed.node --test scripts/ci/__tests__/ingest-contract-conformance.test.mjs: 14 passed.node scripts/check-ingest-contract-conformance.mjs: passes, and was mutation-tested against every surface - removing a declaration, commenting one out, dropping one of two payload branches, repointing a delegation config, and adding an unclassified family member each fail the check.pnpm --dir packages/llmwiki test: 152 passed (previously 150 passed, 2 failed), confirmed with a conflicting file still present at the shared path.pnpm run ci:affected: 16/16 tasks successful.