Repository navigation
Releases
v0.2.1
Spine Echo Platform v0.2.1
Echo v0.2.1은 HTTP 본문, 쿼리와 헤더를 input.Body[T], input.Query[T], input.Header[T]로 선언하는 통합 테스트를 포함합니다.
호환성과 업그레이드
플랫폼의 go.mod는 Spine v0.7.2-preview.2와 Echo v5.4.4를 요구합니다. 최소 Go 버전은 1.25.5입니다. Echo RC 공개 검증
macOS에서 공개 Echo RC와 Spine 정식 v0.7.5를 함께 설치해 소비자 빌드를 확인했습니다. 같은 조합에서 race 검사를 적용한 Echo 테스트를 통과했습니다.
HTTP 핸들러가 DTO 포인터를 직접 받는다면 입력 출처에 맞는 input 래퍼를 사용하세요. Spine v0.7.5로 함께 갱신할 때는 인터셉터와 컨텍스트 변경도 확인하세요. Echo 전환 안내, 코어 v0.7.5 전환 안내
설치
Spine 정식 v0.7.5와 Echo 정식 v0.2.1을 함께 선택하려면 두 버전을 지정하세요.
go get github.com/NARUBROWN/spine@v0.7.5 github.com/NARUBROWN/spine-echo-platform@v0.2.1
go mod tidySpine Echo Platform v0.2.1
Echo v0.2.1 includes integration tests that declare HTTP body, query, and header input with input.Body[T], input.Query[T], and input.Header[T].
Compatibility and Upgrading
The platform's go.mod requires Spine v0.7.2-preview.2 and Echo v5.4.4. The minimum Go version is 1.25.5. Echo RC public verification
On macOS, the public Echo release candidate built in a consumer module with Spine v0.7.5. The Echo tests also passed with the race detector on that combination.
Wrap DTO pointers accepted by HTTP handlers in the input type for the relevant input source. If you upgrade to Spine v0.7.5 at the same time, review the interceptor and context changes. Echo migration guide, Core v0.7.5 migration guide
Installation
Specify both versions to use Spine v0.7.5 with Echo v0.2.1.
go get github.com/NARUBROWN/spine@v0.7.5 github.com/NARUBROWN/spine-echo-platform@v0.2.1
go mod tidyv0.2.0
커밋: 66ef631814f8088c8e0e3227c4429c02ce3e8c21
채널 브랜치: main
이전 단계: v0.2.0-rc.1
관찰 기간 단축 사유: 긴급 배포 요청에 따라 RC 관찰 기간을 단축하고 공개 설치 검증과 정식 승인을 유지합니다.
검증한 코어와 플랫폼 버전, 실행 증거는 첨부 manifest를 확인하세요. 예제는 정식 발행 후 갱신합니다.
v0.1.0-alpha - Echo Platform, Explicit HTTP Contracts, Application Hosting | Echo 플랫폼, 명시적 HTTP 계약, 앱 호스팅
🦴 Spine Echo Platform v0.1.0
Echo Platform, Explicit HTTP Contracts, Application Hosting | Echo 플랫폼, 명시적 HTTP 계약, 앱 호스팅
spine-echo-platform v0.1.0은 Spine v0.6.0의 공개 HTTP v2 계약을 구현하는 Echo 플랫폼의 첫 릴리즈입니다. 사용자는 플랫폼 모듈을 설치하고 platform.New()로 기존 Spine App을 생성합니다. 실행은 같은 App의 Run 또는 RunContext가 담당합니다.
Go 패키지 이름은 platform이며 Echo v5.4.4와 Spine v0.6.0을 의존성으로 사용합니다. 별도의 계약 모듈이나 로컬 replace는 필요하지 않습니다.
spine-echo-platform v0.1.0 is the first release of the Echo platform implementing the public HTTP v2 contract in Spine v0.6.0. Install the platform module and create the existing Spine App through platform.New(). The same App owns execution through Run or RunContext.
The Go package is named platform and depends on Echo v5.4.4 and Spine v0.6.0. No separate contract module or local replacement is required.
✨ 주요 변경 사항 | Highlights
- Spine과 Echo를 함께 구성하는
platform.New(options...) - 표준 라이브러리 기반 공개
spine.http-adapter/v2계약 구현 - native Echo 설정을 위한 typed
WithEcho(func(*echo.Echo))옵션 - DTO·multipart 바인딩과 HTTP 오류 상태·원인 보존
json.RawMessage출력과 Echo의 개행·pretty·사용자 serializer 경로 유지- 리스너 없는 Handler 제공과 관리 서버의 Serve·Shutdown 분리
- 기존 Spine의 응답 staging과 WS 메시지·종료 책임 유지
- Added
platform.New(options...)to configure Spine and Echo together - Implemented the standard-library-based public
spine.http-adapter/v2contract - Added typed native configuration through
WithEcho(func(*echo.Echo)) - Preserved DTO and multipart binding, HTTP error status, and error causes
- Added
json.RawMessageoutput while retaining Echo newline, pretty-printing, and custom serializer behavior - Separated a listener-free Handler from managed Serve and Shutdown
- Kept response staging and WebSocket message/shutdown ownership in Spine
🚀 주요 변경 사항 상세 | Detailed Changes
플랫폼 선택과 동일한 Spine App | Platform Selection and the Same Spine App
platform.New(options...)는spine.New(platform.Option(options...))와 같은 구성을 제공합니다.- Option은
NewFactory(options...)를spine.WithHTTPAdapter로 주입합니다. 플랫폼 전용 App이나 별도 Run 구현은 만들지 않습니다. - 생성자와 기능 조회는 포트를 열거나 native 설정 함수를 실행하지 않습니다.
platform.New(options...)provides the same configuration asspine.New(platform.Option(options...)).- Option injects
NewFactory(options...)throughspine.WithHTTPAdapter. The platform does not introduce a separate App or Run implementation. - Constructors and capability queries neither open ports nor execute native configuration callbacks.
Echo 구성과 요청 처리 | Echo Configuration and Request Handling
- 각 준비 과정에서 fallback, WS GET 경로, native 설정 순서로 등록합니다. WithEcho 함수는 준비마다 한 번 실행합니다.
- DTO와 multipart 입력을 기존 Echo API로 바인딩하고, 입력 오류를 공개 계약으로 전달하면서 상태와 원인을 보존합니다.
- native Echo store와 Spine의 요청 store는 별개입니다. 공유 요청 값에는 표준 request context를 사용합니다.
- Each preparation registers the fallback, WebSocket GET routes, and native configuration in that order. Each WithEcho callback runs once per preparation.
- DTO and multipart input use Echo's binding APIs. Input errors retain their status and cause across the public contract.
- Native Echo storage remains separate from Spine request storage. Use the standard request context for shared request values.
HTTP 출력과 서버 수명 | HTTP Output and Server Lifecycle
- JSON writer는 커널이 직렬화한
json.RawMessage를 받습니다. Echo의 JSON 출력 경로를 사용해 개행·pretty 출력과 사용자 JSONSerializer를 유지합니다. Handler()는 준비된 동일 Echo 진입점을 반환합니다.Serve(listener)는 인스턴스당 한 번 실행하고 전달받은 listener를 모든 반환 경로에서 닫습니다.Shutdown(ctx)는 새 요청 수용을 중단하고 활성 HTTP 요청을 기다립니다. 시간 초과 뒤에는 새 context로 다시 기다릴 수 있습니다.- The JSON writer receives
json.RawMessageserialized by the kernel. Echo's JSON output path retains newline, pretty-printing, and custom JSONSerializer behavior. Handler()returns the same prepared Echo entry point.Serve(listener)runs once per instance and closes the supplied listener on every return path.Shutdown(ctx)stops accepting requests and waits for active HTTP requests. Waiting can be retried with a new context after a timeout.
외부 서버와 WebSocket 연결 | External Hosting and WebSocket Integration
app.Prepare(ctx, options)가 제공하는 Handler는 외부 HTTP 서버나 httptest에 연결할 수 있습니다. 준비 결과는 호출자가Close(ctx)로 정리합니다.- 외부 서버의 listener·TLS·timeout은 호출자가 관리합니다. 준비 결과는 Close 시작 뒤 새 요청을 거부하고 진행 요청과 앱 자원을 정리합니다.
- WS 업그레이드는 raw HTTP 입출력을 기존 Spine 런타임에 전달합니다. WS 메시지 실행과 연결 종료는 커널이 관리합니다.
- The Handler returned through
app.Prepare(ctx, options)can be attached to an external HTTP server or httptest. The caller closes the preparation result throughClose(ctx). - The caller owns the external listener, TLS, and timeouts. The preparation result rejects new requests after Close starts and cleans up active requests and application resources.
- WebSocket upgrades forward raw HTTP input/output to the existing Spine runtime. Message execution and connection shutdown remain in the kernel.
🆕 새 설정과 API | New Configuration and APIs
platform.New(options ...EchoOption) spine.Appplatform.Option(options ...EchoOption) spine.Optionplatform.NewFactory(options ...EchoOption) adapter.Factoryplatform.WithEcho(configure func(*echo.Echo)) EchoOption- 공개 HTTP v2 계약을 구현하는
EchoAdapter EchoAdapterimplementing the public HTTP v2 contract
package main
import (
"log"
platform "github.com/NARUBROWN/spine-echo-platform"
"github.com/NARUBROWN/spine/pkg/boot"
)
func main() {
app := platform.New()
if err := app.Run(boot.Options{Address: ":8080", HTTP: &boot.HTTPOptions{}}); err != nil {
log.Fatal(err)
}
}native 설정은 platform.New(platform.WithEcho(func(e *echo.Echo) { ... }))로 전달합니다. 외부 서버에 연결할 때는 Run 대신 app.Prepare(ctx, options)의 Handler와 Close를 사용합니다.
Pass native configuration through platform.New(platform.WithEcho(func(e *echo.Echo) { ... })). For external hosting, use the Handler and Close from app.Prepare(ctx, options) instead of Run.
🧩 호환성/마이그레이션 메모 | Compatibility Notes
지원 버전과 API | Supported Versions and APIs
- Spine
v0.6.0, HTTP 계약spine.http-adapter/v2, Echov5.4.4를 사용합니다. - native handler와 middleware는
*echo.Context를 받습니다. 오류 처리기는(ctx *echo.Context, err error)순서이며 logger는log/slog입니다. - 사용자 JSONSerializer는 원래 DTO 대신
json.RawMessage입력을 처리해야 합니다. - Supports Spine
v0.6.0, HTTP contractspine.http-adapter/v2, and Echov5.4.4. - Native handlers and middleware take
*echo.Context. Error handlers use(ctx *echo.Context, err error), and logging useslog/slog. - Custom JSONSerializer implementations must handle
json.RawMessagerather than the original DTO.
개발 스냅샷에서 전환 | Migrating from Development Snapshots
app.Transport(func(any))와 공통 native-hook 설정 대신WithEcho옵션을 사용합니다.- 준비는 별도
spine.Prepare함수가 아니라app.Prepare(ctx, options)로 호출합니다. - CLI
v0.4.0의new는 Spinev0.6.0, Echo 플랫폼v0.1.0과 Echov5.4.4를 구성하고 HTTP 어댑터 v2 계약을 검사합니다. - 이번 구현은 ASGI의 앱·서버 경계를 참고하지만 Python ASGI와의 호환을 의미하지 않습니다.
- Use
WithEchoinstead ofapp.Transport(func(any))and shared native-hook configuration. - Call
app.Prepare(ctx, options)instead of a separate package-levelspine.Preparefunction. - CLI
v0.4.0configures Spinev0.6.0, Echo platformv0.1.0, and Echov5.4.4throughnew, and checks the HTTP adapter v2 contract. - The design draws on ASGI application/server boundaries but does not provide Python ASGI compatibility.
상세 안내: 플랫폼 README, Spine 전환 안내.
Details: Platform README, Spine migration guide.
📬 전달 의미와 트랜잭션 경계 | Delivery Semantics and Transaction Boundaries
- 요청 store, EventBus, 라우팅과 응답 staging은 Spine 커널이 소유합니다. 플랫폼은 실제 HTTP 출력과 서버 수명을 맡습니다.
- 응답 staging은 데이터베이스 commit과 socket write 또는 broker publish를 원자적으로 묶지 않습니다.
- 사용자 Echo serializer와 실제 writer의 오류는 최종 출력 단계에서도 발생할 수 있습니다.
- Spine owns request storage, EventBus, routing, and response staging. The platform owns physical HTTP output and server lifecycle.
- Response staging does not make database commits atomic with socket writes or broker publication.
- Custom Echo serializer and transport writer errors can still occur during final output.
🧪 테스트 범위 | Test Coverage Boundary
- 공개 Spine
v0.6.0기준 플랫폼 race: 최상위 24개와 하위 사례 9개 통과 GOWORK=off의 module tidy/verify, vet, U1000 검사 통과- 준비 커밋
6b2e898의 원격 CI 성공 - Platform race tests against public Spine
v0.6.0: 24 top-level tests and 9 subtests passed - Passed module tidy/verify, vet, and U1000 with
GOWORK=off - Successful remote CI for preparation commit
6b2e898
GitHub의 v0.1.0 태그는 준비 커밋 6b2e898을 가리킵니다. 태그 자체는 빈 모듈 캐시에서 공개 Go 프록시 다운로드와 체크섬 검증을 통과했습니다. 정식 태그를 사용하는 실제 demo 소비자도 빈 모듈 캐시와 로컬 replace 없는 환경에서 vet/race, HTTP/WS, SIGINT와 Prepare E2E를 통과했습니다.
The GitHub v0.1.0 tag points to preparation commit 6b2e898. The tag itself passed public Go proxy download and checksum verification with an empty module cache. The actual demo consumer also passed vet/race, HTTP/WS, SIGINT, and Prepare E2E using the release tags, an empty module cache, and no local replacements.
위 소스 테스트와 별도로 CLI v0.4.0 설치, 기본 new의 공개 의존성 선택과 빌드, 계약 검사와 verify, spine dev의 /health 응답(200 OK)과 SIGINT 정상 종료를 확인했습니다. 실제 운영 인프라 전체를 검증한 결과는 아닙니다.
Separately from the source tests above, validation covered CLI v0.4.0 installation, default new dependency selection and build, contract checks and verify, a 200 OK response from /health through spine dev, and clean SIGINT shutdown. This does n...