Skip to content

test(protocol): lock the SDK contract with protocol and adapter coverage#104

Merged
darwin67 merged 8 commits into
mainfrom
darwin/lock-contract
Apr 30, 2026
Merged

test(protocol): lock the SDK contract with protocol and adapter coverage#104
darwin67 merged 8 commits into
mainfrom
darwin/lock-contract

Conversation

@darwin67

@darwin67 darwin67 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the remaining work in plan 000 to lock the current SDK contract with tests and fixtures before deeper protocol refactors land.

This PR:

  • adds shared protocol fixtures plus focused CommHandler contract tests for call success, retriable/non-retriable errors, required headers, and step payloads
  • adds Ktor and Spring adapter route tests for POST /api/inngest and PUT /api/inngest
  • normalizes sync success/failure handling so both adapters expose the same response shape and expected-server-kind forwarding
  • adds golden JSON fixtures for step payload wire shapes
  • documents intentionally unsupported protocol areas with skipped tests
  • updates docs/plans/000-lock-contract-with-tests.org to Done
  • fixes the current make lint failures in touched Kotlin files

Verification

  • make lint
  • nix develop -c ./gradlew :inngest:test :inngest-spring-boot-adapter:test :inngest-spring-boot-demo:test
  • ./scripts/check-plan-status.sh

Notes

Documented unsupported areas that remain for later plans:

  • in-band sync
  • waitForEvent match convenience API
  • StepPlanned / StepNotFound opcode flow

Related

  • docs/plans/000-lock-contract-with-tests.org

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.
@darwin67 darwin67 changed the title wip test(protocol): lock the SDK contract with protocol and adapter coverage Apr 21, 2026
@github-actions github-actions Bot added the test label Apr 21, 2026
@darwin67 darwin67 marked this pull request as ready for review April 21, 2026 17:54
@darwin67 darwin67 merged commit c1c6e4b into main Apr 30, 2026
10 checks passed
@darwin67 darwin67 deleted the darwin/lock-contract branch April 30, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants