Skip to content

fix(telnyx): guard voice timeout env values - #871

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/telnyx-voice-timeout-guard
Open

fix(telnyx): guard voice timeout env values#871
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/telnyx-voice-timeout-guard

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • Guard Telnyx voice gather timeout env parsing against malformed, infinite, zero, and negative values
  • Fall back to known-good timeout defaults instead of sending NaN/invalid values to Telnyx
  • Include sh1pt site lib tests in Vitest so this regression runs in CI

Why

The Telnyx voice gather payloads used Number(process.env...) directly. If an env value is mistyped, JavaScript can produce NaN, Infinity, or non-positive timeout values that get serialized into the Telnyx request payload instead of falling back to safe defaults.

Tests

  • node .\\node_modules\\.pnpm\\vitest@2.1.9_@types+node@22.19.17\\node_modules\\vitest\\vitest.mjs run sites/sh1pt.com/lib/telnyx-voice.test.ts (2 tests passed)
  • git diff --check

Note: pnpm exec vitest ... attempted a dependency install first and was blocked by the repo lockfile policy because @profullstack/autoblog@0.4.0 has no tarball integrity field. The direct local Vitest invocation above ran the regression without changing versioned files.

Copilot AI review requested due to automatic review settings July 28, 2026 19:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants