Skip to content

feat(identity): 공통 Identity API 기반 구성 #48#52

Open
kusuri12-09 wants to merge 10 commits into
developfrom
feat/48-identity-common-api
Open

feat(identity): 공통 Identity API 기반 구성 #48#52
kusuri12-09 wants to merge 10 commits into
developfrom
feat/48-identity-common-api

Conversation

@kusuri12-09

@kusuri12-09 kusuri12-09 commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Identity API가 공유하는 응답·오류 응답·response mapper를 추가했습니다.
  • Account·StudentProfile과 계정·지원 상태 enum 및 domain exception을 구성했습니다.
  • application result/data 모델과 account/application/password 관련 output port 계약을 정의했습니다.
  • Identity bootstrap 설정, profile별 application 설정, Clock Bean, 실행 스크립트와 Bazel 의존성을 정리했습니다.
  • 공통 PR에서는 Spring Security·JWT·BCrypt 구현을 포함하지 않고, PasswordHasher 계약만 제공합니다.

Related Issue

Scope

  • In scope:
    • 공통 API response/error response 및 mapper
    • Identity domain 모델·enum·exception
    • application result/data 모델과 output port
    • PasswordHash value object와 PasswordHasher interface
    • bootstrap 환경 설정·Clock Bean·profile 설정
    • 실행 스크립트와 Bazel target/dependency 정리
  • Out of scope:
    • auth controller·AuthService·JWT 생성/검증
    • Spring Security 및 BCrypt password adapter
    • application/account controller
    • 실제 account/application JPA repository 및 DB migration
    • Redis·외부 인증 연동

Implementation

  • ApiResponse, ErrorResponse, ErrorDetail, ResponseMapper를 공통 adapter-in 계층에 배치했습니다.
  • Account, StudentProfile, PasswordHash와 관련 enum·예외를 domain 계층에 추가했습니다.
  • AccountRepository, ApplicationDataPort, PasswordHasher 등 후속 기능이 사용할 port와 snapshot/result 모델을 정의했습니다.
  • ClockConfig에서 Clock.systemUTC() Bean을 제공해 후속 auth 서비스와 JWT filter가 동일한 시간을 주입받도록 했습니다.
  • dev/prod/local bootstrap 설정, .env.example, run-service.sh, Bazel test target을 정리했습니다.
  • 공통 모듈에서 Security 의존성과 BCrypt 구현을 제거하고, 실제 보안 라이브러리 연결은 auth PR의 책임으로 분리했습니다.

Testing

  • Unit test code added
  • Integration tests
  • Manual verification
  • 추가·갱신한 테스트:
    • AccountTest
    • StudentProfileTest
    • ApplicationResultTest
    • ResponseMapperTest
    • GlobalExceptionHandlerTest
    • IdentityBootstrapConfigurationTest
  • 제한 사항:
    • 후속 auth PR은 이 PR의 domain/result 타입에 의존하므로, 두 PR을 병합한 뒤 전체 Bazel build/test를 실행해야 합니다.

Deployment Notes

  • Feature flag: 없음
  • Migration required: 이 PR에는 DB schema migration 없음
  • Rollout considerations:
    • profile별 application 설정과 실행 스크립트가 추가되었으므로 배포 환경의 DB·애플리케이션 환경변수를 확인해야 합니다.
    • Clock Bean과 PasswordHasher 계약은 후속 auth/application 구현에서 주입해 사용해야 합니다.
    • 실제 저장소·인증 연동은 후속 PR에서 연결합니다.

Checklist

  • Matches product/tech requirements
  • Backward compatibility considered
  • Local PR document updated
  • API success flow verified in a running environment
  • Real persistence/auth adapter connected

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ready-for-review
🚫 Excluded labels (none allowed) (2)
  • wip
  • do-not-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6aa1eaa4-1a14-49fb-b9df-af3998a60b29

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/48-identity-common-api
  • 🛠️ cleanup stale imports
  • 🛠️ harden error messages
  • 🛠️ test clarity pass

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kusuri12-09
kusuri12-09 force-pushed the feat/48-identity-common-api branch from bfe8351 to 5fa6e07 Compare July 24, 2026 07:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@systems/identity/.env.example`:
- Line 5: Separate the production database URL guidance from the local example
in .env.example. Add a distinct production DB_URL example or guide that enforces
TLS and enables server certificate verification, while keeping the existing
non-TLS URL clearly scoped to local development; ensure application-prod.yaml
continues to consume the production DB_URL configuration.

In `@systems/identity/identity-adapter-in/BUILD.bazel`:
- Around line 1-2: Restore the missing test contracts: in
systems/identity/identity-adapter-in/BUILD.bazel lines 1-2 load kt_jvm_test and
TEST_DEPS, and restore the test target executing src/test at lines 13-14; add
tests for GlobalExceptionHandler covering domain exceptions, input errors, and
unhandled exceptions with their expected status and response body. In
systems/identity/identity-bootstrap/BUILD.bazel lines 1-2 restore the bootstrap
test dependency load and restore or add the test target at lines 21-22 to
validate bootstrap configuration.

In
`@systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.kt`:
- Around line 34-36: Update GlobalExceptionHandler.handleUnhandledException to
log the caught exception and stack trace through the application’s structured
logging mechanism before returning the existing INTERNAL_SERVER_ERROR response.
Preserve the generic client-facing response, filter sensitive exception data,
and include the request correlation ID in the log context.

In
`@systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt`:
- Around line 6-9: Rename the public result DTO ApplicationResultResult to
ApplicationResult, then update every reference to the type—including
ResponseMapper and any imports, constructors, or return declarations—while
preserving its fields and behavior.

In `@systems/identity/identity-bootstrap/deps.bzl`:
- Line 3: Align the spring-boot-starter-security dependency with an explicit
authentication policy: add the corresponding SecurityFilterChain or
`@EnableWebSecurity` configuration if unauthenticated requests should be
restricted, or remove/defer the dependency if authentication is not yet
implemented.

In `@systems/identity/identity-bootstrap/src/main/resources/application-dev.yaml`:
- Around line 5-17: Remove executable default database credentials and plaintext
connection defaults from the dev profile, requiring DB_URL, DB_USERNAME, and
DB_PASSWORD to be supplied through environment variables. Remove the default JWT
secret wherever it is defined in this profile and require it from the
environment; move any intentional local-only defaults into a separate local
profile. Also prevent schema mutation by changing the dev profile’s
hibernate.ddl-auto setting from update to a non-mutating mode.

In `@systems/identity/identity-bootstrap/src/main/resources/application.yaml`:
- Around line 4-5: Remove the profiles.default setting from application.yaml so
dev is not selected when SPRING_PROFILES_ACTIVE is missing; deployments must
explicitly inject the prod profile and no default profile should be configured.

In
`@systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt`:
- Around line 14-17: Restrict state mutation in Account.kt by applying private
setters to status and updatedAt, ensuring only domain methods such as delete()
update them. In StudentProfile.kt, apply private setters to application/result
status and timestamp fields, then provide domain transition methods for
submission, cancellation, and result announcement; update both files at the
specified locations.
- Around line 12-21: Account의 password 필드와 Account.create()가 입력된 평문을 보관하지 않도록 해시
값 또는 비밀번호 값 객체만 저장하도록 변경하세요. matchesPassword()는 직접 문자열 비교 대신 애플리케이션의 해시 검증
포트/추상화를 사용하게 하고, 평문을 반환하는 passwordForPersistence() 계약은 제거하며 관련 저장 흐름도 해시 값을
사용하도록 갱신하세요.

In
`@systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt`:
- Around line 22-30: StudentProfile의 상태 전이 계약을 검증하는 결정론적 단위 테스트를 추가하세요.
cancel()이 SUBMITTED에서는 CANCELED로 전이하고 전달된 now로 updatedAt을 갱신하는지, 그 외
applicantStatus에서는 APPLICATION_CANCEL_NOT_ALLOWED를 발생시키는지 검증하세요. 또한
isResultAvailable()이 NOT_ANNOUNCED에서는 false, PASSED와 FAILED에서는 true를 반환하는지 의미 있는
단언으로 테스트하세요.

In
`@systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt`:
- Around line 26-28: Update cannotDeleteAccountWithSubmittedApplication to
capture the thrown IdentityDomainException instead of using the expected
annotation, then explicitly assert that its ErrorCode is
ACCOUNT_DELETE_NOT_ALLOWED and its message matches the expected value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 45ca1cda-1281-425f-a5c0-bb93b360a06a

📥 Commits

Reviewing files that changed from the base of the PR and between 7ff684b and 5fa6e07.

⛔ Files ignored due to path filters (2)
  • kotlin.MODULE.bazel is excluded by none and included by none
  • run-service.sh is excluded by none and included by none
📒 Files selected for processing (47)
  • systems/identity/.env.example
  • systems/identity/identity-adapter-in/BUILD.bazel
  • systems/identity/identity-adapter-in/deps.bzl
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.kt
  • systems/identity/identity-adapter-in/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-application/BUILD.bazel
  • systems/identity/identity-application/deps.bzl
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt
  • systems/identity/identity-application/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-bootstrap/BUILD.bazel
  • systems/identity/identity-bootstrap/deps.bzl
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.kt
  • systems/identity/identity-bootstrap/src/main/resources/application-dev.yaml
  • systems/identity/identity-bootstrap/src/main/resources/application-prod.yaml
  • systems/identity/identity-bootstrap/src/main/resources/application.yaml
  • systems/identity/identity-bootstrap/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-domain/BUILD.bazel
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt
💤 Files with no reviewable changes (3)
  • systems/identity/identity-application/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-adapter-in/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-bootstrap/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
**/{BUILD.bazel,*.bzl}

📄 CodeRabbit inference engine (Custom checks)

In BUILD.bazel and .bzl files, require buildifier-compatible formatting and stable target naming

Files:

  • systems/identity/identity-application/deps.bzl
  • systems/identity/identity-bootstrap/deps.bzl
  • systems/identity/identity-adapter-in/deps.bzl
  • systems/identity/identity-domain/BUILD.bazel
  • systems/identity/identity-adapter-in/BUILD.bazel
  • systems/identity/identity-application/BUILD.bazel
  • systems/identity/identity-bootstrap/BUILD.bazel
**/*.bzl

⚙️ CodeRabbit configuration file

**/*.bzl: Apply Bazel Starlark (.bzl) style guidance.

Readability and docs:

  • Keep file/module docstrings and docstrings for public functions/macros.
  • Use descriptive parameter names and document attribute intent.

API design:

  • Macros should take a name argument and derive generated target names from it.
  • Prefer keyword arguments when calling macros for clarity and stability.
  • Keep macro side effects predictable and visible.

Encapsulation:

  • Use private visibility for helper targets created by macros unless explicitly public.
  • Avoid exposing internal implementation targets unintentionally.

Tooling:

  • Enforce buildifier formatting and lint compliance.

Files:

  • systems/identity/identity-application/deps.bzl
  • systems/identity/identity-bootstrap/deps.bzl
  • systems/identity/identity-adapter-in/deps.bzl
**/*.{kt,go}

📄 CodeRabbit inference engine (Custom checks)

If production logic is changed in Kotlin or Go files, require corresponding test updates in the same subsystem unless the PR description explicitly justifies why tests are unnecessary

Files:

  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt
**/*-domain/**/*.{java,kt,scala,groovy}

📄 CodeRabbit inference engine (Custom checks)

For files under *-domain modules, fail if imports reference adapter or bootstrap packages

Files:

  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt
**/*.{java,kt,scala,groovy,go,js,ts,tsx,jsx,py,rb,rs,cpp,c,h,hpp,cs}

📄 CodeRabbit inference engine (Custom checks)

Flag TODO/FIXME comments introduced by this PR that do not include an issue reference in the form #123 or a full tracker key like PROJ-123

Files:

  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: Apply Kotlin Official Coding Conventions.

Formatting and structure:

  • Use 4 spaces for indentation; no tabs.
  • Keep files focused and readable; avoid horizontal alignment for spacing.
  • Place related declarations together and keep overloads adjacent.
  • Keep implementation member order stable and logical for readability.

Naming:

  • Package names are lowercase and do not use underscores.
  • Class/object names use UpperCamelCase.
  • Functions/properties/local variables use lowerCamelCase.
  • Constants use UPPER_SNAKE_CASE only for true constants.

API and null-safety:

  • Avoid platform type leakage in public APIs.
  • Use explicit types in public APIs when inference obscures meaning.
  • Prefer immutable values (val) over mutable values (var) unless mutation is required.
  • Flag nullable flows that can be replaced with safer modeling.

Imports and idioms:

  • Avoid wildcard imports unless justified by language/tooling conventions.
  • Prefer expression bodies for short, clear functions.
  • Prefer standard library idioms over custom utility wrappers when equivalent.

Architecture and tests:

  • Respect module boundaries (domain/application/adapter/bootstrap layering).
  • Highlight behavior-changing code that lacks corresponding unit/integration tests.
  • Ask for deterministic tests and meaningful assertions, not only happy-path checks.

Files:

  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.kt
  • systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt
  • systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.kt
  • systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.kt
  • systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.kt
**/*-application/**/*.{java,kt,scala,groovy}

📄 CodeRabbit inference engine (Custom checks)

For files under *-application modules, flag direct dependency on infrastructure-specific framework classes unless justified

Files:

  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt
  • systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.kt
**/BUILD.bazel

⚙️ CodeRabbit configuration file

**/BUILD.bazel: Apply Bazel BUILD style guidance.

Core rules:

  • BUILD formatting must match buildifier output.
  • Prefer DAMP BUILD files over over-abstracted DRY patterns.
  • Keep top-level layout clear: load() first, then package/default visibility, then targets.

Target definitions:

  • Keep deps explicit and close to each target's real direct dependencies.
  • Avoid recursive globs unless there is a clear, documented reason.
  • Avoid top-level list comprehensions for generating many targets.
  • Prefer literal labels and stable naming for readability and tooling compatibility.
  • Use boolean values (True/False), not numeric stand-ins.

Maintenance:

  • Flag duplicated target logic that should be moved into a macro.
  • Flag macro usage that hides important dependency or visibility decisions.

Files:

  • systems/identity/identity-domain/BUILD.bazel
  • systems/identity/identity-adapter-in/BUILD.bazel
  • systems/identity/identity-application/BUILD.bazel
  • systems/identity/identity-bootstrap/BUILD.bazel
🪛 detekt (1.23.8)
systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt

[warning] 10-10: In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty.

(detekt.performance.SpreadOperator)

🪛 dotenv-linter (4.0.0)
systems/identity/.env.example

[warning] 7-7: [UnorderedKey] The DB_PASSWORD key should go before the DB_URL key

(UnorderedKey)

🔇 Additional comments (34)
systems/identity/identity-domain/BUILD.bazel (1)

20-20: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.kt (1)

1-7: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.kt (1)

1-27: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.kt (1)

1-7: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.kt (1)

1-6: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.kt (1)

1-10: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.kt (1)

1-7: LGTM!

systems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.kt (1)

3-10: LGTM!

systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.kt (1)

1-10: LGTM!

systems/identity/identity-application/BUILD.bazel (1)

1-12: 🩺 Stability & Availability

identity-application:test 타깃 삭제가 테스트 호출 규약과 일치하는지 확인하세요.

kt_jvm_test 로드와 test 타깃을 제거했지만 systems/identity/identity-application/deps.bzl에는 TEST_DEPS가 남아 있습니다. 공통 Bazel 명령이나 CI가 모듈별 :test 타깃을 호출한다면 분석 단계가 실패할 수 있으므로, 타깃을 유지하거나 호출부와 테스트 의존성을 함께 정리해야 합니다.

systems/identity/identity-application/deps.bzl (1)

3-3: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.kt (1)

1-10: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.kt (1)

1-20: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.kt (1)

1-13: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.kt (1)

1-9: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.kt (1)

1-11: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.kt (1)

1-11: LGTM!

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.kt (1)

7-7: 🗄️ Data Integrity & Integration

문제 없습니다.

AccountResult.toResponse()에서는 userIduserId.toExternalUserId()로 변환해 AccountResponse.userId 규칙에 맞게 전달합니다.

systems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.kt (1)

1-14: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.kt (1)

16-69: 📐 Maintainability & Code Quality

응답 매핑 계약 테스트를 추가하세요.

ResponseMapper는 API 응답의 필드 매핑, userId 변환, nullable timestamp 처리를 담당하지만 대응 테스트가 보이지 않습니다. 각 toResponse() 함수와 submittedAt·announcedAt null 케이스, user_<id> 형식을 검증하는 테스트를 같은 서브시스템에 추가하세요.

As per coding guidelines: Kotlin의 production logic 변경에는 동일 서브시스템의 대응 테스트가 필요합니다.

Source: Coding guidelines

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.kt (1)

1-13: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.kt (1)

1-9: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.kt (1)

1-10: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.kt (1)

1-20: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.kt (1)

1-13: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.kt (1)

1-9: LGTM!

systems/identity/identity-bootstrap/src/main/resources/application-prod.yaml (1)

1-22: LGTM!

systems/identity/identity-bootstrap/src/main/resources/application.yaml (1)

22-25: LGTM!

systems/identity/identity-adapter-in/deps.bzl (1)

4-4: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.kt (1)

1-7: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.kt (1)

1-17: LGTM!

systems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.kt (1)

1-9: LGTM!

systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.kt (1)

1-11: LGTM!

systems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.kt (1)

1-11: LGTM!

Comment thread systems/identity/.env.example Outdated
Comment thread systems/identity/identity-adapter-in/BUILD.bazel Outdated
Comment thread systems/identity/identity-bootstrap/deps.bzl Outdated
@kusuri12-09
kusuri12-09 requested review from tlgms and wlyoon921 July 25, 2026 11:00
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.

Identity API 및 인증 기반 구현

1 participant