Why I built AegisPR

While working on projects, I noticed that pull request reviews can take a lot of time. Small mistakes are sometimes missed, especially when the reviewer has to understand many changed files at once. Most existing tools can find formatting or security issues, but they do not always explain why a change is risky.

That gave me the idea for AegisPR. I wanted to build a tool that reviews a pull request like another developer and gives feedback that is easy to understand.

What AegisPR does

The user provides a public GitHub pull request URL. AegisPR downloads the changed files, checks which parts are important, and runs them through a review process.

The final report includes:

  • A summary of the pull request
  • Possible bugs and risky changes
  • The file connected to each finding
  • An explanation of why it may be a problem
  • A suggested way to fix it

The website also shows the different review stages while they are running, so the user can follow the process.

How I built it

I used Next.js, React, and TypeScript for the frontend. The backend was built using Python and FastAPI. The backend connects to GitHub, collects the pull request changes, and manages the review process.

I created a separate GPU worker using Python and CuPy. It ranks the changed files based on how relevant they are to the review. I deployed and tested this worker on my Dell Linux system with an NVIDIA GeForce RTX 3050 Ti GPU.

The services run in Docker containers and are connected using Docker Compose. I also added a Nebius Token Factory integration for model-based analysis. When an API key is not available, the project can run in demo mode for testing the workflow.

Challenges I faced

The GPU part was one of the hardest parts of the project. It worked differently inside the secure production container than it did during basic testing.

CuPy first tried to save its compiled files in a location that was read-only. I changed the cache location to the container's temporary storage. The CUDA runtime image was also missing some header files required by CuPy, so I changed it to the correct CUDA development image.

I also spent time securing the repository analysis process. A pull request contains code that cannot automatically be trusted, so I added URL validation, container limits, short execution times, restricted permissions, and authentication between the backend and GPU worker.

What I am proud of

The GPU worker is running a real AegisPR ranking workload on the NVIDIA GPU, rather than only running a CUDA test command.

The project currently has 69 automated tests covering the backend, frontend, GPU worker, security checks, and browser workflow. The tests and builds are passing through GitHub Actions.

I also documented the architecture, deployment process, security decisions, and the results of the live GPU test.

What I learned

This project taught me that adding GPU support is not only about installing CUDA. The container image, drivers, libraries, cache directories, permissions, and available GPU memory all need to work together.

I also learned that review feedback should be clear and supported by evidence. A few useful findings are better than many warnings that may not be correct.

What I want to add next

I would like to turn AegisPR into a GitHub App so it can review pull requests directly. I also want to add repository-specific rules, review history, support for larger NVIDIA GPUs, and the option to publish comments only after the user approves them.

Built With

Share this project:

Updates

Submission history