--- title: Sample fixture dual-mode build matrix source_type: blog-topic status: raw related_branches: [feature-sample-removal-adoption-contract] related_projects: [ca-tmpl] tags: [blog-topic, ca-tmpl, clean-architecture, gradle, template-repository, testing] created: 2026-06-25 status_label: ready-for-canonical target_audience: backend-engineer inspiration_url: archive_url: --- # Sample fixture dual-mode build matrix ## Parent - [[raw/branch-notes/feature-sample-removal-adoption-contract]] ## Angle 템플릿 저장소에서 예제 도메인을 완전히 삭제하지 않고도, production/core 계약이 예제 코드에 의존하지 않음을 증명하는 방법. ## Outline 1. Sample module을 삭제하지 않는 이유: fixture, reference, contract coverage. 2. Runtime toggle이 부적절했던 이유: production app에는 애초에 sample runtime wiring이 없다. 3. Dual-mode를 build/test matrix로 재정의: sample-on과 sample-off. 4. Gradle 구현: declarable fixture configuration, custom source set, dedicated test task. 5. 테스트 정리: core test의 sample import 제거, sample-owned contract는 sample module로 이동. 6. CI release gate: hosted workflow wiring과 local gate matrix verification. 7. 함정: dependency locks, ArchUnit import option, empty corpus, static-analysis policy. ## Outline seed 1. Sample module을 삭제하지 않는 이유를 fixture, reference, contract coverage 관점으로 설명한다. 2. runtime toggle이 아니라 sample-on/sample-off build matrix가 필요한 이유를 정리한다. 3. Gradle fixture configuration, custom source set, dedicated test task의 역할을 나눈다. 4. CI release gate와 local verification에서 sample-off가 실제로 막아야 하는 실패를 기록한다. ## Evidence to cite later - `src/app-bootstrap/build.gradle` `sampleFixture` / `sampleOffTest`. - `SampleRemovalSmokeContractTest`. - `ProductionClassImportOption`. - `.github/workflows/ci-quality-gates.yml` `sample-off` job. - [[raw/errors/gradle-custom-source-set-isolation-failures-2026-06-25]]. ## 트리거 / Trigger - 트리거 유형: `branch-work` - 트리거 날짜: 2026-06-25 - 트리거 연결 노트: [[raw/branch-notes/feature-sample-removal-adoption-contract]] ## 글감 / Topic seed - 한 문장 요지: sample domain을 runtime toggle이 아니라 sample-on/sample-off build matrix로 격리해 production/core 계약이 sample에 의존하지 않음을 검증한다. - 예상 제목 후보: - Sample-off build matrix로 템플릿 의존성 검증하기 - 예제 도메인을 지우지 않고 production 경계를 증명하기 ## 핵심 주장 후보 / Claim candidates - 사실 후보: - sample fixture source set과 sample-off test task가 sample 의존성 격리를 검증한다. - 의견/해석 후보: - template repository에서 sample은 제거 대상이 아니라 contract fixture일 수 있다. ## Canonical 전환 후보 / Canonical extraction candidates - `wiki/projects/ca-tmpl/sample-fixture-and-adoption.md` 후보: - sample fixture dual-mode build matrix 글감. - 필요한 추가 검증: - 현재 `sampleFixture`, `sampleOffTest`, CI sample-off job 존재 여부. ## Sources / 근거 후보 - [[raw/branch-notes/feature-sample-removal-adoption-contract]] - [[raw/errors/gradle-custom-source-set-isolation-failures-2026-06-25]] ## 미해결 / Unknown - 아직 확인해야 할 사실: hosted CI sample-off job 실제 차단 검증 여부. - 과장하면 안 되는 부분: runtime toggle로 검증한다고 쓰지 않고 build/test matrix로 제한한다. ## Decision / 처리 결정 - 액션: `promote-to-canonical` - 이유: `wiki/projects/ca-tmpl/sample-fixture-and-adoption.md` 에 sample fixture dual-mode build matrix 글감으로 반영한다. - 다음 단계: blogify 전 local vs hosted CI evidence를 분리한다. ## Related / 관련 - 관련 branch: [[raw/branch-notes/feature-sample-removal-adoption-contract]]