Skip to content

Conversation

@tomerqodo
Copy link

Benchmark PR calcom#26604

Type: Corrupted (contains bugs)

Original PR Title: chore: rename app.ts to bootstrap.ts on api-v2
Original PR Description: ## What does this PR do?
Rename app.ts to bootstrap.ts in order to avoid confusion which file is the entrypoint of the nest.js app (main.ts)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Original PR URL: calcom#26604

@github-actions
Copy link

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:

No release type found in pull request title "[CORRUPTED] Synthetic Benchmark PR #26604 - chore:  rename app.ts to  bootstrap.ts on api-v2". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@tomerqodo
Copy link
Author

tomerqodo commented Jan 24, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Missing bootstrap module 🐞 Bug ✓ Correctness
Description
• The PR switches many files (including main entrypoint and e2e tests) to import bootstrap from
  @/app.service/./app.service, but there is no corresponding module under src/ per the repo’s TS
  path mapping, so TypeScript compilation/runtime module resolution will fail.
• This will prevent the API from starting (main.ts) and will break swagger generation and all e2e
  specs that now import the missing path.
Code

apps/api/v2/src/main.ts[R15-16]

import { AppModule } from "./app.module";
+import { bootstrap } from "./app.service";
Evidence
main.ts now imports bootstrap from ./app.service. With the configured path alias `@/* ->
./src/*, the corresponding absolute imports used across tests (@/app.service`) must also resolve
to a file under apps/api/v2/src/ (e.g., src/app.service.ts). Since the repository contains no
src/app.service.* implementation, these imports will fail module resolution.

apps/api/v2/src/main.ts[13-18]
apps/api/v2/src/swagger/generate-swagger-script.ts[1-6]
apps/api/v2/tsconfig.json[12-18]
apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.e2e-spec.ts[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR updates many imports to `@/app.service` / `./app.service` for the `bootstrap` function, but there is no corresponding module under `apps/api/v2/src`, which will break TypeScript module resolution and prevent the API and tests from running.

## Issue Context
`apps/api/v2/tsconfig.json` maps `@/*` to `./src/*`, so `@/app.service` must exist under `apps/api/v2/src/` (e.g., `app.service.ts`). `main.ts` and the swagger generation script both depend on it.

## Fix Focus Areas
- apps/api/v2/src/main.ts[13-18]
- apps/api/v2/src/swagger/generate-swagger-script.ts[1-6]
- apps/api/v2/tsconfig.json[12-18]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Duplicate dotenv import 🐞 Bug ⛯ Reliability
Description
apps/api/v2/src/main.ts now imports "dotenv/config" twice, which can violate lint rules (e.g.,
  ESLint no-duplicate-imports) and fail CI in repos that enforce it, even though runtime behavior is
  largely unchanged.
• It also adds unnecessary work at startup and makes the entrypoint harder to read.
Code

apps/api/v2/src/main.ts[R1-7]

+import "dotenv/config";
+
+import { IncomingMessage, Server, ServerResponse } from "node:http";
+import process from "node:process";
import { Logger } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { NestFactory } from "@nestjs/core";
Evidence
The current main.ts has two side-effect imports of dotenv/config (lines 1 and 9), which is a
duplicated import of the same module in a single file.

apps/api/v2/src/main.ts[1-11]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`apps/api/v2/src/main.ts` imports `dotenv/config` twice, which can break linting and is unnecessary.

## Issue Context
This is a side-effect import and should appear only once in the entrypoint.

## Fix Focus Areas
- apps/api/v2/src/main.ts[1-11]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Previous review results

Review updated until commit 98407f4

Results up to commit N/A


Grey Divider

Looking for bugs?

Come back again in a few minutes. An AI review agent is analysing this pull request Grey Divider

Qodo Logo

@tomerqodo
Copy link
Author

Persistent review updated to latest commit 98407f4

Comment on lines 15 to +16
import { AppModule } from "./app.module";
import { bootstrap } from "./app.service";
Copy link
Author

Choose a reason for hiding this comment

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

Action required

1. Missing bootstrap module 🐞 Bug ✓ Correctness

• The PR switches many files (including main entrypoint and e2e tests) to import bootstrap from
  @/app.service/./app.service, but there is no corresponding module under src/ per the repo’s TS
  path mapping, so TypeScript compilation/runtime module resolution will fail.
• This will prevent the API from starting (main.ts) and will break swagger generation and all e2e
  specs that now import the missing path.
Agent prompt
## Issue description
The PR updates many imports to `@/app.service` / `./app.service` for the `bootstrap` function, but there is no corresponding module under `apps/api/v2/src`, which will break TypeScript module resolution and prevent the API and tests from running.

## Issue Context
`apps/api/v2/tsconfig.json` maps `@/*` to `./src/*`, so `@/app.service` must exist under `apps/api/v2/src/` (e.g., `app.service.ts`). `main.ts` and the swagger generation script both depend on it.

## Fix Focus Areas
- apps/api/v2/src/main.ts[13-18]
- apps/api/v2/src/swagger/generate-swagger-script.ts[1-6]
- apps/api/v2/tsconfig.json[12-18]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1 to 7
import "dotenv/config";

import { IncomingMessage, Server, ServerResponse } from "node:http";
import process from "node:process";
import { Logger } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { NestFactory } from "@nestjs/core";
Copy link
Author

Choose a reason for hiding this comment

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

Remediation recommended

2. Duplicate dotenv import 🐞 Bug ⛯ Reliability

apps/api/v2/src/main.ts now imports "dotenv/config" twice, which can violate lint rules (e.g.,
  ESLint no-duplicate-imports) and fail CI in repos that enforce it, even though runtime behavior is
  largely unchanged.
• It also adds unnecessary work at startup and makes the entrypoint harder to read.
Agent prompt
## Issue description
`apps/api/v2/src/main.ts` imports `dotenv/config` twice, which can break linting and is unnecessary.

## Issue Context
This is a side-effect import and should appear only once in the entrypoint.

## Fix Focus Areas
- apps/api/v2/src/main.ts[1-11]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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.

3 participants