Skip to content

[Test] Core와 token-pilot-starter 외부 consumer 검증 #42

Description

@HuitaePark

목적

멀티모듈 저장소 내부의 project(...) 의존성으로만 성공하는 착시를 제거한다. CI가 만든 격리된 임시 consumer가 실제 Maven artifact와 generated POM만 사용해 Core 경로와 Starter 경로를 각각 빌드하고 실행하도록 한다.

#35와의 차이

같은 테스트를 중복하는 것이 아니라 API 계약과 packaging 계약을 서로 다른 경계에서 확인한다.

준비 조건

  • #41이 staging Maven repository에 0.1.0 artifact를 생성한다.
  • consumer는 repository checkout 외부의 임시 디렉터리에 CI가 생성한다.
  • 기존 ~/.m2, Gradle cache나 repository source classpath가 성공 원인을 가리지 않도록 격리한다.

Consumer A — Core only

최소 Java 프로젝트에서 다음을 검증한다.

Consumer B — Starter

최소 Spring Boot 프로젝트에서 다음을 검증한다.

  • token-pilot-starter:0.1.0만 TokenPilot 진입점으로 선언
  • auto-configuration context 기동
  • fake provider 또는 test bean으로 API key 없이 정상 경로 실행
  • 필요한 TokenPilot module과 Spring 연동 의존성이 generated POM을 통해 해석됨
  • 특정 LLM provider 구현이 자동으로 강제되지 않음

격리 규칙

consumer build에는 다음을 금지한다.

  • project(...) dependency
  • includeBuild composite build
  • repository source directory를 classpath에 직접 추가
  • 현재 checkout의 build output 직접 참조
  • 오염된 로컬 Maven/Gradle cache에만 존재하는 artifact 사용

Gradle 또는 Maven 중 하나로 consumer를 구성할 수 있지만, 입력은 반드시 #41이 만든 Maven-compatible repository와 POM이어야 한다.

검증 시나리오

  • 빈 임시 artifact/cache 디렉터리에 [Distribution] Core와 token-pilot-starter 0.1.0 동일 버전 배포 구성 #41 결과만 넣고 두 consumer가 성공한다.
  • Core consumer dependency report가 framework 비의존성을 증명한다.
  • Starter consumer가 API key와 실제 network call 없이 기동·테스트된다.
  • artifact 하나를 의도적으로 제거하면 consumer가 명확히 실패해 테스트의 유효성을 증명한다.
  • snapshot이나 이전 버전이 섞이면 실패한다.
  • CI가 매 실행 후 임시 consumer와 repository를 정리한다.

Acceptance criteria

  • 외부 Core consumer의 compile/test/run이 성공한다.
  • 외부 Starter consumer의 context/test가 성공한다.
  • 두 consumer 모두 정확히 같은 0.1.0 release candidate를 사용한다.
  • source/module dependency 없이 generated artifact만 소비한다.
  • dependency graph 결과가 CI artifact 또는 로그로 남는다.
  • release workflow의 필수 gate로 실행된다.

제외 범위

의존관계와 순서

#41 완료 후 진행한다. 성공한 consumer 코드는 #43 quickstart 예제의 검증 근거로 재사용한다.

Source

P0 compatibility consumer matrix — #47

외부 consumer는 #47에서 확정한 matrix를 실제 generated artifact로 검증한다.

  • Core-only consumer: 최소 지원 JDK에서 compile, class load와 최소 실행을 검증한다.
  • Starter consumer: 선택한 Spring Boot/Spring AI/JDK 조합 하나에서 fake-provider E2E를 검증한다.
  • consumer는 project dependency, includeBuild 또는 source classpath를 사용하지 않는다.
  • Core dependency tree뿐 아니라 generated POM의 dependencyManagement에도 Spring/Boot/Spring AI BOM이 없는지 검사한다.
  • 잘못된 Boot/AI 조합을 우연히 classpath에 올려 테스트가 통과하는 것을 방지하도록 dependency convergence를 검증한다.

추가 완료 조건:

Metadata

Metadata

Assignees

No one assigned

    Labels

    mvpTokenPilot 0.1.0 MVP scope

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions