full MVP almost ready for beta release - #4
Conversation
feat(docker): Add observability stack and enhance configuration for Grafana and Prometheus - Introduced `postgres-exporter`, `loki`, and `promtail` services in `docker-compose.yml` for improved observability. - Updated Grafana configuration to allow embedding and anonymous access, changing the port to 3001. - Enhanced Prometheus configuration to scrape metrics from the new `postgres-exporter` and updated Neo4j target. - Revised `README.md` to include instructions for starting the - Added new API endpoints for retrieving entity neighbors and community members, enhancing graph query capabilities. - Improved metrics collection in the FastAPI application to track search requests and errors. These changes significantly enhance the observability and monitoring capabilities of the TriBridRAG system, providing better insights into performance and usage.
There was a problem hiding this comment.
💡 Codex Review
https://github.com/DMontgomery40/tribrid-rag/blob/15d62980b79dc2f90fe2f0eb54c74b9ec92bc05c/server/db/neo4j.py#L366-L368
Scope entity lookup to repo_id
In shared Neo4j mode (single database for multiple corpora), get_entity matches only on entity_id and ignores the requested corpus_id. That means a client can retrieve an entity that belongs to a different corpus if they know its entity_id, which violates corpus isolation and can surface the wrong data in the /graph/{corpus_id}/entity/{entity_id} endpoint. Consider adding a repo_id predicate (and passing it through from the API) so the lookup is scoped to the requested corpus.
https://github.com/DMontgomery40/tribrid-rag/blob/15d62980b79dc2f90fe2f0eb54c74b9ec92bc05c/server/db/neo4j.py#L476-L479
Scope relationship lookup to repo_id
The relationship query matches only on entity_id without constraining repo_id. In shared-database deployments, requesting /graph/{corpus_id}/entity/{entity_id}/relationships can return relationships for an entity that belongs to a different corpus if its ID is supplied, which breaks data isolation and can confuse the graph UI. Add a repo_id predicate (and pass it from the API layer) to ensure relationships are returned only for the requested corpus.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
full MVP almost ready for beta release
feat(docker): Add observability stack and enhance configuration for Grafana and Prometheus
postgres-exporter,loki, andpromtailservices indocker-compose.ymlfor improved observability.postgres-exporterand updated Neo4j target.README.mdto include instructions for starting theThese changes significantly enhance the observability and monitoring capabilities of the TriBridRAG system, providing better insights into performance and usage.