feat(identity): 공통 Identity API 기반 구성 #48#52
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
🚫 Excluded labels (none allowed) (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
bfe8351 to
5fa6e07
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
kotlin.MODULE.bazelis excluded by none and included by nonerun-service.shis excluded by none and included by none
📒 Files selected for processing (47)
systems/identity/.env.examplesystems/identity/identity-adapter-in/BUILD.bazelsystems/identity/identity-adapter-in/deps.bzlsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.ktsystems/identity/identity-adapter-in/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-application/BUILD.bazelsystems/identity/identity-application/deps.bzlsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.ktsystems/identity/identity-application/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-bootstrap/BUILD.bazelsystems/identity/identity-bootstrap/deps.bzlsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.ktsystems/identity/identity-bootstrap/src/main/resources/application-dev.yamlsystems/identity/identity-bootstrap/src/main/resources/application-prod.yamlsystems/identity/identity-bootstrap/src/main/resources/application.yamlsystems/identity/identity-bootstrap/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-domain/BUILD.bazelsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/Account.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/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.bzlsystems/identity/identity-bootstrap/deps.bzlsystems/identity/identity-adapter-in/deps.bzlsystems/identity/identity-domain/BUILD.bazelsystems/identity/identity-adapter-in/BUILD.bazelsystems/identity/identity-application/BUILD.bazelsystems/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
nameargument 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.bzlsystems/identity/identity-bootstrap/deps.bzlsystems/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.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.ktsystems/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.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.ktsystems/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
#123or a full tracker key like PROJ-123
Files:
systems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/SignupType.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.ktsystems/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.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/AccountStatus.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/PassStatus.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/UserSummaryResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationStatusResponse.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityDomainException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/exception/IdentityException.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ApplicantStatus.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/AccountRepository.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ProfileResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/ApplicationResultResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/BasicInfoResponse.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/identity/config/ClockConfig.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/enum/ErrorCode.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/response/AccountResponse.ktsystems/identity/identity-bootstrap/src/main/kotlin/hs/kr/entrydsm/IdentityBootstrapApplication.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ApiResponse.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ErrorDetail.ktsystems/identity/identity-domain/src/main/kotlin/hs/kr/entrydsm/identity/domain/model/StudentProfile.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/dto/common/ResponseMapper.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/TestMain.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationResultResult.ktsystems/identity/identity-domain/src/test/kotlin/hs/kr/entrydsm/identity/domain/AccountTest.ktsystems/identity/identity-adapter-in/src/main/kotlin/hs/kr/entrydsm/identity/adapterin/web/exception/GlobalExceptionHandler.ktsystems/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.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ProfileResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/ApplicationDataPort.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/UserSummaryResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/AccountResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/ApplicationStatusResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/in/result/BasicInfoResult.ktsystems/identity/identity-application/src/main/kotlin/hs/kr/entrydsm/identity/application/port/out/data/ApplicationSnapshot.ktsystems/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.bazelsystems/identity/identity-adapter-in/BUILD.bazelsystems/identity/identity-application/BUILD.bazelsystems/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()에서는userId를userId.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·announcedAtnull 케이스,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!
Summary
PasswordHasher계약만 제공합니다.Related Issue
Scope
PasswordHashvalue object와PasswordHasherinterfaceImplementation
ApiResponse,ErrorResponse,ErrorDetail,ResponseMapper를 공통 adapter-in 계층에 배치했습니다.Account,StudentProfile,PasswordHash와 관련 enum·예외를 domain 계층에 추가했습니다.AccountRepository,ApplicationDataPort,PasswordHasher등 후속 기능이 사용할 port와 snapshot/result 모델을 정의했습니다.ClockConfig에서Clock.systemUTC()Bean을 제공해 후속 auth 서비스와 JWT filter가 동일한 시간을 주입받도록 했습니다..env.example,run-service.sh, Bazel test target을 정리했습니다.Testing
AccountTestStudentProfileTestApplicationResultTestResponseMapperTestGlobalExceptionHandlerTestIdentityBootstrapConfigurationTestDeployment Notes
ClockBean과PasswordHasher계약은 후속 auth/application 구현에서 주입해 사용해야 합니다.Checklist