How sumukha-r/pr-rakshaka works
pr-rakshaka reviews GitHub pull requests from a web UI or CLI: it fetches the PR, runs missing-test, code-reuse, and hot-path-smell checks, filters findings against added diff lines, and produces a deterministic report. The repository also contains an agent-based review implementation and a nightly indexing pipeline; these are shown as distinct branches. Edges follow README workflow statements and sampled source references; unsampled implementations are represented only where the tree supports their subsystem.
Main entry points: main.py CLI runner · client.py LLM client · reuse_detector.py Reuse detection · indexer.py Repository indexer
Components 21
Review entry points
- Streamlit UI
app.py - CLI runner
main.py
Review workflow
- PR ingestion
src/ingestion/pr_parser.py - Missing tests
src/checks/missing_tests.py - Reuse detection
src/checks/reuse_detector.py - Hot-path smells
src/checks/hot_path_smells.py - Evidence filter
src/llm/aggregator.py - Review report
src/report/generator.py - LLM client
src/llm/client.py
Code context
- Repository indexer
src/rag/indexer.py - Code retriever
src/rag/retriever.py - ChromaDB index
Agent review
- Agent checks
src/agent/checks.py - Agent loop
src/agent/loop.py - Repository tools
src/agent/tools.py - GitHub reader
src/agent/github.py
Nightly pipeline
- Airflow schedule
airflow/dags/pr_rakshaka_nightly.py - Nightly pipeline
src/pipeline/nightly.py
Other components
- Reviewer
- GitHub REST API
- Groq / Ollama
Connections 23
- Reviewer → Streamlit UI: submits PR
README.md - Reviewer → CLI runner: provides URL
README.md - Streamlit UI → CLI runner: calls shared runner
README.md - CLI runner → PR ingestion: fetches PR
main.py - PR ingestion → GitHub REST API: requests PR data
README.md - CLI runner → Missing tests: runs check
main.py - CLI runner → Reuse detection: runs check
main.py - CLI runner → Hot-path smells: runs check
main.py - CLI runner → Repository indexer: optionally indexes
main.py - Reuse detection → Code retriever: searches similar code
src/checks/reuse_detector.py - Missing tests → LLM client: requests judgment
src/checks/missing_tests.py - Reuse detection → LLM client: requests judgment
src/checks/reuse_detector.py - Hot-path smells → LLM client: requests judgment
src/checks/hot_path_smells.py - LLM client → Groq / Ollama: calls configured backend
README.md - CLI runner → Evidence filter: filters findings
main.py - CLI runner → Review report: generates report
main.py - Repository indexer → ChromaDB index: persists embeddings
README.md - Code retriever → ChromaDB index: searches index
README.md - Agent checks → Agent loop: uses review loop
src/agent/checks.py - Agent loop → Repository tools: dispatches tools
src/agent/loop.py - Repository tools → GitHub reader: reads repository
src/agent/tools.py - Airflow schedule → Nightly pipeline: invokes pipeline
airflow/dags/pr_rakshaka_nightly.py - Nightly pipeline → Repository indexer: indexes repository
src/pipeline/nightly.py