Skip to content

Typo: minimumSockTimeMinutes should be minimumSoakTimeMinutes in API contract #888

@zacharyblasczyk

Description

@zacharyblasczyk

Summary

The public API field minimumSockTimeMinutes is a typo — it should be minimumSoakTimeMinutes (missing the "a" in "Soak"). The database column is correctly named minimumSoakTimeMinutes, and explicit mapping code translates between the two names at the API boundary. This typo is baked into the OpenAPI spec, generated types, Go SDK, and documentation.

Why this matters

  • Confusing API surface — "sock time" is not a meaningful concept. Integrators have to guess or look at docs to realize this means "soak time" (the practice of letting a release sit in an environment before progressing).
  • Unnecessary translation layer — The API routes contain explicit mapping code that exists solely to bridge the typo in the public contract with the correct name in the database. This is dead weight that makes the code harder to follow.
  • SDK propagation — Generated SDKs (Go, TypeScript) carry the typo into downstream consumers, compounding the confusion.
  • Documentation inconsistency — Some docs reference the typo (minimumSockTimeMinutes) and others the correct name (minimumSoakTimeMinutes), making it unclear which is canonical.

Where it happens

The typo originates in the jsonnet schema definitions for the API and workspace engine OpenAPI specs. From there it propagates to:

  • Generated OpenAPI JSON specs
  • Generated TypeScript types (API app, web app, workspace-engine-sdk)
  • Generated Go types (workspace-engine)
  • tRPC and REST API route code (which maps between the typo and the correct DB column name)
  • Policy documentation (overview and environment-progression pages)

The database schema and internal services all use the correct spelling minimumSoakTimeMinutes.

Suggested fix

This is a breaking change to the public API contract, so it should be handled carefully:

  1. Rename minimumSockTimeMinutesminimumSoakTimeMinutes in the jsonnet schema definitions.
  2. Regenerate OpenAPI specs and all generated types.
  3. Remove the mapping layer in the tRPC and REST API routes — the field name will match the DB column directly.
  4. Update documentation references.
  5. Consider accepting both field names temporarily for backward compatibility, or bundle this into a versioned API release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions