Skip to content

docs: integration test results + COLLECTION_GROUP index scope guidance#4

Merged
arncore merged 1 commit intodevelopfrom
docs/integration-tests-and-index-scope
Apr 16, 2026
Merged

docs: integration test results + COLLECTION_GROUP index scope guidance#4
arncore merged 1 commit intodevelopfrom
docs/integration-tests-and-index-scope

Conversation

@arncore
Copy link
Copy Markdown
Owner

@arncore arncore commented Apr 16, 2026

Summary

Adds end-to-end integration test results and critical documentation updates for the Firestore backend.

New — docs/FIRESTORE_INTEGRATION_TEST_RESULTS.md

Documents integration testing against a live Firestore database. 33/33 tests passing across:

  • Drawer CRUD (with Firestore document schema verification via REST API)
  • Vector search + duplicate detection
  • Knowledge graph (add, dedup, query, invalidate, timeline, stats)
  • Tunnels (create, symmetric IDs, list, delete)
  • Palace overview, diary, edge cases

Includes a complete drag-and-drop FastAPI reference server (~400 lines) so anyone can replicate the test setup.

Updated — docs/FIRESTORE_BACKEND.md

  1. Index scope — Documents the critical distinction between COLLECTION and COLLECTION_GROUP scope. When triples live in subcollections (e.g. users/{id}/memory/triples), COLLECTION scope composite indexes don't apply and queries fail at runtime with FailedPrecondition: The query requires an index. All 5 required KG composite indexes are listed as ready-to-deploy JSON.

  2. Package layout — Documents the backends/firestore/ subpackage structure with the lazy __getattr__ re-export pattern (ensures ChromaDB-only users don't need google-cloud-firestore installed).

  3. Testing — Adds pyright instructions and a link to the integration test results.

Why this matters

The COLLECTION vs COLLECTION_GROUP gotcha cost hours of debugging during integration testing. Documenting it prevents the same trap for downstream users.

🤖 Generated with Claude Code

Adds FIRESTORE_INTEGRATION_TEST_RESULTS.md documenting end-to-end tests
against a live Firestore instance (33/33 passing). Includes:
- Complete drag-and-drop FastAPI reference server
- Required environment, Dockerfile, requirements.txt
- Verified document schemas for drawers, triples, entities, tunnels

Updates FIRESTORE_BACKEND.md with:
- COLLECTION_GROUP scope requirement for composite indexes when triples
  live in subcollections (critical gotcha that causes runtime 500s if
  missed)
- Full list of required KG composite indexes
- Package layout section describing the new backends/firestore/ subpackage
- Pyright CI and integration test references

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@arncore arncore merged commit 21375be into develop Apr 16, 2026
7 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