0028 P2 — 위탁 알림장 서버: 스레드 모델·반복 발행·스레드 claim#124
Merged
Conversation
키즈노트 모델(0028 §4.4) 서버 전체:
- app.care_threads(펫×업체 상시 1개, '건' 엔티티 없음) + care_reports.
thread_id. 보관은 파생값(boarding_archive_days 설정, 기본 7일) —
상태 저장·크론 불필요, 새 기록 오면 자연 복귀
- create_care_thread/create_boarding_report(has_license('boarding')
게이트, 빈 발행 거부, 발행마다 단건 공유 링크 + 연결 보호자 도착 알림)
- claim_care_reports 스레드 단위 확장(기존 기록 포함 연결), 받은 기록에
body·thread_id 노출, my_care_threads(archived 파생)·care_thread_reports
- 뷰어 v9: 미용/돌봄 제목 분기 + 알림장 필드(식사·배변·컨디션·산책) 렌더,
전/후 배지는 미용에만. 미연결 스레드 hmac 30일 크론 파기
- pgTAP t12 14케이스 + 러너 plan 불일치 감지 보강 — 전 스위트 통과,
운영 적용·뷰어 렌더 검증 완료
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.
내용 (P2 서버 전체 — 앱 UI 는 후속 PR)
키즈노트 모델(0028 §4.4)을 설계 결정 그대로:
스레드 모델
app.care_threads— 반려동물×업체 상시 1개, '위탁 건' 엔티티 없음(수동 종료는 잊히고 날짜 기반은 깨진다는 3차 개정 결정). 기록은care_reports.thread_id로 쌓이고 날짜 그룹핑은 앱 담당last_report_at이boarding_archive_days(care_config, 기본 7·무마이그레이션 튜닝) 경과면 archived, 새 기록 오면 자연 복귀. 상태 저장·크론 없음RPC
create_care_thread/create_boarding_report—has_license('boarding')게이트, 수신자 번호는 스레드에 한 번(선택), 빈 발행 거부, 발행마다 단건 공유 링크(기존 care_report 뷰어 파이프라인 재사용 — 스레드 전체 웹 뷰는 안 만듦, 개인정보 최소)claim_care_reports확장 — 스레드 단위 자동 연결(기존 기록 포함). 연결 후 발행은 즉시 보호자에게 보이고 도착 알림 발송my_care_threads(archived 파생·최근 사진·연결 닉네임) /care_thread_reports(업체 또는 연결 보호자만) /my_received_care_reports에 body·thread_id 추가뷰어 (v9 배포)
미용/돌봄 제목 분기, 알림장 구조 필드(🍚식사·🚽배변·😊컨디션·🐾산책) 렌더, 전/후 배지는 미용에만. 운영 실렌더 검증 후 테스트 데이터 정리
검증
pgTAP
t1214케이스(게이트/생성/발행/빈발행 거부/스레드 claim/기존기록 연결/연결 후 알림/보호자 조회/제3자 거부/보관 파생) + 러너가 plan 불일치(# Looks like)도 실패로 감지하도록 보강 — 전 스위트 운영 DB 통과. 스냅샷 동기화.후속
앱 UI — 업체: 알림장 스레드 목록(보관 접힘)·발행 화면(식사·배변·컨디션 입력), 보호자: 스레드 뷰
🤖 Generated with Claude Code