Skip to content

feat: add explicit branch access for memory operations#203

Merged
aptend merged 1 commit into
matrixorigin:mainfrom
aptend:feat/subagent-concurrent-branch-access
May 25, 2026
Merged

feat: add explicit branch access for memory operations#203
aptend merged 1 commit into
matrixorigin:mainfrom
aptend:feat/subagent-concurrent-branch-access

Conversation

@aptend

@aptend aptend commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add explicit branch selection for memory store/retrieve/search/list/get/correct/purge/observe paths
  • route memory history and master fallback lookups through explicit branch selection
  • constrain batch store to a single top-level branch; per-memory branch must be empty or match the batch branch
  • keep legacy checkout behavior when branch is omitted
  • tighten group-mode main write guards so branch-aware writes can target non-main safely while main-only governance remains blocked
  • forward branch through MCP and remote MCP clients

Motivation

This PR supports concurrent subagent exploration. Multiple subagents using the same Memoria user can now operate on different branches by passing branch explicitly, instead of racing on the shared mem_user_state.active_branch checkout pointer.

Validation

  • cargo clippy -- -D warnings
  • cargo test --lib -p memoria-api
  • cargo test --lib -p memoria-core -p memoria-service -p memoria-mcp
  • git diff --check

Note: MatrixOne-backed branch_ops integration test was added, but local execution previously timed out because the database was unavailable.

@aptend aptend changed the title Support subagent concurrent branch exploration feat: add explicit branch access for memory operations May 22, 2026
@aptend aptend force-pushed the feat/subagent-concurrent-branch-access branch 2 times, most recently from ca5f8f0 to ea65f72 Compare May 22, 2026 06:43
@aptend aptend force-pushed the feat/subagent-concurrent-branch-access branch from ea65f72 to b6b3eab Compare May 25, 2026 02:50
@aptend aptend enabled auto-merge (squash) May 25, 2026 07:53
@aptend aptend disabled auto-merge May 25, 2026 07:53
@aptend aptend merged commit 7b2b372 into matrixorigin:main May 25, 2026
6 checks passed
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