Skip to content

fix(cloud-exe-dev): reject non-decimal numeric options#808

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/exe-dev-decimal-options
Jul 22, 2026
Merged

fix(cloud-exe-dev): reject non-decimal numeric options#808
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/exe-dev-decimal-options

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • reject non-decimal exe.dev CPU, memory, and disk option strings instead of silently falling back
  • keep positive decimal numeric strings accepted for quote/provision sizing
  • add focused exe.dev adapter tests for accepted and rejected numeric inputs

Verification

  • vitest run packages/cloud/exe-dev/src/index.test.ts (7 passed)
  • tsc -p packages/cloud/exe-dev/tsconfig.json --noEmit
  • git diff --check

Note: running through pnpm in this workspace currently triggers an unrelated lockfile policy failure for @profullstack/autoblog@0.4.0 missing tarball integrity, so I ran the local Vitest and TypeScript binaries directly.

Copilot AI review requested due to automatic review settings July 21, 2026 21:55

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.

Pull request overview

This PR tightens the exe.dev cloud adapter’s handling of CPU/memory/disk sizing inputs by rejecting non-decimal numeric option strings (instead of silently falling back), and adds adapter-level tests to lock in the intended behavior.

Changes:

  • Update exe.dev sizing parsing to validate numeric inputs and surface explicit errors for invalid formats.
  • Plumb clearer error labels (cpu, memory, disk) into validation to improve diagnostics.
  • Add Vitest coverage for accepted decimal strings and rejected non-decimal strings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/cloud/exe-dev/src/index.ts Adds labeled numeric validation to reject non-decimal strings and avoid silent fallback.
packages/cloud/exe-dev/src/index.test.ts Adds focused tests for accepted/rejected numeric option inputs and dry-run provisioning behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +243 to +246
const text = value.trim();
if (!/^(?:[1-9]\d*|0?\.\d+|[1-9]\d*\.\d+)$/.test(text)) {
throw new Error(`exe.dev ${label} must be a positive decimal number`);
}
Comment on lines +76 to +78
const cpu = positiveNumber(spec.cpu ?? config.defaultCpu, 2, 'cpu');
const memory = positiveNumber(spec.memory ?? config.defaultMemoryGb, 4, 'memory');
const disk = positiveNumber(spec.storage ?? config.defaultDiskGb, 20, 'disk');
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

3 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio
ralyodio merged commit 378021e into profullstack:master Jul 22, 2026
4 checks passed
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.

3 participants