Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions src/modules/estimate/customer/customer-estimate.service.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

๊ฒฌ์  ํ™•์ •๊ณผ ์•Œ๋ฆผ DB ์ €์žฅ์„ ๋™์ผ ํŠธ๋žœ์žญ์…˜์— ํฌํ•จํ•˜๊ณ ,
์ƒ์„ฑ๋œ ์•Œ๋ฆผ์„ ๋ฐ˜ํ™˜ํ•œ ๋’ค ์ปค๋ฐ‹ ์ดํ›„ sendNotification()์œผ๋กœ SSE๋ฅผ ์ „์†กํ•˜๋„๋ก
์˜๋„ํ•œ ๊ตฌ์กฐ์— ๋งž๊ฒŒ ์ž˜ ์ˆ˜์ •๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹คยก

Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,24 @@ export const receivedEstimateService = {
tx,
);

const notification = await notificationService.createNotification(
{
userId: confirmedEstimate.mover.id,
type: "ESTIMATE_CONFIRMED",
title: "๊ฒฌ์  ํ™•์ •",
content: `${estimate.estimateRequest.customer.name}๋‹˜์˜`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๐ŸŽฏ Functional Correctness | ๐ŸŸก Minor | โšก Quick win

์•Œ๋ฆผ ๋‚ด์šฉ์„ ์™„์ „ํ•œ ๋ฌธ์žฅ์œผ๋กœ ์„ค์ •ํ•˜์„ธ์š”.

ํ˜„์žฌ ์•Œ๋ฆผ ๋ณธ๋ฌธ์€ ํ™๊ธธ๋™๋‹˜์˜์ฒ˜๋Ÿผ ์กฐ์‚ฌ๋กœ ๋๋‚ฉ๋‹ˆ๋‹ค. ์ˆ˜์‹ ์ž๋Š” ์•Œ๋ฆผ ๋ณธ๋ฌธ๋งŒ์œผ๋กœ ์ด๋ฒคํŠธ๋ฅผ ์ดํ•ดํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด "${estimate.estimateRequest.customer.name}๋‹˜์˜ ๊ฒฌ์ ์ด ํ™•์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค."์ฒ˜๋Ÿผ ์™„๋ฃŒ๋œ ๋‚ด์šฉ์„ ์ €์žฅํ•˜์„ธ์š”.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/modules/estimate/customer/customer-estimate.service.ts` at line 448,
Update the notification content near the estimate creation flow to be a complete
sentence, including the customer name and a clear statement that the estimate
has been confirmed, rather than ending with the possessive particle in
isolation.

linkUrl: "/estimate/received-requests",
expiresAt: getKstEndOfDay(estimate.estimateRequest.moveDate),
},
tx,
);
Comment on lines +443 to +453

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๐Ÿ—„๏ธ Data Integrity & Integration | ๐ŸŸ  Major | ๐Ÿ—๏ธ Heavy lift

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

fd -a '^notification\.service\.ts$' src -x ast-grep outline {} --items all
fd -a '^notification\.service\.ts$' src -x rg -n -C 8 'createNotification|sendNotification' {}
rg -n -C 6 'createNotification\(' \
  src/modules/estimate/customer/customer-estimate.service.ts \
  src/modules/estimate/mover/mover-estimate.service.ts

Repository: 4roro-moving/moving-backend

Length of output: 5511


๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- notification service ---'
sed -n '1,230p' src/modules/notification/notification.service.ts

printf '%s\n' '--- notification repository ---'
sed -n '1,180p' src/modules/notification/notification.repository.ts

printf '%s\n' '--- transaction utility and notification types ---'
sed -n '1,220p' src/utils/transaction.ts
rg -n -C 5 'CreateNotificationInput|NotificationItem|PrismaClient|TransactionClient' \
  src/modules/notification src/modules/estimate

printf '%s\n' '--- all createNotification call shapes ---'
rg -n -U -P 'createNotification\s*\([^;]*?\)' src --glob '*.ts' || true

Repository: 4roro-moving/moving-backend

Length of output: 21480


๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- estimate and review transaction contexts ---'
sed -n '220,280p' src/modules/estimate/mover/mover-estimate.service.ts
sed -n '330,380p' src/modules/estimate/mover/mover-estimate.service.ts
sed -n '410,465p' src/modules/estimate/customer/customer-estimate.service.ts
sed -n '230,275p' src/modules/review/review.service.ts

printf '%s\n' '--- notification repository create implementation ---'
sed -n '235,275p' src/modules/notification/notification.repository.ts

printf '%s\n' '--- static call/signature verifier ---'
python3 - <<'PY'
from pathlib import Path
import re

service = Path("src/modules/notification/notification.service.ts").read_text()
match = re.search(
    r"const\s+createNotification\s*=\s*async\s*\((.*?)\)\s*:\s*Promise",
    service,
    re.S,
)
if not match:
    raise SystemExit("createNotification declaration not found")

params = [p.strip() for p in match.group(1).split(",") if p.strip()]
print(f"notificationService.createNotification declared parameters: {len(params)}")
print("\n".join(f"  {i + 1}: {p}" for i, p in enumerate(params)))

for path in Path("src/modules").rglob("*.service.ts"):
    text = path.read_text()
    for m in re.finditer(r"notificationService\.createNotification\s*\(", text):
        start = m.start()
        depth = 0
        end = None
        for i in range(text.find("(", start), len(text)):
            if text[i] == "(":
                depth += 1
            elif text[i] == ")":
                depth -= 1
                if depth == 0:
                    end = i + 1
                    break
        if end is None:
            continue
        args = text[text.find("(", start) + 1:end - 1]
        # Top-level commas count arguments without executing repository code.
        level = 0
        commas = 0
        for ch in args:
            if ch in "({[":
                level += 1
            elif ch in ")}]":
                level -= 1
            elif ch == "," and level == 0:
                commas += 1
        print(f"{path}:{text[:start].count(chr(10)) + 1}: call arguments={commas + 1}")
PY

Repository: 4roro-moving/moving-backend

Length of output: 7560


๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- estimate and review transaction contexts ---'
sed -n '220,280p' src/modules/estimate/mover/mover-estimate.service.ts
sed -n '330,380p' src/modules/estimate/mover/mover-estimate.service.ts
sed -n '410,465p' src/modules/estimate/customer/customer-estimate.service.ts
sed -n '230,275p' src/modules/review/review.service.ts

printf '%s\n' '--- notification repository create implementation ---'
sed -n '235,275p' src/modules/notification/notification.repository.ts

printf '%s\n' '--- static call/signature verifier ---'
python3 - <<'PY'
from pathlib import Path
import re

service = Path("src/modules/notification/notification.service.ts").read_text()
match = re.search(
    r"const\s+createNotification\s*=\s*async\s*\((.*?)\)\s*:\s*Promise",
    service,
    re.S,
)
if not match:
    raise SystemExit("createNotification declaration not found")

params = [p.strip() for p in match.group(1).split(",") if p.strip()]
print(f"notificationService.createNotification declared parameters: {len(params)}")
print("\n".join(f"  {i + 1}: {p}" for i, p in enumerate(params)))

for path in Path("src/modules").rglob("*.service.ts"):
    text = path.read_text()
    for m in re.finditer(r"notificationService\.createNotification\s*\(", text):
        start = m.start()
        depth = 0
        end = None
        for i in range(text.find("(", start), len(text)):
            if text[i] == "(":
                depth += 1
            elif text[i] == ")":
                depth -= 1
                if depth == 0:
                    end = i + 1
                    break
        if end is None:
            continue
        args = text[text.find("(", start) + 1:end - 1]
        level = 0
        commas = 0
        for ch in args:
            if ch in "({[":
                level += 1
            elif ch in ")}]":
                level -= 1
            elif ch == "," and level == 0:
                commas += 1
        print(f"{path}:{text[:start].count(chr(10)) + 1}: call arguments={commas + 1}")
PY

Repository: 4roro-moving/moving-backend

Length of output: 7560


๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- notification service exports and send calls ---'
rg -n -C 4 'sendNotification|export const notificationService|notificationService' \
  src/modules/notification/notification.service.ts \
  src/modules/estimate/mover/mover-estimate.service.ts \
  src/modules/estimate/customer/customer-estimate.service.ts \
  src/modules/review/review.service.ts

printf '%s\n' '--- imports of notification service ---'
rg -n -C 3 'notificationService' \
  src/modules/estimate/mover/mover-estimate.service.ts \
  src/modules/estimate/customer/customer-estimate.service.ts \
  src/modules/review/review.service.ts

Repository: 4roro-moving/moving-backend

Length of output: 16649


NotificationService์˜ ํŠธ๋žœ์žญ์…˜ ๋ฐ SSE ๊ณ„์•ฝ์„ ํ•จ๊ป˜ ๋ฐ˜์˜ํ•˜์„ธ์š”.

createNotification์€ ํ˜„์žฌ ์ธ์ž ํ•˜๋‚˜๋งŒ ๋ฐ›์ง€๋งŒ, ๋‹ค์Œ ๋„ค ์œ„์น˜๋Š” tx๋ฅผ ์ „๋‹ฌํ•˜๋ฏ€๋กœ ์ปดํŒŒ์ผ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

  • src/modules/estimate/customer/customer-estimate.service.ts:443
  • src/modules/estimate/mover/mover-estimate.service.ts:259
  • src/modules/estimate/mover/mover-estimate.service.ts:359
  • src/modules/review/review.service.ts:256

notificationRepository.create๊ฐ€ ์ง€์›ํ•˜๋Š” DbClient๋ฅผ NotificationService๊นŒ์ง€ ์ „๋‹ฌํ•˜์„ธ์š”. ์•Œ๋ฆผ ์ €์žฅ์€ ๋„๋ฉ”์ธ ๋ณ€๊ฒฝ๊ณผ ๊ฐ™์€ ํŠธ๋žœ์žญ์…˜์—์„œ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. SSE ์ „์†ก์€ ํŠธ๋žœ์žญ์…˜ ์ปค๋ฐ‹ ํ›„ ์ˆ˜ํ–‰ํ•˜์„ธ์š”.

๋˜ํ•œ ํ˜ธ์ถœ๋ถ€์˜ notificationService.sendNotification(...) ์‚ฌ์šฉ์— ๋งž๊ฒŒ ๊ณต์œ  ์„œ๋น„์Šค๊ฐ€ ํ•ด๋‹น ๋ฉ”์„œ๋“œ๋ฅผ exportํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ˜„์žฌ notificationService export์—๋Š” ์ด ๋ฉ”์„œ๋“œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

๐Ÿ“ Affects 2 files
  • src/modules/estimate/customer/customer-estimate.service.ts#L443-L453 (this comment)
  • src/modules/estimate/mover/mover-estimate.service.ts#L259-L269
  • src/modules/estimate/mover/mover-estimate.service.ts#L359-L369
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/modules/estimate/customer/customer-estimate.service.ts` around lines 443
- 453, customer-estimate.service.ts 443-453, mover-estimate.service.ts 259-269 ๋ฐ
359-369, review.service.ts 256-266์˜ createNotification ํ˜ธ์ถœ์— ๋™์ผํ•œ tx๋ฅผ ์ „๋‹ฌํ•˜์„ธ์š”.
NotificationService.createNotification์ด DbClient๋ฅผ ๋ฐ›์•„
notificationRepository.create์— ์ „๋‹ฌํ•˜๊ณ  ๋„๋ฉ”์ธ ๋ณ€๊ฒฝ๊ณผ ๊ฐ™์€ ํŠธ๋žœ์žญ์…˜์œผ๋กœ ์ €์žฅํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๋ฉฐ, SSE ์ „์†ก์€ ์ปค๋ฐ‹ ์ดํ›„
์ˆ˜ํ–‰ํ•˜์„ธ์š”. ๊ณต์œ  notificationService export์— ํ˜ธ์ถœ๋ถ€๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” sendNotification ๋ฉ”์„œ๋“œ๋„ ํฌํ•จํ•˜์„ธ์š”.

Source: Path instructions


//ํ™•์ • ์‘๋‹ต ํ˜•ํƒœ ๊ฐ€๊ณต
return {
estimateRequest: confirmedEstimateRequest,
moveDate: estimate.estimateRequest.moveDate,
customerName: estimate.estimateRequest.customer.name,
notification,
estimate: {
id: confirmedEstimate.id,
price: confirmedEstimate.price,
Expand All @@ -461,15 +474,10 @@ export const receivedEstimateService = {
};
});

await notificationService.createNotification({
userId: result.estimate.mover.id,
type: "ESTIMATE_CONFIRMED",
title: "๊ฒฌ์  ํ™•์ •",
content: `${result.customerName}๋‹˜์˜`,
linkUrl: "/estimate/received-requests",
expiresAt: getKstEndOfDay(result.moveDate),
});
notificationService.sendNotification(result.estimate.mover.id, result.notification);

const { notification: _, ...response } = result;

return result;
return response;
},
};
50 changes: 29 additions & 21 deletions src/modules/estimate/mover/mover-estimate.service.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

๊ฒฌ์  ์ œ์•ˆยท๋ฐ˜๋ ค ๋ชจ๋‘ ์•Œ๋ฆผ ์ €์žฅ์„ ํ•ต์‹ฌ ์ž‘์—…๊ณผ ๊ฐ™์€ ํŠธ๋žœ์žญ์…˜์— ํฌํ•จํ•˜๊ณ ,
์ปค๋ฐ‹ ์ดํ›„ sendNotification()์œผ๋กœ SSE๋ฅผ ์ „์†กํ•˜๋„๋ก
์˜๋„ํ•œ ๊ตฌ์กฐ์— ๋งž๊ฒŒ ์ž˜ ์ˆ˜์ •๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๊ณ ์ƒํ•˜์…จ์–ด์š”ยก

Original file line number Diff line number Diff line change
Expand Up @@ -256,23 +256,26 @@ export const moverEstimateRequestService = {
tx,
);

const notification = await notificationService.createNotification(
{
userId: estimateRequest.customerId,
type: "ESTIMATE_RECEIVED",
title: "๊ฒฌ์  ๋„์ฐฉ",
content: `${profile.nickname} ๊ธฐ์‚ฌ๋‹˜์˜ ${MOVE_TYPE_LABEL[estimateRequest.moveType]} ๊ฒฌ์ `,
linkUrl: null,
expiresAt: estimateRequest.expiresAt,
},
tx,
);

return {
estimate,
customerId: estimateRequest.customerId,
moverNickname: profile.nickname,
moveType: estimateRequest.moveType,
expiresAt: estimateRequest.expiresAt,
notification,
};
});

await notificationService.createNotification({
userId: result.customerId,
type: "ESTIMATE_RECEIVED",
title: "๊ฒฌ์  ๋„์ฐฉ",
content: `${result.moverNickname} ๊ธฐ์‚ฌ๋‹˜์˜ ${MOVE_TYPE_LABEL[result.moveType]} ๊ฒฌ์ `,
linkUrl: null,
expiresAt: result.expiresAt,
});
notificationService.sendNotification(result.customerId, result.notification);

return result.estimate;
},
Expand Down Expand Up @@ -352,22 +355,27 @@ export const moverEstimateRequestService = {
tx,
);

const notificationCreatedAt = new Date();
const notification = await notificationService.createNotification(
{
userId: estimateRequest.customerId,
type: "ESTIMATE_REQUEST_REJECTED",
title: "๊ฒฌ์  ์š”์ฒญ ๋ฐ˜๋ ค",
content: profile.nickname,
linkUrl: null,
expiresAt: getRejectionNotificationExpiresAt(notificationCreatedAt),
},
tx,
);

return {
rejection,
customerId: estimateRequest.customerId,
moverNickname: profile.nickname,
notification,
};
});

const notificationCreatedAt = new Date();
await notificationService.createNotification({
userId: result.customerId,
type: "ESTIMATE_REQUEST_REJECTED",
title: "๊ฒฌ์  ์š”์ฒญ ๋ฐ˜๋ ค",
content: result.moverNickname,
linkUrl: null,
expiresAt: getRejectionNotificationExpiresAt(notificationCreatedAt),
});
notificationService.sendNotification(result.customerId, result.notification);

return result.rejection;
},
Expand Down
30 changes: 19 additions & 11 deletions src/modules/review/review.service.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

์•Œ๋ฆผ ์ €์žฅ๊ณผ SSE ์ „์†ก ๊ตฌ์กฐ๋Š” ์˜๋„ํ•œ ๋ฐฉ์‹๋Œ€๋กœ ์ž˜ ์ ์šฉ๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๋ฆฌ๋ทฐ ์ƒ์„ฑยท๊ธฐ์‚ฌ ๋ฆฌ๋ทฐ ํ†ต๊ณ„ ๊ฐฑ์‹ ยท์•Œ๋ฆผ DB ์ €์žฅ์„ ๋™์ผ ํŠธ๋žœ์žญ์…˜์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๊ณ ,
์ปค๋ฐ‹ ์ดํ›„ sendNotification()์œผ๋กœ SSE๋ฅผ ์ „์†กํ•˜๋„๋ก ์ •์ƒ์ ์œผ๋กœ ๋ถ„๋ฆฌ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ณ ์ƒํ•˜์…จ์–ด์šฉยก

Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const reviewService = {

try {
// ๋ฆฌ๋ทฐ ์ƒ์„ฑ๊ณผ ๊ธฐ์‚ฌ๋‹˜ ๋ฆฌ๋ทฐ ํ†ต๊ณ„ ๊ฐฑ์‹ ์€ ํ•˜๋‚˜์˜ ์ž‘์„ฑ ์œ ์Šค์ผ€์ด์Šค์ด๋ฏ€๋กœ Service์—์„œ ํŠธ๋žœ์žญ์…˜ ๊ฒฝ๊ณ„๋ฅผ ๊ด€๋ฆฌ
const review = await runTransaction(
const result = await runTransaction(
async (tx) => {
const createdReview = await reviewRepository.createReview(
{
Expand Down Expand Up @@ -253,25 +253,33 @@ export const reviewService = {
tx,
);

return createdReview;
const notification = await notificationService.createNotification(
{
userId: estimate.moverId,
type: "REVIEW_RECEIVED",
title: "๋ฆฌ๋ทฐ ๋„์ฐฉ",
content: "๊ณ ๊ฐ๋‹˜์ด",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๐ŸŽฏ Functional Correctness | ๐ŸŸก Minor | โšก Quick win

์™„์ „ํ•œ ์•Œ๋ฆผ ๋ณธ๋ฌธ์„ ์ €์žฅํ•˜์„ธ์š”.

Line 261์˜ content๋Š” "๊ณ ๊ฐ๋‹˜์ด"๋งŒ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. ์ด payload์—๋Š” ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋ฌธ์žฅ์„ ์™„์„ฑํ•  ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๋ถˆ์™„์ „ํ•œ ์•Œ๋ฆผ์„ ๋ฐ›์Šต๋‹ˆ๋‹ค.

์ˆ˜์ • ์˜ˆ์‹œ
-              content: "๊ณ ๊ฐ๋‹˜์ด",
+              content: "๊ณ ๊ฐ๋‹˜์ด ๋ฆฌ๋ทฐ๋ฅผ ๋‚จ๊ฒผ์Šต๋‹ˆ๋‹ค.",
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
content: "๊ณ ๊ฐ๋‹˜์ด",
content: "๊ณ ๊ฐ๋‹˜์ด ๋ฆฌ๋ทฐ๋ฅผ ๋‚จ๊ฒผ์Šต๋‹ˆ๋‹ค.",
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/modules/review/review.service.ts` at line 261, Update the notification
payloadโ€™s content near the review creation flow so it stores the complete
user-facing notification sentence rather than only the fragment "๊ณ ๊ฐ๋‹˜์ด". Include
all wording and dynamic values required for the client to display a complete
message, using the surrounding payload data and existing notification
conventions.

linkUrl: null,
expiresAt: null,
},
tx,
);

return {
review: createdReview,
notification,
};
},
{
// ๊ฐ™์€ ๊ธฐ์‚ฌ๋‹˜์—๊ฒŒ ์—ฌ๋Ÿฌ ๋ฆฌ๋ทฐ๊ฐ€ ๋™์‹œ์— ๋“ฑ๋ก๋  ๋•Œ ํ†ต๊ณ„ ์žฌ๊ณ„์‚ฐ ๊ฒฐ๊ณผ๊ฐ€ ๋ฎ์–ด์จ์ง€๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€
isolationLevel: Prisma.TransactionIsolationLevel.Serializable,
},
);

await notificationService.createNotification({
userId: estimate.moverId,
type: "REVIEW_RECEIVED",
title: "๋ฆฌ๋ทฐ ๋„์ฐฉ",
content: "๊ณ ๊ฐ๋‹˜์ด",
linkUrl: null,
expiresAt: null,
});
notificationService.sendNotification(estimate.moverId, result.notification);
Comment on lines +256 to +279

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

๐ŸŽฏ Functional Correctness | ๐ŸŸ  Major | โšก Quick win

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

# NotificationService ์ •์˜์™€ ํ˜ธ์ถœ ๊ณ„์•ฝ์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
fd -t f '^notification\.service\.ts$' src | while IFS= read -r file; do
  ast-grep outline "$file" --items all
  rg -n -C 8 '\b(createNotification|sendNotification)\s*\(' "$file"
done

# ์„œ๋น„์Šค ํ˜ธ์ถœ๋ถ€์™€ ์ „๋‹ฌ ์ธ์ž๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
rg -n -C 6 '\b(createNotification|sendNotification)\s*\(' src

Repository: 4roro-moving/moving-backend

Length of output: 11215


๐Ÿ Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- notification.service.ts ---'
cat -n src/modules/notification/notification.service.ts | sed -n '1,235p'

printf '%s\n' '--- notification types and repository ---'
fd -t f . src/modules/notification | sort
rg -n -C 5 'CreateNotificationInput|NotificationItem|notificationService|sendNotification|createNotification' src/modules/notification src/modules/review/review.service.ts

printf '%s\n' '--- review imports and transaction context ---'
cat -n src/modules/review/review.service.ts | sed -n '1,40p;210,290p'

Repository: 4roro-moving/moving-backend

Length of output: 27822


NotificationService ํ˜ธ์ถœ ๊ณ„์•ฝ์„ ์ˆ˜์ •ํ•˜์„ธ์š”.

createNotification์€ CreateNotificationInput ํ•˜๋‚˜๋งŒ ๋ฐ›์œผ๋ฉฐ tx๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. notificationService์—๋Š” sendNotification๋„ ์—†์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ์ฝ”๋“œ๋Š” ์ปดํŒŒ์ผ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ ์•Œ๋ฆผ์„ ๋ฆฌ๋ทฐ ํŠธ๋žœ์žญ์…˜์— ํฌํ•จํ•˜๊ณ  ์ปค๋ฐ‹ ํ›„ SSE๋ฅผ ์ „์†กํ•˜๋„๋ก ํ˜ธ์ถœ ๊ตฌ์กฐ๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/modules/review/review.service.ts` around lines 256 - 279, Update the
review transaction around createdReview to call createNotification with only the
CreateNotificationInput argument, removing the unsupported tx parameter. Use the
supported notification creation and post-commit delivery APIs instead of
notificationService.sendNotification, ensuring the notification is persisted
within the review transaction and its SSE event is emitted only after the
transaction commits.


return {
review,
review: result.review,
};
} catch (error) {
if (isReviewEstimateUniqueConstraintError(error)) {
Expand Down