Skip to content

feat(v3.0): cross-project federated query (Phase 53.5)#25

Merged
RichardHightower merged 4 commits into
mainfrom
feature/v3.0-cross-project-memory
May 14, 2026
Merged

feat(v3.0): cross-project federated query (Phase 53.5)#25
RichardHightower merged 4 commits into
mainfrom
feature/v3.0-cross-project-memory

Conversation

@RichardHightower
Copy link
Copy Markdown
Contributor

@RichardHightower RichardHightower commented Apr 10, 2026

Summary

Implements cross-project federated query: a single query can span multiple registered project stores, with project attribution on each result.

Phase numbering note (rebased 2026-05-12): Originally drafted as v3.0 Phase 51 before the Retrieval Orchestrator (PR #28) took that slot. Rebased onto post-Phase-51 main and renumbered as Phase 53.5 — an out-of-band decimal phase, mirroring the Phase 51.5 pattern used for PR #27. This preserves v3.0 Competitive Parity's documented scope (Phases 51-53) without renaming planned work.

What changed

File Change
proto/memory.proto Added all_projects flag to RouteQueryRequest, project attribution field to RetrievalResult
memory-types/config.rs New CrossProjectConfig { registered: Vec<PathBuf> } + projects field in Settings
memory-storage/db.rs Added Storage::open_read_only() for federation
memory-service/federated.rs (NEW) federated_query() — fans out to registered stores, merges results, project attribution, fail-open
memory-service/retrieval.rs Wired federated_query behind all_projects opt-in flag
e2e-tests/cross_project_test.rs (NEW) 4 E2E tests
.planning/STATE.md, .planning/ROADMAP.md Recorded as v3.0 Phase 53.5 (out-of-band)

Design decisions

  • Opt-in only — default single-project behavior is completely unchanged
  • Fail-open — unavailable stores are silently skipped, never block a query
  • Project attributionproject field on results uses serde(default) for backward-compatible JSON, matching the existing agent field pattern from v2.1
  • Index-free fallback — added a primary TOC fallback inside federated_query so cross-project works even when BM25/vector indexes aren't built for a store
  • Config-driven — register project paths in config.toml under [projects]

Tests

13/13 passing:

  • 9 unit tests (federated module)
  • 4 E2E tests: merged results, project attribution, fail-open on unavailable store, default behavior unchanged

Verified via task pr-precheck after rebase: fmt + clippy + tests + docs all green.

Usage

```toml

~/.config/agent-memory/config.toml

[projects]
registered = [
"/path/to/project-a",
"/path/to/project-b"
]
```

Then query with all_projects: true in the RouteQueryRequest.

- Add registered_projects config for multi-store federation
- Implement FederatedQueryHandler with fail-open semantics
- Add project attribution field to query results
- Wire cross-project behind opt-in flag
- Add E2E tests for multi-store query and attribution
@RichardHightower RichardHightower force-pushed the feature/v3.0-cross-project-memory branch from 4da2829 to 35ae2f6 Compare May 14, 2026 18:45
@RichardHightower RichardHightower merged commit 1de8758 into main May 14, 2026
27 of 29 checks passed
@RichardHightower RichardHightower deleted the feature/v3.0-cross-project-memory branch May 14, 2026 18:57
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