Skip to content

Conversation

@tomerqodo
Copy link

Benchmark PR from qodo-benchmark#714

@augmentcode
Copy link

augmentcode bot commented Jan 22, 2026

🤖 Augment PR Summary

Summary: This PR integrates booking confirmation/rejection flows with the booking-audit system by attaching a concrete actor and actionSource to actions.

Changes:

  • Pass actionSource/actor into confirmation/rejection from API v2, the webapp (tRPC), and magic-link endpoints.
  • Emit booking-audit events for accepted/rejected bookings (including bulk/recurring series) via BookingEventHandlerService.
  • Add getAppActor helper and use it for payment-webhook-triggered confirmations to attribute actions to an app.
  • Extend booking-audit producer interfaces and Tasker producer implementation to support bulk rejected audits.
  • Update booking-audit action source typing and add MAGIC_LINK as a persisted source (Prisma enum + migration).
  • Expand route and handler tests, and add an integration test covering accepted audit log persistence/formatting.

Technical Notes: Introduces ValidActionSource (client-facing sources excluding UNKNOWN) and app actors that prefer credentialId but fall back to appSlug when unavailable.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

updatedBookings.push(updatedBooking);
acceptedBookings = [
{
oldStatus: BookingStatus.ACCEPTED,
Copy link

Choose a reason for hiding this comment

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

acceptedBookings is populated with oldStatus: BookingStatus.ACCEPTED for the single-booking path, which makes the audit/event payload show ACCEPTED -> ACCEPTED instead of the real status transition.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


rejectedBookings = updatedRecurringBookings.map((recurringBooking) => ({
uid: recurringBooking.uid,
oldStatus: recurringBooking.status,
Copy link

Choose a reason for hiding this comment

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

In the recurring rejection path, rejectedBookings is built from updatedRecurringBookings after the update, so oldStatus will be REJECTED (and the audit status change becomes REJECTED -> REJECTED).

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants