--- kind: CONCEPT slug: messaging-cloudevents-c08 title: public 시그니처에 나오는 타입은 api로 선언한다 topic: result-and-failure-algebra project: clean-architecture-backend-template status: 게시 전 sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 rootTreeNode: concept:messaging-cloudevents-c08 evidenceCapturedOn: 2026-09-01 assets: - key: messaging-cloudevents-c08 file: ../../../final/evidence/rendered/messaging-cloudevents-c08.svg evidence: - ../../../final/evidence/raw/messaging-cloudevents-c08.txt source: - 원본 분석 절은 final/document.md#a19-messaging-cloudevents#L451 이다. module: messaging-cloudevents --- # public 시그니처에 나오는 타입은 api로 선언한다 build.gradle 주석이 이전 결함 하나를 보존한다. `implementation`으로 선언한 탓에 이 module의 public API에 등장하는 타입이 소비자에게는 숨겨졌던 사례이고, 그것이 `src/messaging/CLAUDE.md:40-43`의 게이트를 만든 사례군이다. ## 관계 - **왕복이라 부르는 테스트는 무엇을 보존하지 않는지도 적는다** 같은 분석 리프에서 끌어낸 규칙이다. - **문서가 범위를 제한하면 그 제한을 누가 강제하는지 같이 적는다** 같은 분석 리프에서 끌어낸 규칙이다. ## 본문 build.gradle 주석이 이전 결함 하나를 보존한다. 의존성을 `implementation`으로 선언했는데 그 타입이 이 module의 public API에 등장하고 있었다. > "Declared `implementation`, the type appeared in this module's public API while the dependency was hidden from consumers: an adopter calling the documented method could not name its return type without adding CloudEvents to their own build, and Gradle gave them no hint why. A type in a public signature is part of the artifact's contract." 이것이 `src/messaging/CLAUDE.md:40-43`의 게이트를 만든 사례군에 속한다 — "source에서 public/protected 시그니처에 등장하는 vendor 라이브러리를 뽑아 그 leaf의 `build.gradle`이 `api`로 선언했는지 대조". 이 leaf는 그 게이트를 두 좌표로 나눠 통과한 모범 사례다. ## 하지 않기로 기록된 두 매핑 코드 주석이 남긴 두 매핑 결정(§4.2)도 실패 이력의 성격을 갖는다 — "defaulted to the production instant"와 "inventing a tombstone"은 하지 않기로 한 것들이다. ## 이 기록이 다루는 파일 범위 :::evidence key="messaging-cloudevents-c08" alt="코드베이스에서 파일 목록을 만든 출력 3줄. 이 기록이 다루는 범위가 그 목록이다." caption="코드베이스 파일 목록 — 3줄 · exit 0" zoom="true" :::