Skip to content

Apply confirmed DSV GPS, reminder, and undelivered-report policy - #488

Merged
OziinG merged 8 commits into
mainfrom
codex/dsv-operations-policy
Oct 11, 2026
Merged

OziinG merged 8 commits into
mainfrom
codex/dsv-operations-policy

Conversation

@OziinG

@OziinG OziinG commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

DSV의 2026-10-08 확정 정책을 서버에 반영합니다. 창고 도착은 당일 GPS 체류 근거로 판단하고, 배송 시작 누락 알림은 출발 5분 후부터 5분마다 횟수 제한 없이 생성합니다. 이 반복 알림만 배차 업무일 정오(Asia/Seoul)에 생성·전송·재시도를 중단합니다.

이 PR은 #487 위에 쌓이며 #483의 변경도 포함합니다. 기존 두 PR과 main은 변경하지 않았습니다.

  • PR483: 44e6d880684609f7d075f3102c634a999b5c24ca
  • 구현 기준 PR487: 18ea784934ec3cf511f56646b708d141617c404b
  • 최종 SHA: b3710cad863a8c12d2a7e38a90486cc8010c5722

변경 결과

  • N04: 06:00 제한 없이 회차당 한 번 안내합니다. 공개 당시 이미 창고에 있으면 최신 유효 GPS와 연속 체류 이력으로 판단합니다. 기존 품질·배정·모호성·중복 방지 검사를 유지합니다. SHADOW 도착 후 LIVE로 전환한 회차의 복귀도 일반 도착과 같은 transaction에서 반복 예약을 중단하고 열린 N05를 종료합니다. 기존 방문 번호와 기록된 도착 이벤트를 보존합니다.
  • N05: 횟수 상한을 제거합니다. 시작·취소·배정 해제/변경·회차 종료 시 먼저 중단합니다. 창고 복귀 후 재출발하면 새 출발 +5분부터 반복을 재개합니다. 정오 이후 대기 작업과 재시도를 차단하며 다음 날 복구나 누락 시간대 몰아보내기를 하지 않습니다. N06의 기존 시간 조건은 유지합니다.
  • N01/N02: 공개·실질 변경 성공 시 야간에도 발송 절차를 시작합니다. 수신 자격과 요청 중복 방지 계약을 유지합니다.
  • 미배송 보고: 자유 텍스트 reason을 받으며 기존 reasonCode/explanation도 유지합니다. 사진을 요구하지 않고 배송 결과를 변경하지 않습니다. 보고 행에 배차일·기사·배송지·보고 시각·사유를 포함한 메일 내용을 저장합니다. 한 보고가 한 메일 작업이며 실제 발송기는 연결하지 않습니다.
  • 보관: 알림 만료가 이력 삭제를 일으키지 않음을 검증합니다. 원본 GPS·사진·기술 로그 정책은 변경하지 않습니다.

검증

  • 최종 SHA의 CI 전체 검증 통과. Node 22에서 API/Web 검사, 임시 PostgreSQL, 빌드, Compose 설정 검사까지 완료했습니다.
  • prisma:generate, lint, typecheck, test, build 통과.
  • 전체 API: 279개 파일, 3,317개 테스트 통과. 334개 보호/선택 테스트 제외.
  • 별도 PostgreSQL 17 및 HTTP: 83개 테스트 통과, 외부 Driver 저장소 선택 테스트 2개 제외. 115개 마이그레이션 적용. 테스트 DB는 검증 후 종료·삭제했습니다.
  • 06:00 이전/공개 전 체류, 6회 초과 반복, 정오 경계와 잠금·SDK 로딩 중 정오 경과, 다음 날 차단, 시작·취소·재배정, 실제 야간 등록·변경, 자유 텍스트·동시 재시도·격리 메일, 2036년 만료 후 이력 유지, 기존 완료 복구·권한·구형 앱·사진 없는 완료 회귀를 검증했습니다.
  • 실제 reconcileWarehouseArrivals → runOnce → tickReminders 순서의 실패를 먼저 재현했습니다. 영구 회귀 검사 2개로 복귀 중단, 재시작·큐 재처리 중복 방지, 방문 번호 보존, 정확한 재출발 +5분 재개를 검증했습니다.
  • 독립 소스 리뷰 지적을 수정하고 재검토했습니다. 비밀정보 검사와 git diff --check 통과.
  • 이번 로컬 Prisma 생성과 격리 DB/HTTP 검사는 통과했습니다. Node 24.19.0의 로컬 lint는 600초, typecheck는 300초 제한에 도달했습니다. 이 실행은 통과로 계산하지 않았습니다. 로컬 순차 실행에서 후속 전체 test/build는 실행되지 않았으며, 필수 5개 명령 모두 최종 SHA의 Node 22 CI에서 통과한 결과로 검증했습니다.

계약과 남은 범위

  • 앱 API와 확정 정책
  • 검증 근거와 제외 항목
  • 앱은 기존 보고 API에 최대 1,000자의 reason과 안정적인 command ID/배정·버전 필드를 전송합니다. 최초 201, 재시도 200 및 duplicate: true 계약을 유지합니다. reportStatus: ACCEPTED와 emailStatus: PREPARED는 보고 접수 영수증이며 메일 발송 성공이 아닙니다.
  • 수신 주소·발송 연결과 실제 FCM/메일 검증은 후속 작업입니다. 모호한 메일 결과 UNKNOWN과 중단된 SENDING은 자동 재발송하지 않습니다. 기존 명시적 계정/테넌트 삭제 동작은 유지합니다.
  • 앱·관제 웹 소스는 변경하지 않았습니다. 별도 관제 처리 절차는 추가하지 않습니다. C1은 재조사하지 않았습니다.
  • 운영 DB 변경, 실제 푸시·메일, 병합·배포, 실기기 조작은 수행하지 않았습니다. 실차 GPS 검증은 다음 주 앱 배포 이후입니다.

OziinG added 2 commits October 8, 2026 14:32
Use business-day GPS evidence for depot arrival and stop uncapped five-minute
start reminders at Seoul noon. Accept free-text reports and prepare one durable
staff email job on the existing report without wiring a live sender.

Constraint: No live provider sends, production changes, merge, or deployment
Rejected: Separate generic mail subsystem | The existing report row provides one durable job
Confidence: high
Scope-risk: moderate
Directive: Keep the noon cutoff exclusive to N05 and preserve notification/report history
Tested: Prisma generation, lint, typecheck, 3317 API tests, 81 isolated PostgreSQL/HTTP tests, build
Not-tested: Actual FCM/email delivery, real vehicle GPS, device acceptance
Reconciliation can confirm return before queued samples can emit ARRIVED.
Apply the same pause and notification resolution in that transaction, and
preserve existing visits so recovery cannot duplicate recorded transitions.

Constraint: Keep PR483/487, frontend work, and existing operating policies intact
Rejected: Rely on the next queued ARRIVED | Reconciled INSIDE already consumes its observations
Confidence: high
Scope-risk: narrow
Directive: Keep warehouse return effects atomic with reconciled geofence state
Tested: Original failure reproduced; two permanent regressions and 83 isolated PostgreSQL/HTTP tests passed; independent source review
Not-tested: Actual providers, operational databases, and real vehicles
OziinG and others added 5 commits October 11, 2026 16:33
…tion-recovery branch so PR #488 reviews against current main

Merges the updated codex/dsv-completion-result-recovery (main e48d1c6 merged) into
the operations-policy branch. The only conflict was the migration history test,
rewritten for 120 migrations with the exception-email migration ordered after
main's completion receipts and before the delivery-options settlement.

Constraint: 20261008090000_dsv_delivery_exception_email shares its timestamp prefix with main's 20261008090000_driver_stop_completion_receipts; Prisma orders them by full folder name, so the DSV one applies second.
Confidence: medium
Scope-risk: narrow
Tested: prisma generate/validate, tsc, vitest 3506 pass, 120 migrations deploy on PostgreSQL 17, DSV PostgreSQL integration 83 pass, typed eslint
Not-tested: CI on this merge, production migration order, real mail delivery

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…Stop time after driver change) into the operations-policy branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…icy branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s-policy branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…policy branch

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@OziinG
OziinG changed the base branch from codex/dsv-completion-result-recovery to main October 11, 2026 11:11
@OziinG
OziinG marked this pull request as ready for review October 11, 2026 11:11
@OziinG
OziinG merged commit 206ccde into main Oct 11, 2026
2 checks passed
@OziinG
OziinG deleted the codex/dsv-operations-policy branch October 13, 2026 15:20
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.

1 participant