Skip to content

refactor: remove the Recall/List/Remember/Forget policy types (#1439, part G) - #1582

Merged
ajianaz merged 1 commit into
developfrom
refactor/remove-policies-1439
Oct 29, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/remove-policies-1439

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What

Part G of #1439: delete RecallPolicy, ListPolicy, RememberPolicy, ForgetPolicy and the forget-only enums IdCharset, FullIdForm, UnmatchedPrefixText. RecallRequest::decode, ListRequest::decode, RememberRequest::decode and ForgetRequest::decode take only the input; ForgetRequest::resolve and resolve_memory_id lose their policy argument. Tests that compared the HTTP and MCP policies are now single-behaviour tests.

Why

After parts C to F every surface follows the HTTP rules, so each policy had one value. The structs only encoded a divergence that no longer exists. grep Policy::HTTP|Policy::MCP now returns nothing.

Testing

  • cargo fmt, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo run -p docgen (no diff).
  • No behaviour change: the former HTTP values are inlined (blank query rejected, tags: [] no filter, caps 100/1000, default limit 10, type validated and copied to metadata, hex-and-dash ids, hyphenated full ids, Memory not found plus existence check).
  • Not in this PR: moving the inline test modules out of the large files (mechanical, tracked as a follow-up) and the CLI --type default (follow-up E2).

… part G)

Every surface follows the HTTP rules, so each policy had one value. decode takes only the input; resolve and resolve_memory_id lose their policy argument; IdCharset, FullIdForm and UnmatchedPrefixText are removed. No behaviour change.
@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 61824a2 into develop Oct 29, 2026
14 checks passed
@ajianaz
ajianaz deleted the refactor/remove-policies-1439 branch October 29, 2026 04:48
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