Skip to content

merg jules - #169

Closed
sjoerd2025 wants to merge 40 commits into
iHildy:mainfrom
sjoerd2025:main
Closed

sjoerd2025 wants to merge 40 commits into
iHildy:mainfrom
sjoerd2025:main

Conversation

@sjoerd2025

Copy link
Copy Markdown

No description provided.

google-labs-jules Bot and others added 30 commits February 20, 2026 09:11
…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
sjoerd2025 and others added 10 commits March 1, 2026 22:44
…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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T14:27:13.632146Z c8ef5c0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sjoerd2025 sjoerd2025 closed this Nov 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/lib/jules.ts
@@ -712,7 +711,7 @@ export async function retryAllFlaggedTasks(
const task = queue.shift();
if (!task) break;
try {
const success = await processTaskRetry(task.id);
const success = await processTaskRetry(task);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Revalidate queued tasks before processing snapshots

If another retry run or an admin update clears flaggedForRetry after getFlaggedTasks() returns but before this worker reaches the row, passing the snapshot skips processTaskRetry's database re-read and still sees flaggedForRetry: true; it can swap labels and resubmit a task that was already completed or cancelled. Keep passing the ID or re-read the task immediately before the side effects.

Useful? React with 👍 / 👎.

});

// Batch create labels in the repositories
await createJulesLabelsForRepositories(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer large label batches out of the webhook transaction

For an installation_repositories event with the all label preference and 601 or more added repositories, the helper sleeps one second between 10-repository batches (src/lib/github-labels.ts:121-150), so the pauses alone consume at least 60 seconds before any API-call time. This exceeds the webhook route's 60-second Vercel maxDuration (vercel.json:12-14), leaving later repositories unlabeled and the transaction unfinished; queue or checkpoint this work instead of awaiting the full batch in the webhook.

Useful? React with 👍 / 👎.

Comment thread src/lib/github.ts
Comment on lines +408 to +412
if (page > MAX_PAGES) {
logger.warn(
`Stopped checking user stars for ${username} after ${MAX_PAGES} pages. Target: ${targetOwner}/${targetRepo}`
);
break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not report an incomplete star scan as a negative

If the target repository falls beyond the first 2,000 starred repositories, this breaks out and returns false even when the user has starred it. The star-check route treats that as a negative and sends the user to limbo instead of label setup, so an already-starred installation cannot complete; treat the cutoff as indeterminate or check the target repository directly.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant