Skip to content

refactor: MCP remember follows the HTTP rules and the CLI builds one metadata on every path (#1439, part E) - #1580

Merged
ajianaz merged 1 commit into
developfrom
refactor/unify-remember-1439
Oct 29, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/unify-remember-1439

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What

Part E of #1439 (one behaviour across surfaces), the remember operation:

  • MCP uteke_remember follows the POST /remember rules: content and tags validated at decode, an omitted type is inferred (it was stored as fact with no inference), an unknown type is refused, a given type is copied into the metadata. A non-array-of-strings tags, a non-string type and any undeclared argument are errors (they were silently dropped). room stays MCP-only.
  • RememberPolicy::MCP is now HTTP; the tests that pinned the divergence now pin the one behaviour.
  • One --meta parser in core (metadata_from_cli_flags): numbers, booleans, bare keys and rel:type:target were only understood on a local store; the via-server path sent strings and dropped bare keys.
  • CLI via server: --timestamp works (the anchor is applied before the request, as locally), --room is an explicit error instead of the server's "unknown field"; to_http_body no longer sends room/timestamp.
  • MemoryType::infer_stored_name replaces three copies of the inference fallback.

Why

The surfaces diverged on the same request (#1439; owner decision 2026-10-13: unify towards HTTP). This removes the remember divergences without changing HTTP behaviour.

Testing

  • cargo fmt, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo run -p docgen (no diff).
  • New tests: policy/cross-surface tests flipped to "one behaviour", MCP decode errors, stored type per write path (inferred, explicit, room), typed --meta pairs.
  • HTTP behaviour is untouched (decode path and handler unchanged); this PR does not touch the CLI local recall/import path, so no LongMemEval run is needed.

…metadata on every path (#1439, part E)

MCP uteke_remember now validates content, tags and type at decode, infers an omitted type, copies the type into metadata and rejects wrong-shaped tags and unknown arguments. The CLI parses --meta once for local and server writes, applies --timestamp before a server request and refuses --room via a server.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 82941ea into develop Oct 29, 2026
14 checks passed
@ajianaz
ajianaz deleted the refactor/unify-remember-1439 branch October 29, 2026 04:16
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