-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add some new changes #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92,6 +92,7 @@ export async function reviewPullRequest( | |||||
|
|
||||||
| await inngest.send({ | ||||||
| name: "pr.review.requested", | ||||||
| id: `review-${repository.id}-${prNumber}`, | ||||||
| data: { | ||||||
| owner, | ||||||
| repo, | ||||||
|
|
@@ -176,6 +177,7 @@ export async function generatePullRequestSummary( | |||||
| const githubAccount = repository.owner.accounts[0]; | ||||||
| await inngest.send({ | ||||||
| name: "pr.summary.requested", | ||||||
| id: `review-${repository.id}-${prNumber}`, | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent event ID prefix—potential collision with review events. The event ID uses the prefix 🔎 Proposed fix- id: `review-${repository.id}-${prNumber}`,
+ id: `summary-${repository.id}-${prNumber}`,📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| data: { | ||||||
| owner, | ||||||
| repo: repoName, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n lib/ai/actions/index.ts | head -220Repository: afuhflynn/code-reverb
Length of output: 6326
🌐 Web query:
Inngest event ID idempotency deduplication behavior💡 Result:
Summary of Inngest event idempotency / deduplication behavior
Event-level idempotency: if you include an event.payload.id when sending, Inngest treats that id as an idempotency key and ignores any later events with the same id for 24 hours (the later event is stored but will not trigger functions). The id is global across event types, so make it unique per event type. [1][2]
Function-level idempotency: you can set a function's idempotency to a CEL expression (e.g., event.data.cartId). Inngest evaluates that expression per incoming event and will only run the function once per unique expression value per 24-hour window. Useful for fan-out scenarios where some functions should run once and others every time. [2]
Notes / exceptions:
Sources
Change the event ID prefix at line 180 to avoid deduplication conflicts.
Inngest treats event IDs as global idempotency keys across all event types. Using the same ID (
review-${repository.id}-${prNumber}) for both "pr.review.requested" (line 95) and "pr.summary.requested" (line 180) will cause the second event to be silently deduplicated within 24 hours, preventing the summary generation from triggering. Change line 180 to use a distinct prefix, such assummary-${repository.id}-${prNumber}.Also fix typos: "databse" → "database" (lines 33, 174) and "sucess" → "success" (lines 106, 198).
🤖 Prompt for AI Agents