feat: 엣지 실패 관리자 알림 — ai_unavailable·video_too_large·internal_error - #137
Open
seizeh wants to merge 1 commit into
Open
feat: 엣지 실패 관리자 알림 — ai_unavailable·video_too_large·internal_error#137seizeh wants to merge 1 commit into
seizeh wants to merge 1 commit into
Conversation
pmdart#157 의 남은 절반(베타 진입 조건): 사용자가 겪은 엣지 함수 실패가
console.error 에만 남아 운영자가 못 보던 것을, 기존 알림 파이프라인
(notifications INSERT → trg_notifications_push → FCM)으로 관리자에게 표출.
- _shared/edge_alert.ts: alertAdmins(admin, key, title, body).
· 타입은 기존 system_notice 재사용 — 새 타입은 CHECK 제약·클라 매핑
동시 수정이 필요해(과거 트리거가 조용히 삼킨 전례) 회피.
· 같은 key 30분 1회 스로틀(rate_limit_hit 재사용) — 장애 폭주가
알림 폭주로 번지지 않게. 리미터 오류는 fail-open.
· 절대 throw 안 함 — 알림 실패가 본 흐름을 깨지 않는다.
- enroll-pet-identity: ai_unavailable·video_too_large·internal_error(업로드/RPC).
- verify-post-photo: ai_unavailable·internal_error(업로드/RPC).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
배경
seizeh/pmdart#157 의 남은 절반(베타 진입 조건). 사용자가 겪은 엣지 함수 실패가
console.error(24h 로그)에만 남아 운영자가 못 봤다 — 데이터 수집이 목적인 베타에서 실패가 안 보이면 목적의 절반이 사라진다.변경
_shared/edge_alert.ts—alertAdmins(admin, key, title, body)user_type='admin') 전원에게notificationsINSERT → 기존 파이프라인(trg_notifications_push → pg_net → send-push → FCM)으로 인앱+푸시 자동 전달. 새 인프라 0.system_notice(앱 표기 '공지') 재사용 — 새 타입은 CHECK 제약·클라 매핑 동시 수정이 필요해(과거 트리거가 조용히 삼킨 전례) 회피. 마이그레이션·클라 변경 불필요.rate_limit_hit('edgealert:<key>')재사용) — Gemini 장애 폭주가 알림 폭주로 번지지 않게. 리미터 오류는 fail-open.배선 (7곳)
enroll-pet-identity:ai_unavailable(Gemini),video_too_large(실측값 포함),internal_error(프레임 업로드/RPC)verify-post-photo:ai_unavailable(Gemini),internal_error(사진 업로드/RPC)검증
rate_limit_hit('edgealert:…', 1, 60)호출 가능, 활성 관리자 존재,system_noticeINSERT 가push_status='pending'으로 큐잉되는 것 확인.배포
enroll-pet-identity v24, verify-post-photo v20 ACTIVE.
스택 PR: base =
fix/pet-identity-hardening(#134) — 같은 파일을 수정하므로 #134 머지 후 자동 리타겟.관련: seizeh/pmdart#157(앱 크래시 리포팅은 seizeh/pmdart#213), launch-checklist §7 첫 항목
🤖 Generated with Claude Code