Skip to content

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 29, 2026

Benchmark PR from agentic-review-benchmarks#16

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Re-enabled mark-absent booking endpoint functionality.
  • Tests

    • Activated authorization tests for recordings and transcripts endpoints to verify proper access control.
  • API Changes

    • Removed message field from bookings recordings and transcripts endpoint responses.
    • Updated authentication and authorization requirements for bookings endpoints.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Walkthrough

API endpoints for bookings are updated with modified authentication guards, response message fields are removed from recordings and transcripts outputs, and the mark-absent endpoint is restored. Authorization tests are activated to validate access control.

Changes

Cohort / File(s) Summary
Controller Authentication & Response Updates
apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts
Updated GET /:bookingUid/recordings with new guards (ApiAuthGuard, BookingUidGuard, BookingPbacGuard) and permission requirement (BOOKING_WRITE); made getRecordings call non-awaited; removed message field from response. Updated GET /:bookingUid/transcripts guard ordering; removed message field. Restored POST /:bookingUid/mark-absent endpoint functionality previously disabled.
Output Type Definitions
packages/platform/types/bookings/2024-08-13/outputs/get-booking-recordings.output.ts, packages/platform/types/bookings/2024-08-13/outputs/get-booking-transcripts.output.ts
Removed optional message?: string field and related decorators from both GetBookingRecordingsOutput and GetBookingTranscriptsOutput types.
Authorization Tests
apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts
Activated previously commented authorization test suites for GET /v2/bookings/:bookingUid/recordings and GET /v2/bookings/:bookingUid/transcripts, testing successful access for organizers and 403 responses for unauthorized users.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes


🐰 In burrows deep where bookings rest,
We guard our recordings with finesse,
Remove the messages, restore what's true,
Transcripts and marks shine bright and new!
With tests now active, our API's blessed,
Our bookings pass every thorough test! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: updating recording and transcript endpoints and adding/enabling tests for authorization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts (1)

214-232: Await getRecordings to resolve the Promise before returning.

CalVideoService.getRecordings is an async method. Without await, the response will contain a Promise in the data field, which serializes to {} in JSON and hides any errors thrown by the service.

🛠️ Proposed fix
-    const recordings = this.calVideoService.getRecordings(bookingUid);
+    const recordings = await this.calVideoService.getRecordings(bookingUid);
🧹 Nitpick comments (1)
apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts (1)

188-232: Assert data in the success cases to catch response-shape regressions.

Right now the tests only check status. Adding a data assertion will guard against accidental Promise serialization or missing payloads.

✅ Suggested test assertions
         const response = await request(app.getHttpServer())
           .get(`/v2/bookings/${testBooking.uid}/recordings`)
           .set("Authorization", `Bearer ${ownerApiKey}`)
           .set(CAL_API_VERSION_HEADER, VERSION_2024_08_13)
           .expect(200);

         expect(response.body.status).toEqual(SUCCESS_STATUS);
+        expect(response.body.data).toEqual([]);
       });

@@
         const response = await request(app.getHttpServer())
           .get(`/v2/bookings/${testBooking.uid}/transcripts`)
           .set("Authorization", `Bearer ${ownerApiKey}`)
           .set(CAL_API_VERSION_HEADER, VERSION_2024_08_13)
           .expect(200);

         expect(response.body.status).toEqual(SUCCESS_STATUS);
+        expect(response.body.data).toEqual([]);
       });
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 442c40c and eb21d26.

📒 Files selected for processing (4)
  • apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts
  • packages/platform/types/bookings/2024-08-13/outputs/get-booking-recordings.output.ts
  • packages/platform/types/bookings/2024-08-13/outputs/get-booking-transcripts.output.ts
💤 Files with no reviewable changes (1)
  • packages/platform/types/bookings/2024-08-13/outputs/get-booking-transcripts.output.ts
🧰 Additional context used
🧬 Code graph analysis (2)
apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts (1)
packages/platform/constants/api.ts (3)
  • CAL_API_VERSION_HEADER (72-72)
  • VERSION_2024_08_13 (59-59)
  • SUCCESS_STATUS (9-9)
apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts (2)
packages/platform/constants/api.ts (1)
  • SUCCESS_STATUS (9-9)
scripts/prepare-local-for-delegation-credentials-testing.js (1)
  • user (18-20)
🔇 Additional comments (3)
packages/platform/types/bookings/2024-08-13/outputs/get-booking-recordings.output.ts (1)

6-6: No review notes for this change.

apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts (2)

235-239: Guards/permissions alignment looks good.


394-405: Mark-absent endpoint restoration looks good.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

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.

2 participants