Feature/add embedding storaging#23
Merged
Merged
Conversation
added 15 commits
May 13, 2026 17:45
… constraint for db_init
…on_evidence_agent to avoid large output 2. remove redundant commit_sha field at PRReviewOutput for code_review_writer_agent 3. pass repo_id as a str instead of int for code_chunk_embedding calling at code_indexing.py for consistancy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds code chunk embedding storage and convention-aware evidence gathering to the PR review pipeline. It indexes code chunks with OpenAI embeddings, stores vectors in PostgreSQL using pgvector, and uses semantic search
to retrieve similar repository code for convention evidence during automated reviews.
Type of Change
Changes Made
code_chunk_embeddingstable plus vector indexes.code_review_agent.pyimplementation.openaidependency usage for embedding generation.How to Test
Run the existing test suite:
Run static type checks:
uv run mypy codehawk
Verify database initialization creates the pgvector extension and code_chunk_embeddings table.
Run the code indexing flow against a repository archive and confirm:
Run the PR review flow and confirm:
Checklist
Breaking Changes
Additional Notes
This PR targets the review branch from feature/add-embedding-storaging.