chore: Port ContractTestService from Kitura to Hummingbird#110
Merged
Conversation
79ca9d3 to
6734207
Compare
Kitura is archived and its transitive BlueSSLService uses the OpenSSL 1.1 `SSL_get_peer_certificate` API removed in OpenSSL 3, so the contract-test service could not build on a modern Linux (Ubuntu 24.04 / OpenSSL 3) swift container. Replace it with Hummingbird (swift-nio based, vendored BoringSSL). The SDK-facing logic (CreateStreamReq, CallbackForwarder, EventSource usage) is unchanged; only the HTTP server layer moves: - The 4 routes port to Hummingbird's async router. - Stream state moves to an actor (EventSource is Sendable). - DELETE / stops the service via graceful ServiceGroup shutdown. - URLSession/URLRequest are gated behind FoundationNetworking for Linux. Verified: builds in the swift:6.1 Linux container (which Kitura could not) and smoke-tested (GET / capabilities, 404/400 paths, graceful shutdown via DELETE /). CI is unchanged: contract-tests still runs on macOS and validates the full protocol against this service.
6734207 to
9e9fbe3
Compare
tanderson-ld
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kitura is archived and its transitive BlueSSLService uses the OpenSSL 1.1
SSL_get_peer_certificateAPI removed in OpenSSL 3, so the contract-testservice could not build on a modern Linux (Ubuntu 24.04 / OpenSSL 3) swift
container. Replace it with Hummingbird (swift-nio based, vendored BoringSSL).
The SDK-facing logic (CreateStreamReq, CallbackForwarder, EventSource usage) is
unchanged; only the HTTP server layer moves:
Verified: builds in the swift:6.1 Linux container (which Kitura could not) and
smoke-tested (GET / capabilities, 404/400 paths, graceful shutdown via DELETE /).
CI is unchanged: contract-tests still runs on macOS and validates the full
protocol against this service.
Note
Medium Risk
Full HTTP server swap for the contract harness; protocol-facing routes must stay compatible with existing macOS contract-tests despite async/concurrency changes.
Overview
Replaces the archived Kitura stack in
ContractTestServicewith Hummingbird and the swift-server ecosystem so the contract-test binary builds on modern Linux (OpenSSL 3) while keeping the same SSE harness behavior.Package.swiftbumps to Swift 6.0, raises minimum OS versions for Hummingbird, swaps dependencies (Hummingbird, ServiceLifecycle, Logging, HTTPTypes), and pins a newPackage.resolvedgraph (NIO/async-http-client instead of Kitura/OpenSSL 1.1).main.swiftreimplements the four control routes on Hummingbird’s asyncRouter(ResponseEncodable,request.decode,HTTPErrorfor 404). Active streams move from aDispatchQueue-guarded dictionary to aStreamStoreactor;DELETE /triggersServiceGroupgraceful shutdown via aShutdownHandleinstead ofKitura.stop().FoundationNetworkingis imported on Linux forURLSession.CreateStreamReq,CallbackForwarder, andEventSourceusage are intentionally unchanged.Reviewed by Cursor Bugbot for commit 9e9fbe3. Bugbot is set up for automated code reviews on this repo. Configure here.