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

Merged
aditya merged 1 commit 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 requested review from freemo 2026-03-26 13:17:11 +00:00
aditya force-pushed feature/m6-faiss-acms-backend from 9518ac3e44
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 3m34s
CI / security (pull_request) Successful in 4m9s
CI / typecheck (pull_request) Successful in 4m18s
CI / quality (pull_request) Successful in 3m46s
CI / unit_tests (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
to 68c5319e9c
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 28s
CI / security (pull_request) Successful in 4m1s
CI / typecheck (pull_request) Successful in 4m31s
CI / quality (pull_request) Successful in 4m26s
CI / integration_tests (pull_request) Successful in 6m37s
CI / unit_tests (pull_request) Successful in 8m4s
CI / docker (pull_request) Successful in 1m2s
CI / e2e_tests (pull_request) Successful in 10m54s
CI / coverage (pull_request) Successful in 11m35s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h0m19s
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

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
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 28s
CI / security (pull_request) Successful in 4m1s
CI / typecheck (pull_request) Successful in 4m31s
CI / quality (pull_request) Successful in 4m26s
CI / integration_tests (pull_request) Successful in 6m37s
CI / unit_tests (pull_request) Successful in 8m4s
CI / docker (pull_request) Successful in 1m2s
CI / e2e_tests (pull_request) Successful in 10m54s
CI / coverage (pull_request) Successful in 11m35s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h0m19s
to e618a93563
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 45s
CI / build (pull_request) Successful in 14s
CI / helm (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 3m40s
CI / security (pull_request) Successful in 4m45s
CI / integration_tests (pull_request) Successful in 6m10s
CI / unit_tests (pull_request) Successful in 6m32s
CI / docker (pull_request) Successful in 1m41s
CI / e2e_tests (pull_request) Successful in 20m42s
CI / coverage (pull_request) Successful in 14m12s
CI / status-check (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
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
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 45s
CI / build (pull_request) Successful in 14s
CI / helm (pull_request) Successful in 34s
CI / quality (pull_request) Successful in 3m40s
CI / security (pull_request) Successful in 4m45s
CI / integration_tests (pull_request) Successful in 6m10s
CI / unit_tests (pull_request) Successful in 6m32s
CI / docker (pull_request) Successful in 1m41s
CI / e2e_tests (pull_request) Successful in 20m42s
CI / coverage (pull_request) Successful in 14m12s
CI / status-check (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
to dde49dfc52
Some checks failed
CI / quality (pull_request) Successful in 37s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m21s
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 3m59s
CI / security (pull_request) Successful in 4m7s
CI / unit_tests (pull_request) Successful in 4m33s
CI / integration_tests (pull_request) Successful in 3m59s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m44s
CI / e2e_tests (pull_request) Successful in 20m0s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
2026-03-30 11:08:11 +00:00
Compare
aditya force-pushed feature/m6-faiss-acms-backend from dde49dfc52
Some checks failed
CI / quality (pull_request) Successful in 37s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 3m21s
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 3m59s
CI / security (pull_request) Successful in 4m7s
CI / unit_tests (pull_request) Successful in 4m33s
CI / integration_tests (pull_request) Successful in 3m59s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m44s
CI / e2e_tests (pull_request) Successful in 20m0s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
to 1250041356
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 1m6s
CI / lint (pull_request) Successful in 3m19s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 7m3s
CI / unit_tests (pull_request) Successful in 9m36s
CI / docker (pull_request) Successful in 1m58s
CI / coverage (pull_request) Successful in 12m17s
CI / e2e_tests (pull_request) Successful in 18m39s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
2026-03-30 11:37:47 +00:00
Compare
aditya force-pushed feature/m6-faiss-acms-backend from 1250041356
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 35s
CI / typecheck (pull_request) Successful in 1m6s
CI / lint (pull_request) Successful in 3m19s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 7m3s
CI / unit_tests (pull_request) Successful in 9m36s
CI / docker (pull_request) Successful in 1m58s
CI / coverage (pull_request) Successful in 12m17s
CI / e2e_tests (pull_request) Successful in 18m39s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
to 4b9e5a9836
Some checks failed
CI / build (pull_request) Successful in 20s
CI / helm (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 37s
CI / security (pull_request) Successful in 1m0s
CI / quality (pull_request) Successful in 3m44s
CI / integration_tests (pull_request) Successful in 3m53s
CI / typecheck (pull_request) Successful in 4m0s
CI / benchmark-publish (pull_request) Has been skipped
CI / unit_tests (pull_request) Successful in 13m52s
CI / coverage (pull_request) Successful in 12m20s
CI / docker (pull_request) Successful in 2m2s
CI / e2e_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
2026-03-30 12:00:17 +00:00
Compare
aditya force-pushed feature/m6-faiss-acms-backend from 4b9e5a9836
Some checks failed
CI / build (pull_request) Successful in 20s
CI / helm (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 37s
CI / security (pull_request) Successful in 1m0s
CI / quality (pull_request) Successful in 3m44s
CI / integration_tests (pull_request) Successful in 3m53s
CI / typecheck (pull_request) Successful in 4m0s
CI / benchmark-publish (pull_request) Has been skipped
CI / unit_tests (pull_request) Successful in 13m52s
CI / coverage (pull_request) Successful in 12m20s
CI / docker (pull_request) Successful in 2m2s
CI / e2e_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
to af2114c043
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 46s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m44s
CI / integration_tests (pull_request) Successful in 3m59s
CI / security (pull_request) Successful in 4m25s
CI / unit_tests (pull_request) Successful in 7m18s
CI / docker (pull_request) Successful in 1m30s
CI / e2e_tests (pull_request) Successful in 14m41s
CI / coverage (pull_request) Successful in 11m56s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
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
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 46s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m44s
CI / integration_tests (pull_request) Successful in 3m59s
CI / security (pull_request) Successful in 4m25s
CI / unit_tests (pull_request) Successful in 7m18s
CI / docker (pull_request) Successful in 1m30s
CI / e2e_tests (pull_request) Successful in 14m41s
CI / coverage (pull_request) Successful in 11m56s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
to eff446f5e8
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 50s
CI / quality (pull_request) Successful in 3m44s
CI / integration_tests (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Successful in 4m5s
CI / security (pull_request) Successful in 4m6s
CI / docker (pull_request) Successful in 1m18s
CI / coverage (pull_request) Successful in 14m17s
CI / e2e_tests (pull_request) Successful in 21m13s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 58m23s
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 milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!1165
No description provided.