Skip to content

refactor: one remember sequence with one provenance failure policy; MCP remember takes source and author_type (#1516) - #1584

Merged
ajianaz merged 1 commit into
developfrom
refactor/remember-exec-1516
Oct 29, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/remember-exec-1516

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What

Uteke::run_remember (new remember_exec.rs) runs the whole remember sequence for a decoded RememberRequest: the strict-privacy check of the source, the choice of write entry point (room, contradiction, typed, plain) and the provenance follow-ups (source, author_type, author). HTTP post_remember, MCP exec_remember and the CLI remember::run only decode and render. MCP uteke_remember gains source, source_type and author_type (additive).

Why

#1516: each transport ran the follow-ups in its own order with its own failure policy (HTTP 400 or log-only, CLI abort, MCP abort). One policy now: values are validated before the write, so a follow-up can only fail on a database error; the memory is already stored, so the call succeeds and the failure is a warning (MCP text line, CLI stderr, log) rather than an error that invites a duplicate retry. A contradiction-checked write without a type now infers it like every other path.

Testing

  • cargo fmt, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo run -p docgen (no diff).
  • New core tests: type explicit/inferred on every entry point, provenance recorded, room author vs anonymous, contradiction result; MCP test for source/author_type.
  • Not done (stays open on refactor: let the typed remember request carry its provenance and one failure policy #1516): collapsing the seven public remember* core entry points behind the request; POST /room/remember keeps its own request. CORE note: the HTTP 400 on a failed author_type follow-up is unreachable after decode validation, so no visible change; contract issue for uteke-cloud to be filed if the owner wants the warning surfaced in the HTTP body.

…CP remember takes source and author_type (#1516)

Uteke::run_remember runs the source pre-check, the entry-point choice and the provenance follow-ups. HTTP, MCP and the CLI decode and render. A failing follow-up after the store is a warning, not an abort or a 400.
@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 e0a179b into develop Oct 29, 2026
14 checks passed
@ajianaz
ajianaz deleted the refactor/remember-exec-1516 branch October 29, 2026 06:00
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