[CLEAN] Synthetic Benchmark PR #26458 - chore: Integrate booking cancellation audit#365
Open
tomerqodo wants to merge 1 commit intobase_pr_26458_20260114_6010from
Open
[CLEAN] Synthetic Benchmark PR #26458 - chore: Integrate booking cancellation audit#365tomerqodo wants to merge 1 commit intobase_pr_26458_20260114_6010from
tomerqodo wants to merge 1 commit intobase_pr_26458_20260114_6010from
Conversation
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR calcom#26458
Type: Clean (correct implementation)
Original PR Title: chore: Integrate booking cancellation audit
Original PR Description: ## What does this PR do?
Integrates audit logging for booking cancellations, following the pattern established in PR calcom#26046 for booking creation/rescheduling audit.
Changes:
onBookingCancelledonBulkBookingsCancelleduserUuidandactionSourcefrom webapp cancel route (WEBAPP)userUuidandactionSourcefrom API-v2 bookings service (API_V2)getAuditActorhelper to derive actor from userUuid or create synthetic guest actorgetUniqueIdentifierhelper for generating unique actor identifiersactionSourceis "UNKNOWN" for observabilityAudit Data Captured:
cancellationReason(simple string value)cancelledBy(simple string value)status(old → new, e.g., "ACCEPTED" → "CANCELLED")Updates since last revision:
CancelledAuditActionServiceschema:cancellationReasonandcancelledByare now stored as simple nullable strings instead of change objects (old/new), since cancellation is a one-time event where tracking previous values doesn't applybooking-audit-cancelled.integration-test.tsgetUniqueIdentifierhelper function in actor.ts for generating unique identifiers with prefixesMandatory Tasks (DO NOT REMOVE)
How should this be tested?
yarn test packages/features/booking-audit/lib/service/__tests__/booking-audit-cancelled.integration-test.tsHuman Review Checklist
onBookingCancelledandonBulkBookingsCancelledmethods exist inBookingEventHandlerServicegetAuditActorfallback logic - creates synthetic email with "fallback-" or "param-" prefix when no userUuid availablecancellationReason/cancelledBy(no longer tracking old→new) is intentionalCancelledAuditDisplayDatatype no longer includespreviousReasonandpreviousCancelledByfieldsLink to Devin run: https://app.devin.ai/sessions/42404e76a66946fe9e46fa07fb12e779
Requested by: @hariombalhara (hariom@cal.com)
Original PR URL: calcom#26458