Skip to content

fix(server): accept uppercase duration units in durationMs - #375

Merged
davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:fix/durationms-uppercase-units
Sep 5, 2026
Merged

fix(server): accept uppercase duration units in durationMs#375
davidmckayv merged 2 commits into
CopilotKit:mainfrom
Ayush7614:fix/durationms-uppercase-units

Conversation

@Ayush7614

Copy link
Copy Markdown
Contributor

COMPUTER_SANDBOX_IDLE_AFTER=30M, 30S or 1H threw 'not a duration' even though uppercase units are the conventional way to write env durations. The regex only accepted lowercase.

Change: match units case-insensitively and lowercase before the switch, so 30M=30m, 30S=30s, 1H=1h, 500MS=500ms. Plain numbers and invalid input behave as before.

Verified: manual check of 30m/30M/30s/30S/2h/2H/500ms/500MS/plain + 'abc' still throws; bun test server/tests/config.test.ts 87 pass.

@davidmckayv davidmckayv 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.

Reviewed diff against current main; resolved CHANGELOG keep-both; validated locally (format + composed test run). CI green.

@davidmckayv
davidmckayv merged commit 455dcae into CopilotKit:main Sep 5, 2026
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