Skip to content

ci: add spec-sdk-tests workflow (SDK acceptance testing on PRs) #922

Description

@leggetter

Context

spec-sdk-tests/ is a contract test suite that validates the Outpost API against the generated TypeScript SDK. It exercises CRUD on all destination types, merge-patch semantics, pagination, event delivery flow, and the publish → event → attempt path.

No CI workflow runs it today. Verified across .github/workflows/ and .speakeasy/workflow.yaml. The only signal anyone gets is when a developer manually runs ./spec-sdk-tests/scripts/run-tests.sh against a local or managed Outpost.

This gap let real drift accumulate on main:

  • TS SDK dist/ went stale from Oct 2025 → May 2026 unnoticed
  • A Speakeasy CLI bump (1.741.7 → 1.753.0) silently changed the paginator response shape, breaking test compilation
  • A wire-serialization bug in destination PATCH (#920) was undiagnosed until a manual run

What we want

A workflow that runs spec-sdk-tests against a freshly-started local Outpost, gated on PRs that touch any of:

  • docs/apis/openapi.yaml
  • sdks/outpost-typescript/**
  • spec-sdk-tests/**
  • internal/apirouter/** (handler shape changes)
  • .speakeasy/**

Plus workflow_dispatch for ad-hoc runs and a low-frequency cron as drift-safety net.

Implementation notes

  • Local Outpost, not managed. Tests create and delete real resources; pointing at api.outpost.hookdeck.com would bleed test-tenant state into prod and hit rate limits. docker compose config exists in deployments/; consider a slimmed compose.test.yml.
  • Wait for /healthz before running the suite; tests already support SKIP_HEALTH_CHECK=true for managed (don't use that here).
  • Topics: TEST_TOPICS must include user.created,user.updated,order.created,heartbeat. Configure via env or config file at server startup.
  • API key: shared between server config and spec-sdk-tests/.env.
  • Don't enable Speakeasy's built-in sdk-test.yaml — that's a different system; spec-sdk-tests is the authoritative contract test for this repo.
  • Run time: ~1 minute against managed Outpost; should fit cleanly within a CI job budget once local startup is amortized.

Related

  • #920 — the bug that surfaced this gap
  • Branch feat/spec-sdk-fixes — umbrella for current spec/SDK fixes; this CI workflow lands separately

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions