--- kind: CONCEPT slug: domain-core-c03 title: 실패가 런타임이 아니라 빌드에서 발생한다 topic: result-and-failure-algebra project: clean-architecture-backend-template status: 게시 전 sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 rootTreeNode: concept:domain-core-c03 evidenceCapturedOn: 2026-09-01 assets: - key: domain-core-c03 file: ../../../final/evidence/rendered/domain-core-c03.svg evidence: - ../../../final/evidence/raw/domain-core-c03.txt source: - 원본 분석 절은 final/document.md#a01#L158 이다. module: domain-core --- # 실패가 런타임이 아니라 빌드에서 발생한다 이 module의 runtime executable behavior는 매우 작다. annotation 자체에는 success/failure path가 없고 interface도 implementation을 가지지 않으므로, 주요 failure mechanics는 build-time architecture violation이다. ## 본문 이 module의 runtime executable behavior는 매우 작다. annotation 자체에는 success/failure path가 없고, interface도 implementation을 가지지 않는다. 그래서 주요 failure mechanics는 **build-time architecture violation**이다. ## 위반이 걸리는 규칙 이름 | 위반 | 잡는 규칙 | |---|---| | forbidden framework/domain dependency | `DOMAIN_IS_PURE` | | domain logger dependency | `DOMAIN_HAS_NO_LOGGER` | | public no-arg value object | `VALUE_OBJECTS_HAVE_NO_PUBLIC_NO_ARG_CONSTRUCTOR` | | public `set*` aggregate mutator | `AGGREGATE_ROOT_SETTERS_ARE_NOT_PUBLIC` | | non-record domain event | `DOMAIN_EVENTS_ARE_RECORDS` | | enumerated transport dependency | `DOMAIN_EVENTS_ARE_TRANSPORT_FREE` | | `ResourceId`에 할당할 수 없는 `id` field raw type | `NO_LONG_ID_PK` | | registry에 없는 project dependency | `verifyCleanArchitectureDependencies` | | production -> `sample-portfolio` edge | settings registry validation · root dependency verification · cross-module ArchUnit rule | ## 코드베이스의 ResourceId 참조 :::evidence key="domain-core-c03" alt="코드베이스에서 ResourceId 를 검색한 출력 2줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="ResourceId 코드베이스 검색 — 2줄 · exit 0" zoom="true" :::