Skip to content

feat(core): add config validation, defaults, and httpConfig extraction#1157

Open
abueide wants to merge 1 commit intotapi/types-and-errorsfrom
tapi/config-and-settings
Open

feat(core): add config validation, defaults, and httpConfig extraction#1157
abueide wants to merge 1 commit intotapi/types-and-errorsfrom
tapi/config-and-settings

Conversation

@abueide
Copy link
Contributor

@abueide abueide commented Mar 10, 2026

Summary

  • Add validateRateLimitConfig() and validateBackoffConfig() utilities that clamp config values to safe ranges with logger warnings
  • Add defaultHttpConfig and new config defaults (retryStrategy, autoFlushOnRetryReady) to constants
  • Add httpConfig field to SegmentClient with getHttpConfig() accessor and CDN extraction/merge logic in fetchSettings()
  • Add test suites for config validation (207 lines) and httpConfig extraction (120 lines)

PR 2 of 5 in the TAPI backoff/retry stack. Depends on #1156.

Test plan

  • npx jest --testPathPattern="config-validation|fetchSettings" — 52 tests pass
  • npx tsc --noEmit — no type errors
  • npx eslint — 0 errors

🤖 Generated with Claude Code

Add config validation utilities (validateRateLimitConfig,
validateBackoffConfig), default HTTP config constants, and httpConfig
extraction/merging logic in SegmentClient.fetchSettings().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant