Skip to content

fix: Stop tracking ChromaDB SQLite files to prevent merge conflicts#176

Open
sharma-sugurthi wants to merge 1 commit intoAOSSIE-Org:mainfrom
sharma-sugurthi:fix/chromadb-clean-173
Open

fix: Stop tracking ChromaDB SQLite files to prevent merge conflicts#176
sharma-sugurthi wants to merge 1 commit intoAOSSIE-Org:mainfrom
sharma-sugurthi:fix/chromadb-clean-173

Conversation

@sharma-sugurthi
Copy link

@sharma-sugurthi sharma-sugurthi commented Jan 25, 2026

Closes #173

Problem

Backend/db/chromadb/chroma.sqlite3 was tracked in version control, causing merge conflicts after every backend run since ChromaDB modifies the binary file at runtime.

Solution

  • ✅ Added ChromaDB SQLite files to Backend/.gitignore
  • ✅ Removed chroma.sqlite3 from Git tracking (preserved locally)
  • ✅ Database auto-recreates on backend startup via chromadb.PersistentClient

Verification

  • Analyzed agent/vector_store.py - database initializes automatically
  • Confirmed 0 embeddings in current DB (no seed data loss)
  • Collections auto-create via get_or_create_collection()
  • Tested locally: file persists after git rm --cached

Impact

  • ✅ Eliminates merge conflicts for all contributors
  • ✅ No functionality change (backend behavior identical)
  • ✅ Cleaner git status for developers

Summary by CodeRabbit

  • Chores
    • Updated repository configuration to better manage database files in version control.

✏️ Tip: You can customize this high-level summary in your review settings.

Resolves AOSSIE-Org#173

## Problem
Backend/db/chromadb/chroma.sqlite3 was tracked in version control,
causing merge conflicts after every backend run since ChromaDB
modifies the SQLite binary file at runtime.

## Root Cause
ChromaDB's PersistentClient modifies the database when
agent/vector_store.py initializes during app startup.

## Solution
- Added ChromaDB runtime files to Backend/.gitignore
- Removed chroma.sqlite3 from Git tracking (preserved locally)
- Database auto-recreates on backend startup via:
  * os.makedirs('db/chromadb', exist_ok=True)
  * chromadb.PersistentClient(path='db/chromadb')
  * get_or_create_collection() for both collections

## Verification
- No seed data in current DB (0 embeddings, 2 empty collections)
- Collections auto-create: pregnancy_guidelines, user_details
- Data loaded from agent/guidelines.json when needed
- Safe to remove from version control
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

The pull request updates Backend/.gitignore to exclude ChromaDB SQLite database files and related temporary files by adding three ignore patterns: *.sqlite3, *.sqlite3-shm, and *.sqlite3-wal. This prevents version control from tracking runtime-modified database artifacts.

Changes

Cohort / File(s) Change Summary
Gitignore Configuration
Backend/.gitignore
Added three patterns to exclude ChromaDB SQLite database files (*.sqlite3, *.sqlite3-shm, *.sqlite3-wal) from version control

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hop, skip, and away with these databases of change,
No more merge conflicts in version control's range!
SQLite files dance freely, untracked and untamed,
ChromaDB flourishes bright, unshamed and unclaimed. 🌿✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements most core requirements from #173: added ignore patterns for SQLite files and removed tracked binaries. However, README documentation and database seeding/removal verification are not addressed in this changeset. Add a README note documenting auto-initialization behavior and clarify whether the database contained seed data or should be removed from the repo.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: stopping tracking of ChromaDB SQLite files to prevent merge conflicts.
Out of Scope Changes check ✅ Passed Only Backend/.gitignore was modified, which is directly related to the linked issue requirements. No extraneous or unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Fix: Stop tracking ChromaDB SQLite files to prevent merge conflicts

1 participant