feat(acms): integrate FAISS into ACMS vector backend protocol #1165

Merged
aditya merged 1 commits from feature/m6-faiss-acms-backend into master 2026-03-30 13:40:25 +00:00
Member

Summary

  • add FAISS-backed ACMS read/write adapters on top of the shared VectorStoreService and wire them through the DI container with config-driven fallback to in-memory stubs when FAISS is unavailable
  • add Behave coverage for indexing, scoped similarity search, removal, config-driven embeddings, and DI resolution, plus ASV coverage for ACMS vector search latency
  • address review feedback by keeping the branch scoped to FAISS backend work and replacing the loose vector-store cache typing with explicit FAISS store protocols instead of Any

Validation

  • TEST_PROCESSES=9 nox -s lint
  • TEST_PROCESSES=9 nox -s typecheck
  • TEST_PROCESSES=9 nox -s unit_tests -- features/faiss_vector_backend.feature
  • TEST_PROCESSES=9 nox -s coverage_report -- features/faiss_vector_backend.feature (feature scenarios passed; repo-wide 97% coverage is not meaningful on a single-feature subset)

Notes

  • Rebased on the latest master before force-pushing the review fixes.
  • ASV measurements for the new benchmark were approximately 0.0001066s / 0.0001235s for project search and 0.0000844s / 0.0000965s for scoped similarity search on 250 / 1000 documents.
  • The issue's 10M-corpus benchmark acceptance checkbox remains unchecked because this environment validated the benchmark implementation and representative timings, but did not empirically execute a 10M embedding corpus run.

Closes #871

## Summary - add FAISS-backed ACMS read/write adapters on top of the shared `VectorStoreService` and wire them through the DI container with config-driven fallback to in-memory stubs when FAISS is unavailable - add Behave coverage for indexing, scoped similarity search, removal, config-driven embeddings, and DI resolution, plus ASV coverage for ACMS vector search latency - address review feedback by keeping the branch scoped to FAISS backend work and replacing the loose vector-store cache typing with explicit FAISS store protocols instead of `Any` ## Validation - `TEST_PROCESSES=9 nox -s lint` - `TEST_PROCESSES=9 nox -s typecheck` - `TEST_PROCESSES=9 nox -s unit_tests -- features/faiss_vector_backend.feature` - `TEST_PROCESSES=9 nox -s coverage_report -- features/faiss_vector_backend.feature` (feature scenarios passed; repo-wide 97% coverage is not meaningful on a single-feature subset) ## Notes - Rebased on the latest `master` before force-pushing the review fixes. - ASV measurements for the new benchmark were approximately `0.0001066s` / `0.0001235s` for project search and `0.0000844s` / `0.0000965s` for scoped similarity search on 250 / 1000 documents. - The issue's 10M-corpus benchmark acceptance checkbox remains unchecked because this environment validated the benchmark implementation and representative timings, but did not empirically execute a 10M embedding corpus run. Closes #871
aditya added this to the v3.6.0 milestone 2026-03-26 13:15:04 +00:00
aditya added the
Type
Feature
label 2026-03-26 13:15:12 +00:00
aditya requested review from freemo 2026-03-26 13:17:11 +00:00
aditya force-pushed feature/m6-faiss-acms-backend from 9518ac3e44 to 68c5319e9c 2026-03-26 13:21:04 +00:00 Compare
Owner

Code Review Note

Unable to review — the branch feature/m6-faiss-acms-backend was not found on the remote. Please verify the branch exists and has been pushed.

## Code Review Note **Unable to review** — the branch `feature/m6-faiss-acms-backend` was not found on the remote. Please verify the branch exists and has been pushed.
freemo approved these changes 2026-03-30 04:21:49 +00:00
Dismissed
freemo left a comment
Owner

Review: APPROVED with Comments

Solid FAISS integration with config-driven fallback.

Notes

  1. Isolate unrelated changes: wrapping.py semgrep comment changes and E2E Robot key-skip additions are tangential. Per CONTRIBUTING.md §Atomic Commits, these should be separate commits.
  2. _cache type annotation changed from dict[int, FAISS] to dict[int, Any] — loses type safety. Restore the proper annotation.
  3. Good: Thread-safe design, graceful in-memory fallback, argument validation, BDD tests + ASV benchmark.
## Review: APPROVED with Comments Solid FAISS integration with config-driven fallback. ### Notes 1. **Isolate unrelated changes**: `wrapping.py` semgrep comment changes and E2E Robot key-skip additions are tangential. Per CONTRIBUTING.md §Atomic Commits, these should be separate commits. 2. **`_cache` type annotation changed** from `dict[int, FAISS]` to `dict[int, Any]` — loses type safety. Restore the proper annotation. 3. **Good**: Thread-safe design, graceful in-memory fallback, argument validation, BDD tests + ASV benchmark.
Owner

Day 50 Planning — Branch availability required.

The branch feature/m6-faiss-acms-backend was reported as not found on remote since Day 48. This PR integrates FAISS into the ACMS vector backend protocol (v3.6.0).

@freemo — Please push the branch or confirm status. Reviewers assigned.

Day 50 Planning — **Branch availability required.** The branch `feature/m6-faiss-acms-backend` was reported as not found on remote since Day 48. This PR integrates FAISS into the ACMS vector backend protocol (v3.6.0). @freemo — Please push the branch or confirm status. Reviewers assigned.
aditya force-pushed feature/m6-faiss-acms-backend from 68c5319e9c to e618a93563 2026-03-30 10:40:40 +00:00 Compare
aditya dismissed freemo's review 2026-03-30 10:40:40 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
Member

Addressed the review notes and force-pushed an updated branch.

Review items resolved:

  1. Removed the unrelated wrapping.py semgrep-annotation edits and the Robot E2E OPENAI_API_KEY skip changes so this PR is scoped only to the FAISS ACMS backend work.
  2. Replaced the loose VectorStoreService cache typing with explicit FAISS store protocols instead of Any, preserving static typing without reintroducing the optional-import issue.
  3. Rebased the branch on the latest master before pushing the fix round.

Validation for this review round:

  • nox -s lint
  • nox -s typecheck
  • nox -s unit_tests
  • nox -s coverage_report
Addressed the review notes and force-pushed an updated branch. Review items resolved: 1. Removed the unrelated `wrapping.py` semgrep-annotation edits and the Robot E2E `OPENAI_API_KEY` skip changes so this PR is scoped only to the FAISS ACMS backend work. 2. Replaced the loose `VectorStoreService` cache typing with explicit FAISS store protocols instead of `Any`, preserving static typing without reintroducing the optional-import issue. 3. Rebased the branch on the latest `master` before pushing the fix round. Validation for this review round: - `nox -s lint` - `nox -s typecheck` - `nox -s unit_tests` - `nox -s coverage_report`
aditya force-pushed feature/m6-faiss-acms-backend from e618a93563 to dde49dfc52 2026-03-30 11:08:11 +00:00 Compare
aditya force-pushed feature/m6-faiss-acms-backend from dde49dfc52 to 1250041356 2026-03-30 11:37:47 +00:00 Compare
aditya force-pushed feature/m6-faiss-acms-backend from 1250041356 to 4b9e5a9836 2026-03-30 12:00:17 +00:00 Compare
aditya force-pushed feature/m6-faiss-acms-backend from 4b9e5a9836 to af2114c043 2026-03-30 12:20:11 +00:00 Compare
aditya scheduled this pull request to auto merge when all checks succeed 2026-03-30 12:25:42 +00:00
aditya force-pushed feature/m6-faiss-acms-backend from af2114c043 to eff446f5e8 2026-03-30 13:19:09 +00:00 Compare
aditya scheduled this pull request to auto merge when all checks succeed 2026-03-30 13:27:11 +00:00
aditya merged commit f03e510a11 into master 2026-03-30 13:40:25 +00:00
aditya deleted branch feature/m6-faiss-acms-backend 2026-03-30 13:40:26 +00:00
Sign in to join this conversation.
No Reviewers
No Label
Type
Feature
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#1165