78 Commits

Author SHA1 Message Date
7acd72c74e fix: 게임 업데이트 감지를 game.zip 전체 해시로 변경
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 34s
Server CI/CD / deploy (push) Successful in 52s
A301.exe만 해시하면 Mono 빌드에서 exe가 변경되지 않아
Data 폴더의 스크립트/에셋 변경을 감지하지 못하는 문제 수정.
hashGameExeFromZip → hashFileToHex(game.zip 전체)로 변경.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:40:55 +09:00
b1e89dca1c Revert: 세션명 고유화 제거 (dedicated server와 세션명 불일치 문제)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 36s
Server CI/CD / deploy (push) Successful in 51s
- dedicated server는 원래 슬롯명으로 Fusion 세션을 시작하므로
  클라이언트도 동일한 세션명을 사용해야 함
- SlotSessionName 필드는 유지 (향후 활용 가능)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 23:38:43 +09:00
510f731a10 Fix: 로그인/갱신 응답에 refreshToken body 포함
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 38s
Server CI/CD / deploy (push) Successful in 52s
- Login, SSAFYLogin, Refresh 응답 JSON에 refreshToken 추가
- 기존: 쿠키로만 전송 → Unity 클라이언트가 못 받아서 토큰 갱신 실패
- 수정: body + 쿠키 모두 전송 (웹/게임 클라이언트 호환)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:08:19 +09:00
ac6827aae5 Fix: 보스 레이드 재입장 불가 버그 수정
- BossRoom 세션명을 매 입장마다 고유하게 생성 (슬롯명_타임스탬프)
- SlotSessionName 필드 추가로 슬롯 리셋 시 원래 슬롯명 사용
- DeleteRoomBySlotSessionName 추가 (dedicated server ResetRoom 대응)
- CompleteRaid/FailRaid/cleanup에서 슬롯 리셋 로직 수정

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:04:03 +09:00
b006fe77c2 fix: API 서버 코드 리뷰 버그 15건 수정 (CRITICAL 2, HIGH 2, MEDIUM 11)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 38s
Server CI/CD / deploy (push) Successful in 50s
CRITICAL:
- graceful shutdown 레이스 수정 — Listen을 goroutine으로 이동
- Register 레이스 컨디션 — sentinel error + MySQL duplicate key 처리

HIGH:
- 멱등성 키에 method+path 포함 — 엔드포인트 간 캐시 충돌 방지
- 입장 토큰 생성 실패 시 방/슬롯 롤백 추가

MEDIUM:
- RequestEntry 슬롯 없음 시 503 반환
- chain ExportWallet/GetWalletInfo/GrantReward 에러 처리 개선
- resolveUsername 에러 타입 구분 (duplicate key vs 기타)
- 공지사항 길이 검증 byte→rune (한국어 256자 허용)
- Level 검증 범위 MaxLevel(50)로 통일
- admin 자기 강등 방지
- CORS ExposeHeaders 추가
- MySQL DSN loc=Local→loc=UTC
- hashGameExeFromZip 100MB 초과 절단 감지

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:05:27 +09:00
c9af89a852 fix: CompleteRaid 보상 지급 블로킹 제거
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 36s
Server CI/CD / deploy (push) Successful in 51s
HTTP 핸들러에서 동기 재시도(3회 + sleep 1s/2s)를 제거하고
1회만 시도 후 실패 시 즉시 RewardFailure DB에 저장.
기존 RewardWorker가 백그라운드에서 재시도 처리.

변경 전: 최악 ~18초 블로킹 (데디서버 15초 타임아웃 초과)
변경 후: RPC 1회 × 플레이어 수 ≈ 2-3초

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 16:28:34 +09:00
11d3cdfc25 fix: API rate limit 60→120 req/min 상향
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 33s
Server CI/CD / deploy (push) Successful in 50s
지갑 페이지에서 GET 호출이 다수 발생하여 429 빈번히 발생하던 문제 완화.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 15:52:57 +09:00
0cd0d2a402 feat: wallet private key export API with password verification
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 39s
Server CI/CD / deploy (push) Successful in 52s
2026-03-23 10:52:27 +09:00
10a3f0156b feat: v1→v2 wallet key migration on server startup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 10:45:06 +09:00
3a75f64d44 test: HKDF per-wallet encryption unit tests 2026-03-23 10:42:19 +09:00
d79156a1d7 feat: HKDF per-wallet key derivation for wallet encryption
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 10:39:46 +09:00
81214d42e5 feat: add key_version and hkdf_salt columns to UserWallet 2026-03-23 10:36:50 +09:00
d46ba47c63 feat: 파티 인원 기반 MaxPlayers 설정 + validate-entry에 expectedPlayers 응답
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 56s
Server CI/CD / deploy (push) Successful in 56s
- RequestEntry에서 MaxPlayers를 len(usernames)로 설정 (기존 고정 3 → 동적)
- ValidateEntryToken 응답에 expectedPlayers 필드 추가
- 데디 서버가 파티 크기만큼 접속 시 레이드 시작 가능

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:54:13 +09:00
cc9884bdfe fix: 아키텍처 리뷰 HIGH/MEDIUM 이슈 10건 수정
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 34s
Server CI/CD / deploy (push) Successful in 50s
HIGH (3건):
- 런처 파일 업로드 시 PE 헤더 검증 + 500MB 크기 제한 추가
- 체인 노드 URL 파싱 시 scheme/host 유효성 검증
- Dockerfile 비루트 사용자(app:1000) 실행

MEDIUM (7건):
- SSAFY username 충돌 시 랜덤 suffix로 최대 3회 재시도
- 내부 API username 검증 validID(256자) → validUsername(3~50자) 분리
- 동시 업로드 경합 방지 sync.Mutex 추가
- 프로덕션 환경변수 검증 강화 (DB_PASSWORD, OPERATOR_KEY_HEX, INTERNAL_API_KEY)
- Redis 에러 시 멱등성 요청 통과 → 503 거부로 변경
- CORS AllowOrigins 환경변수화 (CORS_ALLOW_ORIGINS)
- Refresh 엔드포인트 rate limiting 추가 (IP당 5 req/min)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:56:58 +09:00
e16e1b5e0a feat: recover 미들웨어 추가 (패닉 시 스택트레이스 출력)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 35s
Server CI/CD / deploy (push) Successful in 54s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:56:33 +09:00
4c367e84ad Fix: entry token 만료 기반으로 stale waiting room 판단
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 35s
Server CI/CD / deploy (push) Successful in 56s
타임아웃 대신 Redis entry token 존재 여부로 판단:
- pending token이 Redis에 남아있음 → 정상 로딩 중, 방 보존
- pending token이 없음 (만료/소비) → abandoned 확정, 즉시 정리

정상 로딩 중인 파티원의 방을 보호하면서도
강제 종료 유저의 즉각적 복구 가능.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:16:28 +09:00
7ece5f3c44 Fix: 로딩 중 강제 종료 시 stale waiting room 자동 정리
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 38s
Server CI/CD / deploy (push) Successful in 55s
로딩 화면에서 강제 종료하면 BossRoom이 waiting 상태로 남아
재입장이 영구 차단되는 문제 수정.

- waiting 상태 2분 초과 BossRoom 자동 정리 (15초 주기)
- RequestEntry 시 해당 유저의 stale waiting room 선제 정리
- 연결된 RoomSlot도 idle로 리셋

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:00:36 +09:00
4bbab002ea Fix: 테스트 코드 콜백 시그니처 업데이트 (rewardGrant → txID 반환)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 36s
Server CI/CD / deploy (push) Successful in 54s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:45:44 +09:00
9883985968 Fix: 보상 이중 지급 방지, 에러 응답 개선, Rate Limit 조정
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 32s
Server CI/CD / deploy (push) Has been skipped
- reward_worker에 txCheck 기반 이중 지급 방지 추가 (LastTxID 저장 후 재시도 전 확인)
- RewardFailure 모델에 LastTxID 필드 추가
- grantWithRetry가 txID를 반환하도록 변경
- 10회 재시도 초과 시 CRITICAL 로그에 상세 정보 포함
- 경험치 실패도 hasRewardFailure에 반영하여 reward_failed 상태 전이
- 에러 응답에 requestId 필드 포함 (관측성 개선)
- /api/auth/refresh를 authLimiter에서 분리 (NAT 환경 한도 초과 방지)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:01:45 +09:00
dc2bcb1c5d Fix: Gitea 워크플로우에서 GitHub Action 의존 제거
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 37s
Server CI/CD / deploy (push) Successful in 58s
actions/checkout, actions/setup-go, appleboy/ssh-action을
직접 실행 방식으로 대체. Gitea runner github.com clone 차단 문제 해결.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:05:01 +09:00
f50b629d59 Fix: CORS AllowHeaders에 X-Requested-With 추가
Some checks failed
Server CI/CD / lint-and-build (push) Waiting to run
Server CI/CD / deploy (push) Has been cancelled
웹 클라이언트의 fetch 요청에서 X-Requested-With 헤더가
CORS preflight에서 차단되는 문제 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:02:56 +09:00
eeb9e746b8 Merge pull request 'fix/bossraid-slot-reuse' (#2) from fix/bossraid-slot-reuse into main
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 18s
Server CI/CD / deploy (push) Successful in 57s
Reviewed-on: #2
2026-03-19 04:18:32 +00:00
4393503245 Fix: GrantExperience에서 프로필 미존재 시 자동 생성 fallback 추가
FindByUserID → GetProfile(auto-create 포함)로 변경하여
프로필 없는 유저의 경험치 지급 실패 방지.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:15:49 +09:00
d6c75dcaad Fix: BossRoom 레코드 미삭제로 데디서버 슬롯 재사용 불가 수정
CompleteRaid/FailRaid에서 슬롯 리셋 전 BossRoom hard-delete 추가.
기존에는 BossRoom.SessionName uniqueIndex 충돌로 한 번 사용된 슬롯의
재사용이 불가능했음 (10개 중 점점 사용 가능 슬롯 감소).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:00:14 +09:00
7db63d2d92 Merge pull request 'Fix: 지갑 미발견 시 자동 생성 fallback 추가' (#1) from fix/wallet-auto-create into main
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 21s
Server CI/CD / deploy (push) Successful in 1m0s
Reviewed-on: #1
2026-03-19 02:30:28 +00:00
83c583c04d Fix: 지갑 미발견 시 자동 생성 fallback 추가
resolveUsername()에서 user_wallets 레코드가 없는 유저(레거시/마이그레이션 누락)에 대해
CreateWallet을 자동 호출하여 지갑을 즉시 생성. unique constraint 충돌 시 재조회로
동시성 안전 처리.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:28:38 +09:00
feb8ec96ad feat: 체인 클라이언트 멀티노드 페일오버 (SPOF 해결)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 21s
Server CI/CD / deploy (push) Successful in 56s
CHAIN_NODE_URLS 환경변수(쉼표 구분)로 복수 노드 지정 가능.
Client.Call()이 네트워크/HTTP 오류 시 다음 노드로 자동 전환.
RPC 레벨 오류(트랜잭션 실패 등)는 즉시 반환 (페일오버 미적용).
기존 CHAIN_NODE_URL 단일 설정은 하위 호환 유지.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:31:46 +09:00
e187a20e28 ci: Gitea 환경으로 전환 (git.tolelom.xyz 레지스트리, tolchain GitHub 체크아웃)
- Docker registry: ghcr.io → git.tolelom.xyz
- 로그인: GITEA_TOKEN 사용
- tolchain 체크아웃: vars.TOLCHAIN_GITHUB_REPO 로 GitHub에서 가져오기

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:25:16 +09:00
38da7ce57a ci: vet + 커버리지 리포트 + Docker GHCR 빌드/푸시 + SSH 배포 추가
- test job: go vet + go build + go test (coverage.out 아티팩트 업로드)
- docker job: main 머지 시 GHCR 이미지 빌드/푸시 (tolchain 의존성 처리)
- deploy job: SSH로 docker compose pull api && up

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:21:13 +09:00
fa03673e9c refactor: main.go 서버 초기화 로직을 internal/server/server.go로 분리
Fiber 앱 설정, 미들웨어, rate limiter를 server 패키지로 추출.
main.go는 DB 연결, DI, 서버 시작, graceful shutdown만 담당.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:11:13 +09:00
0dfa744c16 feat: DB DI 전환 + download 하위 호환성 + race condition 수정
- middleware(Auth, Idempotency)를 클로저 팩토리 패턴으로 DI 전환
- database.DB/RDB 전역 변수 제거, ConnectMySQL/Redis 값 반환으로 변경
- download API X-API-Version 헤더 + 하위 호환성 규칙 문서화
- SaveGameData PlayTimeDelta 원자적 UPDATE (race condition 해소)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:58:36 +09:00
f4d862b47f feat: 보상 재시도 + TX 확정 대기 + 에러 포맷 통일 + 품질 고도화
- 보상 지급 실패 시 즉시 재시도(3회 backoff) + DB 기록 + 백그라운드 워커 재시도
- WaitForTx 폴링으로 블록체인 TX 확정 대기, SendTxAndWait 편의 메서드
- chain 트랜잭션 코드 중복 제거 (userTx/operatorTx 헬퍼, 50% 감소)
- AppError 기반 에러 응답 포맷 통일 (8개 코드, 전 핸들러 마이그레이션)
- TX 에러 분류 + 한국어 사용자 메시지 매핑 (11가지 패턴)
- player 서비스 테스트 20개 + chain WaitForTx 테스트 10개 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:42:03 +09:00
8da2bdab12 ci: GitHub Actions 워크플로우 추가
Go 빌드 + 테스트 자동화 (push/PR on main)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:56:21 +09:00
b16eb6cc7a feat: 에러 처리 표준화 + BossRaid 낙관적 잠금
에러 표준화:
- pkg/apperror — AppError 타입, 7개 sentinel error
- pkg/middleware/error_handler — Fiber ErrorHandler 통합
- 핸들러에서 AppError 반환 시 구조화된 JSON 자동 응답

BossRaid Race Condition:
- 상태 전이 4곳 낙관적 잠금 (UPDATE WHERE status=?)
- TransitionRoomStatus/TransitionRoomStatusMulti 메서드 추가
- ErrStatusConflict sentinel error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:48:28 +09:00
844a5b264b feat: 보안 수정 + Prometheus 메트릭 + 단위 테스트 추가
보안:
- Zip Bomb 방어 (io.LimitReader 100MB)
- Redis Del 에러 로깅 (auth, idempotency)
- 로그인 실패 로그에서 username 제거
- os.Remove 에러 로깅

모니터링:
- Prometheus 메트릭 미들웨어 + /metrics 엔드포인트
- http_requests_total, http_request_duration_seconds 등 4개 메트릭

테스트:
- download (11), chain (10), bossraid (20) = 41개 단위 테스트

기타:
- DB 모델 GORM 인덱스 태그 추가
- launcherHash 필드 + hashFileToHex() 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:37:42 +09:00
82adb37ecb fix: BossRoom soft delete → hard delete + 프로필 자동 생성
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 17s
Server CI/CD / deploy (push) Successful in 57s
- BossRoom 삭제 시 Unscoped() hard delete로 변경하여 unique index 충돌 방지
- GetProfile에서 프로필 없으면 기본값으로 자동 생성

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:09:23 +09:00
2c1e9698d2 refactor: 클라이언트 직접 호출 BossRaid 엔드포인트 제거
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 13s
Server CI/CD / deploy (push) Successful in 55s
클라이언트가 MMO 서버 경유로 보스 레이드 입장하도록 변경하면서
불필요해진 public /api/bossraid/ 라우트와 핸들러 제거.
입장은 MMO 서버 → internal API 경로만 사용.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:56:38 +09:00
333cfa7911 fix: Swagger CSP에 validator.swagger.io 이미지 허용 추가
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 12s
Server CI/CD / deploy (push) Successful in 53s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 09:23:27 +09:00
635dfb3221 fix: Swagger UI CSP 완화하여 리소스 로딩 허용
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 15s
Server CI/CD / deploy (push) Successful in 57s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 09:19:26 +09:00
fc976dbba8 fix: ResetRoom 시 BossRoom 레코드 정리
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 15s
Server CI/CD / deploy (push) Successful in 57s
데디서버가 reset-room 호출 시 슬롯만 idle로 변경하고 BossRoom 레코드는
남아있어서 다음 입장 시 unique 제약 위반(Duplicate entry) 발생.
ResetRoom에서 해당 sessionName의 BossRoom 레코드도 함께 삭제.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 23:17:14 +09:00
0ad19562a5 fix: Internal API 라우트를 apiLimiter보다 먼저 등록
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 13s
Server CI/CD / deploy (push) Successful in 58s
Fiber는 라우트를 등록 순서대로 매칭하므로, /api/internal이 /api 그룹
뒤에 있으면 apiLimiter가 먼저 적용됨. 순서를 변경하여 Rate Limit 우회.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:40:51 +09:00
5758c4784e fix: Internal API를 Rate Limiter에서 분리
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 14s
Server CI/CD / deploy (push) Successful in 58s
데디케이트 서버 10개 인스턴스의 하트비트가 apiLimiter(IP당 60req/min)에
걸려 429 에러 발생. Internal API를 별도 그룹으로 분리하여 Rate Limit 제외.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:32:49 +09:00
22e0652ee3 fix: 좀비 슬롯 정리 및 보상 실패 상태 추적
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 1m5s
Server CI/CD / deploy (push) Successful in 58s
- RequestEntry() 시 CheckStaleSlots() 호출하여 좀비 슬롯 자동 정리
- 블록체인 보상 실패 시 BossRoom 상태를 reward_failed로 업데이트
- UpdateRoomStatus() 레포지토리 메서드 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 20:07:34 +09:00
befea9dd68 feat: Swagger API 문서 추가 + 보스레이드/플레이어 레벨 시스템
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 12m3s
Server CI/CD / deploy (push) Has been cancelled
- swaggo/swag 기반 전체 API 엔드포인트 Swagger 어노테이션 (59개)
- /swagger/ 경로에 Swagger UI 제공
- 보스레이드 데디서버 관리 (등록, 하트비트, 슬롯 리셋)
- 플레이어 레벨/경험치 시스템 및 스탯 성장

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 17:51:37 +09:00
ee2cf332fb ci: lint-and-build에 tolchain 클론 추가 (go.mod replace 의존성)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 1m0s
Server CI/CD / deploy (push) Successful in 1m27s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 23:47:07 +09:00
9c27edf4fb ci: 테스트 실행 추가 + git clone 토큰 로그 노출 방지
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 53s
Server CI/CD / deploy (push) Has been skipped
- lint-and-build 단계에 go test ./... 추가
- deploy 단계 git clone에 set +x / --quiet / 2>/dev/null 적용

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 20:09:39 +09:00
423e2832a0 fix: 3차 리뷰 LOW — 에러 메시지 일관성, Redis 타임아웃, 입력 검증
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 30s
Server CI/CD / deploy (push) Has been skipped
- 5개 핸들러 err.Error() → 제네릭 메시지 (Login, Refresh, SSAFY, Ticket, BossRaid)
- Redis context.Background() → WithTimeout 5s (10곳)
- SprintMultiplier 범위 검증 추가
- 방어적 문서화 (SSAFY 충돌, zip bomb, body limit prefix, 로그 주입)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 19:05:17 +09:00
9504bf37de fix: RequestEntry TOCTOU 경쟁 조건 수정 — 트랜잭션으로 원자화
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 38s
Server CI/CD / deploy (push) Has been skipped
중복 입장 방지를 위해 active-room 체크와 room 생성을 단일 트랜잭션으로 래핑

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 18:53:33 +09:00
b0de89a18a feat: 코드 리뷰 기반 전면 개선 — 보안, 검증, 테스트, 안정성
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 47s
Server CI/CD / deploy (push) Has been skipped
- 체인 nonce 경쟁 조건 수정 (operatorMu + per-user mutex)
- 등록/SSAFY 원자적 트랜잭션 (wallet+profile 롤백 보장)
- IdempotencyRequired 미들웨어 (SETNX 원자적 클레임)
- 런치 티켓 API (JWT URL 노출 방지)
- HttpOnly 쿠키 refresh token
- SSAFY OAuth state 파라미터 (CSRF 방지)
- Refresh 시 DB 조회로 최신 role 사용
- 공지사항/유저목록 페이지네이션
- BodyLimit 미들웨어 (1MB, upload 제외)
- 입력 검증 강화 (닉네임, 게임데이터, 공지 길이)
- 에러 메시지 내부 정보 노출 방지
- io.LimitReader (RPC 10MB, SSAFY 1MB)
- RequestID 비출력 문자 제거
- 단위 테스트 (auth 11, announcement 9, bossraid 16)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 18:03:25 +09:00
cc8368dfba feat: 인프라 개선 — 헬스체크, 로깅, 보안, CI 검증
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 1m13s
Server CI/CD / deploy (push) Has been skipped
- /health + /ready 엔드포인트 추가 (DB/Redis 상태 확인)
- RequestID 미들웨어 + 구조화 JSON 로깅
- 체인 트랜잭션 per-user rate limit (20 req/min)
- DB 커넥션 풀 설정 (MaxOpen 25, MaxIdle 10, MaxLifetime 5m)
- Graceful Shutdown 시 Redis/MySQL 연결 정리
- Dockerfile HEALTHCHECK 추가
- CI에 go vet + 빌드 검증 단계 추가 (deploy 전 실행)
- 보스 레이드 클라이언트 입장 API (JWT 인증)
- Player 프로필 모듈 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:41:34 +09:00