test(protocol): lock the SDK contract with protocol and adapter coverage#104
Merged
Conversation
Add reusable protocol fixtures and focused CommHandler tests for call\nresponses, required headers, retry behavior, and step payloads.\n\nThis also wires X-Inngest-Req-Version into the shared response/request\nheader set so the protocol tests reflect the intended execution contract\nand future refactors have a concrete baseline to preserve.
Normalize sync handling through CommHandler so both Ktor and Spring return\nthe same success/failure bodies, response headers, and expected-server-kind\nforwarding on PUT /api/inngest.\n\nAdd focused adapter tests for Ktor and Spring POST/PUT behavior using the\nshared protocol fixtures. This also brings Ktor call handling through the\nsame signature validation path as Spring so the adapter surfaces stay aligned.
Add golden JSON fixtures for the step payload contract, document the\ncurrently unsupported protocol areas as skipped tests, and mark plan 000\nas done now that the call/sync/header/adapter coverage is in place.\n\nThis also preserves a clean lint baseline and keeps the plan checklist in\nstep with the code that was actually landed.
KiKoS0
approved these changes
Apr 30, 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.
Summary
Implements the remaining work in plan
000to lock the current SDK contract with tests and fixtures before deeper protocol refactors land.This PR:
CommHandlercontract tests for call success, retriable/non-retriable errors, required headers, and step payloadsPOST /api/inngestandPUT /api/inngestdocs/plans/000-lock-contract-with-tests.orgtoDonemake lintfailures in touched Kotlin filesVerification
make lintnix develop -c ./gradlew :inngest:test :inngest-spring-boot-adapter:test :inngest-spring-boot-demo:test./scripts/check-plan-status.shNotes
Documented unsupported areas that remain for later plans:
waitForEventmatchconvenience APIStepPlanned/StepNotFoundopcode flowRelated
docs/plans/000-lock-contract-with-tests.org