Repository navigation
merg jul;e - #168
merg jul;e#168sjoerd2025 wants to merge 40 commits into
Conversation
…on-1476546773550709856 ⚡ Optimize webhook performance with batch operations
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Batched repository upserts in `syncInstallation` to reduce N+1 queries. - Replaced iterative deletion with `deleteMany` in `cleanupSuspendedInstallations`. - Added `src/lib/installation-service.test.ts` to verify behavior. Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds angular-standards (testing & docs enforcement), angular-best-practices, angular-migration, and ng-update from sjoerd2025/cli-docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…y-upsert-1394745518843308883 Refactor: extract duplicate repository upsert logic
…082335678021 ⚡ Optimize retryAllFlaggedTasks to avoid redundant DB fetch
…020874637062 🧪 Add tests for getInstallationStatus
…tar-check-7064352253284591806 🔒 Security: Fix DoS vulnerability in checkIfUserStarredRepository
…service-10460793182449338768 ⚡ Bolt: Optimize Installation Service Sync and Cleanup
…8792540152619938779 Refactor: remove leftover debug logging in label setup handler
…17552834892220776312 refactor: remove debug logging in installation status handler
…96648701832816 🧪 Add tests for src/lib/number.ts
…ts-4789700094769845220 🧪 Testing Improvement: Add tests for crypto.ts
…484581071 Secure tasks router endpoints with adminProcedure
…ts-12691864612353580486 🧪 Testing Improvement: Add tests for crypto utility
…1252433783763 🔒 Fix timing attack in cron secret verification
…ueries Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
…797207216585041 ⚡ Bolt: optimize rate-limiter.ts to prevent TOCTOU race condition
Fixes N+1 API querying and sequentially-blocking operations inside `syncAllInstallations` by pre-fetching the necessary data globally and executing batched synchronization chunks concurrently. Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Replaced manual findUnique and conditionally update/create pattern with a single Prisma upsert call in src/lib/jules.ts. This reduces database round-trips from two to one. Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
Refactored the repository removal handler in \`src/app/api/webhooks/github-app/route.ts\` to use a single \`updateMany\` query with Prisma's \`in\` operator instead of executing multiple separate queries within a \`Promise.all\`. This eliminates N+1 query bottlenecks during bulk uninstallation or repository access removal events. Co-authored-by: sjoerd2025 <244033076+sjoerd2025@users.noreply.github.com>
…sk-12040283002622463515 ⚡ Bolt: Refactor manual upsert to use Prisma native upsert for JulesTask
…al-11189785954534146822 ⚡ Bolt: Optimize bulk repository removal
…ions-3088437305465949765 ⚡ Bolt: Optimize syncAllInstallations performance
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8ef5c0130
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }); | ||
|
|
||
| // Batch create labels in the repositories | ||
| await createJulesLabelsForRepositories( |
There was a problem hiding this comment.
Move throttled label creation outside the transaction
When a setupType: "all" installation adds 51 or more repositories, this call runs inside the transaction opened by handleInstallationRepositoriesEvent, while createJulesLabelsForRepositories sleeps one second between each batch of 10. Those sleeps alone reach the default five-second interactive-transaction timeout, so the database changes roll back even though some GitHub labels may already have been created; move the rate-limited GitHub work outside the transaction or otherwise avoid the timeout.
Useful? React with 👍 / 👎.
| where: { id: taskId }, | ||
| }); | ||
| } else { | ||
| task = taskOrId; |
There was a problem hiding this comment.
Revalidate queued tasks before retrying their snapshots
If an admin clears flaggedForRetry after getFlaggedTasks() snapshots the queue but before a worker reaches this task, this branch uses the stale true value instead of reloading the record. The worker then still swaps the GitHub labels and updates retry metrics for a task that was unqueued; revalidate or claim the task before performing those side effects.
Useful? React with 👍 / 👎.
No description provided.