Skip to content

[Budget/Notification] atomic accounting lifecycle에 threshold 알림 연결 - #68

Closed
Leejaewang03 wants to merge 1 commit into
mainfrom
feat/issue-48-budget-notification
Closed

[Budget/Notification] atomic accounting lifecycle에 threshold 알림 연결#68
Leejaewang03 wants to merge 1 commit into
mainfrom
feat/issue-48-budget-notification

Conversation

@Leejaewang03

@Leejaewang03 Leejaewang03 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • 적용된 commit, reconciliation-required, late reconciliation과 원자적 reservation BLOCK 결과를 threshold 알림 입력으로 연결했습니다.
  • #27의 BudgetKey/BudgetWindow와 #37의 동일 linearization point BudgetSnapshot을 그대로 사용해 threshold를 판정합니다.
  • BudgetKey + BudgetThreshold 기준 process-local dedup과 reservation transition 중복 억제를 원자적으로 처리합니다.
  • BudgetThreshold.NONE은 발행하지 않고, HALF/WARNING/EXCEEDED 상승 단계는 window마다 한 번씩 발행합니다.
  • handler별 실패를 격리하고 원본 예외 메시지나 event payload를 노출하지 않는 bounded/sanitized BudgetNotificationErrorHook을 추가했습니다.
  • notification service를 기본 budget store의 accounting listener로 자동 연결하고, legacy custom store가 atomic lifecycle을 조용히 누락하지 않도록 AtomicNotificationStateStore 계약을 추가했습니다.
  • 기존 onCommitted callback은 snapshot resolver를 통한 호환 경로를 유지하고, BudgetNotificationEvent의 legacy accessor도 유지했습니다.

테스트

  • NONE 미발행과 동일 key/window/threshold 중복 억제
  • HALF → WARNING → EXCEEDED 단계별 1회 발행과 새 window 재발행
  • duplicate commit/reconcile 및 reconciliation-required 재호출 중복 억제
  • 병렬 callback의 atomic dedup
  • handler/listener 실패 이후 다음 handler 실행과 회계/BLOCK 결과 보존
  • notification event에 prompt, raw provider response, API key 및 임의 tags가 포함되지 않음
  • legacy custom NotificationStateStore 등록 시 명확한 자동 설정 실패

전달 보장

MVP 전달은 process-local best-effort입니다. durable outbox, 재시작 후 replay, exactly-once delivery, Slack/email/webhook adapter는 포함하지 않습니다.

Closes #48

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 21bc486f-9f67-4b86-8acd-0b52f7003cf6


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@HuitaePark

Copy link
Copy Markdown
Member

#68의 변경은 통합 PR #71에 포함되어 CI 검증을 완료했습니다. 이후 수정과 검토는 #71에서 이어갑니다.

@HuitaePark HuitaePark closed this Aug 25, 2026
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.

[Budget/Notification] atomic accounting lifecycle에 threshold 알림 연결

2 participants