--- kind: CONCEPT slug: adapter-outbound-persistence-jpa-c31 title: grep refs=0은 finding의 시작점이지 결론이 아니다 topic: delivery-and-settlement-models project: clean-architecture-backend-template status: 게시 전 sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 rootTreeNode: concept:adapter-outbound-persistence-jpa-c31 evidenceCapturedOn: 2026-09-01 assets: - key: adapter-outbound-persistence-jpa-c31 file: ../../../final/evidence/rendered/adapter-outbound-persistence-jpa-c31.svg evidence: - ../../../final/evidence/raw/adapter-outbound-persistence-jpa-c31.txt source: - 원본 분석 절은 analysis/05-adapter-outbound-persistence-jpa.md#L2151 이다. module: adapter-outbound-persistence-jpa --- # grep refs=0은 finding의 시작점이지 결론이 아니다 production consumer가 확인되지 않은 열 개의 optimization helper를 곧바로 dead code로 읽으면 안 되는 이유를, 이 저장소의 기존 기록과 integration test가 갈라 준다. ## 본문 negative-space search에서 다음 implementation roots는 repository production consumer가 확인되지 않았다 — `HibernateJpaBatchExecutor`, `JpaBatchProfileRegistry`, `HibernateBulkDmlExecutor`, `HibernateStatelessSessionRunner`, `FetchPlanApplier`, `JpaKeysetQuerySupport`, `JpaRepositoryFragmentSupport`, `JpaStreamExecutor`, `SpecificationPolicy`, `QuerydslJpaSupport`. ## HibernateJpaBatchExecutor 참조 위치 :::evidence key="adapter-outbound-persistence-jpa-c31" alt="코드베이스에서 HibernateJpaBatchExecutor 를 검색한 출력 11줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="HibernateJpaBatchExecutor 코드베이스 검색 — 11줄 · exit 0" zoom="true" ::: ## "dead code가 대량 존재한다"로 읽으면 안 되는 이유 이 repository의 기존 study/review 문서도 이미 JPA platform helper가 **구현/qualification되어 있지만 sample production path가 대부분 채택하지 않은 상태**라고 기록한다. 또한 batch/bulk/stateless helper는 real PostgreSQL integration tests에서 직접 실행된다. 따라서 현재 판단은 capability별로 나눈다 — 이들은 library capability로 유지할 수 있다. ## 같은 refs=0이라도 성질이 다른 것 `NamedStatementInspector`처럼 global Hibernate hook이 필요한 기능은 "아무 use case가 안 쓴다"와 다르다 — feature를 사용하려면 composition이 먼저 존재해야 한다. transaction scope의 `TransactionProfileRegistry`처럼 history를 통해 실제 residue로 판정해야 하는 것도 있다.