feat(game): 웹 게임 아케이드 #23 — KMP 결정적 코어 + commerce:app 폴드 + 서브도메인 접근#7
Open
1989v wants to merge 3 commits into
Open
feat(game): 웹 게임 아케이드 #23 — KMP 결정적 코어 + commerce:app 폴드 + 서브도메인 접근#71989v wants to merge 3 commits into
1989v wants to merge 3 commits into
Conversation
e934ec1 to
21864fa
Compare
- game:sim (KMP jvm+js): 정수 결정적 엔진(mulberry32 PRNG·고정 timestep·SimRunner) + Snake.
같은 코어를 브라우저(플레이)와 commerce:app JVM(Tier B 리플레이)이 공유.
- game:domain: 백엔드 도메인 + 포트 + Tier A(ScorePlausibility)·Tier B(ReplayVerifier).
- game:feature: Redis 전용 인프라(세션·리플레이·리더보드 ZSET·플레이어·데일리) + HMAC 토큰
+ 제출 오케스트레이션(Tier A→잠정등재→상위N Tier B) + REST. commerce:app 폴드(추가 프로세스 0).
- game:web (Kotlin/JS): game:sim js 코어 소비 canvas Snake 클라 → game.js 번들.
- 빌드: 루트 subprojects{} 에서 KMP 모듈 카브아웃 + 카탈로그 kotlin-multiplatform.
- 검증: 15 테스트(sim 5·domain 5·feature 4·commerce 컨텍스트 로드 1) green.
영속은 MVP Redis 전용(내구성 MySQL 후속). ADR-0058 commerce:app 폴드.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- 게이트웨이: /api/v1/game/** → commerce:8085 (게스트 공개, app-level 닉네임 게이트) - 정적 서빙: game:web 번들(game.js + index.html)을 commerce:app static/game/ 으로 패키징 → /game/ 서빙 - 라이브 E2E(game:feature): testcontainers Redis + 임베디드 Tomcat + JDK HttpClient · 세션 시작→결정적 플레이→제출→Tier A→Redis ZSET 리더보드→in-JVM Tier B 리플레이→CONFIRMED #1 · 같은 리플레이 점수 위조 → Tier B REJECTED (tests=2 green) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… 무변경)
- gateway: game-client Host("game.**") 라우트 — 정적 엔트리 allowlist 만
prefixPath(/game) 로 commerce 프록시. /api/** 는 표준 path 라우트(인증 포함)
그대로 → game host 로 타 도메인 API 인증 우회 불가.
- game:feature: /game, /game/ welcome forward → index.html (디렉토리 500 해소,
서브도메인 루트 서빙 담당). 컨텍스트 스펙에 gameWebConfig assertion 추가.
- oci-arm: commerce-proxied 에 game.__DOMAIN__ host + TLS 추가 (api host 와
동일한 전체→gateway 형태). ingress-nginx→gateway→commerce 경로라 netpol
02/03 재사용, 신규 정책 없음.
- k3s-lite: game.127.0.0.1.nip.io 로컬 서브도메인 ingress (oci-arm 상속 시
$patch: delete 로 제외 — 기존 frontend/gateway delete 패턴 준수).
- game/CLAUDE.md: 모듈/커맨드/접근(서브도메인 3경로)/결정성 불변식 문서화.
검증: kustomize 렌더 2종(oci-arm 에 game host 2ref + 로컬 ingress 0ref),
gateway compileKotlin, 게임 테스트 16 green, commerce 컨텍스트 로드(6도메인
+game, gameWebConfig 포함) green.
Co-Authored-By: Claude Fable 5 <[email protected]>
21864fa to
dd1e050
Compare
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.
웹 게임 아케이드 (#23) — 첫 수직 슬라이스 (Snake) + 서브도메인 접근
로그인 없이 즐기는 캐주얼 게임을 commerce 모듈러 모놀리스에 폴드. 핵심은 랭킹 무결성: 같은 결정적 코어가 브라우저(플레이)와 서버(Tier B 리플레이 검증)에서 동일 실행되어 점수 위조를 잡는다.
커밋 구성 (3)
game:sim(KMP jvm+js: 정수 PRNG·고정 timestep·SimRunner + Snake) /game:domain(Tier AScorePlausibility·Tier BReplayVerifier) /game:feature(Redis 전용: 리더보드 ZSET·세션·리플레이·HMAC 토큰 + 제출 오케스트레이션 + REST) /game:web(Kotlin/JS canvas 클라)/api/v1/game/**라우트, 클라 번들을 commercestatic/game/패키징, testcontainers Redis + 실 HTTP E2E(정직→CONFIRMED docs(adr): ADR-0025 Latency Budget 표준 + 12번 학습 노트 #1, 위조→Tier B REJECTED)game.<domain>host 라우팅 (아래)서브도메인 설계 (netpol 무변경)
/game·/game/welcome forward → index.html (디렉토리 500 해소 + 서브도메인 루트 서빙)commerce-proxied에game.__DOMAIN__host+TLS 추가 · k3s-lite:game.127.0.0.1.nip.io로컬 ingress (oci-arm 상속 시$patch: delete)검증
gameWebConfig포함) — round 2 리베이스 정합 확인game.__DOMAIN__반영 + 로컬 ingress 정확히 제외, k3s-lite 에 로컬 host 존재:commerce:app:bootJar정상(main 의 jar 고유화 fix 반영), 실 브라우저 플레이 확인(데일리 챌린지 포함)배포 시 체크리스트 (oci-arm)
① Cloudflare DNS A
game→ OCI IP (proxied) ②cf-origin-ca-tls가*.<DOMAIN>wildcard 인지 확인 ③game.security.hmac-secretenv 주입 ④ Argo CD sync잔여 (후속)
2번째 게임 · 내구성 MySQL · 봇 입력타이밍 이상탐지 · FE 분리 배포 리팩터
PRD:
ideabank/docs/23-web-game-arcade.md· 서비스 문서:game/CLAUDE.md🤖 Generated with Claude Code