feat: Trigger.dev index-repo task with R2 storage#88
Conversation
- Scaffold apps/trigger with Trigger.dev SDK v4 (#81) - GitHub App JWT generation, installation tokens, tarball download (#82) - R2 upload helpers: tarball, file-tree.json, individual files (#83) - DrizzleSyncStorage: Merkle state via Drizzle/Neon (#84) - index-repo task: walk → chunk → embed → upsert → Merkle persist → R2 (#85) - Wire webhook to trigger index-repo after repo upsert (#86) - 170 tests passing (153 core + 17 web)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Fix SHA extraction: use redirect:manual to capture SHA from Location URL - Bulk chunk cache inserts instead of sequential per-chunk DB round-trips - Remove redundant hashFiles call — reuse fileHashMap from computeChanges - Return 500 on webhook errors so GitHub retries delivery - Reuse S3Client singleton instead of creating one per file upload
Summary
node:crypto, installation token exchange, tarball download+extraction with strip:1 and commit SHA extraction. Closes feat: GitHub App JWT + tarball download #82@aws-sdk/client-s3— uploadBuffer, uploadFile, uploadRepoFiles (bounded concurrency), buildFileTree. Closes feat: R2 upload helpers #83SyncStorageinterface using Drizzle ORM against fileHashes/dirHashes tables, scoped by repoId, with upsert-on-conflict idempotency. Closes feat: DrizzleSyncStorage for Neon Postgres #84schemaTask— loads repo from DB, downloads tarball, walks files (useGit: false), batched pipeline (50 files: chunk → embed → upsert → chunkCache), Merkle persist, R2 upload (tarball + file-tree.json + files), status updates, cleanup in finally. Deterministic point IDs via UUIDv5. Closes feat: implement index-repo Trigger.dev task #85upsertRepos, triggersindex-repowith idempotencyKey for dedup. Added.returning()to get repo IDs. Closes feat: wire webhook to trigger index-repo task #86Test plan