Problem
Each K8s Job currently clones the repo from scratch. This is slow, especially for:
- Implement/feedback cycles on the same task
- Multiple tasks against the same repo
- Larger repositories
Solution
Add a shared git cache PVC that persists across jobs:
/git-cache/
github.com/
oldsj/
mainloop.git/ # bare repo cache
someorg/
their-repo.git/
Behavior
- First request for a repo → clone bare repo to cache
- Subsequent requests (any task) →
git fetch to update, clone locally from cache
- Different repo → clone that one too, cache grows over time
Jobs use git clone --reference /git-cache/... --dissociate for fast local clones.
Future: Project Management
Layer on top of cache:
- Track which repos mainloop knows about in DB
- Per-repo settings (default branch, CI requirements, etc)
/add-project command to register new repos
Problem
Each K8s Job currently clones the repo from scratch. This is slow, especially for:
Solution
Add a shared git cache PVC that persists across jobs:
Behavior
git fetchto update, clone locally from cacheJobs use
git clone --reference /git-cache/... --dissociatefor fast local clones.Future: Project Management
Layer on top of cache:
/add-projectcommand to register new repos