Skip to content

fix(aws): auto-select server size by agent#2676

Merged
louisgv merged 5 commits intoOpenRouterTeam:mainfrom
AhmedTMM:fix/aws-auto-select-bundle
Mar 16, 2026
Merged

fix(aws): auto-select server size by agent#2676
louisgv merged 5 commits intoOpenRouterTeam:mainfrom
AhmedTMM:fix/aws-auto-select-bundle

Conversation

@AhmedTMM
Copy link
Collaborator

Summary

  • Auto-select AWS Lightsail bundle: 4GB (medium_3_0) for OpenClaw, 2GB (small_3_0) for all other agents
  • Users are no longer prompted for instance size by default — matches DO and Hetzner behavior
  • Override with SPAWN_CUSTOM=1 (interactive picker) or LIGHTSAIL_BUNDLE=<id> (explicit)
  • Default bundle changed from nano (512MB/$3.50) to small (2GB/$10) since 512MB is too small for most agents

Test plan

  • spawn openclaw aws → auto-selects medium_3_0 (4GB)
  • spawn claude aws → auto-selects small_3_0 (2GB)
  • spawn claude aws --custom → shows instance size picker
  • LIGHTSAIL_BUNDLE=nano_3_0 spawn claude aws → uses nano override

🤖 Generated with Claude Code

AhmedTMM and others added 3 commits March 15, 2026 21:41
OpenClaw gets 4GB (medium_3_0), all other agents get 2GB (small_3_0).
Users can still override with SPAWN_CUSTOM=1 or LIGHTSAIL_BUNDLE env var.
Matches the auto-select behavior already used by DO and Hetzner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detects win32 platform and prints step-by-step WSL setup instructions
instead of failing with a confusing error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

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

Security Review

Verdict: CHANGES REQUESTED
Commit: 7907c7d

Findings

  • LOW packages/cli/src/aws/aws.ts:699 — New env var gate SPAWN_CUSTOM introduces additional control flow. No injection risk detected, but adds complexity to bundle selection logic.
  • BLOCKER packages/cli/src/tests/aws.test.ts:173 — Test expects DEFAULT_BUNDLE.id to be "nano_3_0" but PR changed it to "small_3_0". Test must be updated to pass.

Tests

  • bash -n: N/A (no .sh files changed)
  • bun test: FAIL (1 test failure in aws.test.ts line 173)
  • curl|bash: N/A
  • macOS compat: N/A

Required Fix

Update the test expectation in packages/cli/src/__tests__/aws.test.ts:173:

it("is small_3_0", () => {
  expect(DEFAULT_BUNDLE.id).toBe("small_3_0");
});

-- security/pr-reviewer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
louisgv
louisgv previously approved these changes Mar 16, 2026
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

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

Security Review

Verdict: APPROVED
Commit: d16d340

Findings

No security issues found. Changes reviewed:

  • DEFAULT_BUNDLE upgraded from nano_3_0 (512 MB) to small_3_0 (2 GB) — reasonable for modern agents
  • Auto-select logic now requires explicit SPAWN_CUSTOM=1 to show interactive bundle picker
  • No injection risks, credential leaks, or unsafe patterns introduced

Tests

  • bash -n: N/A (no .sh files changed)
  • bun test: PASS (1417/1417 tests passing)
  • curl|bash: N/A
  • macOS compat: N/A (TypeScript changes only)

Verdict

Clean security review. All tests pass. Ready to merge.


-- security/pr-reviewer

Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

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

Security Review

Verdict: APPROVED
Commit: 8715a187b5e7a77f5ca9a5b9af7bc2aaf8c9fd68

Findings

No security issues found. Changes reviewed:

  • DEFAULT_BUNDLE upgraded from nano_3_0 (512 MB) to small_3_0 (2 GB) — reasonable for modern agents
  • Auto-select logic now requires explicit SPAWN_CUSTOM=1 to show interactive bundle picker
  • Version conflict with main resolved (bumped to 0.19.7)
  • No injection risks, credential leaks, or unsafe patterns introduced

Tests

  • bash -n: N/A (no .sh files changed)
  • bun test: PASS (1417/1417 tests passing)
  • curl|bash: N/A
  • macOS compat: N/A (TypeScript changes only)

CI Status

All checks passing:

  • ✓ ShellCheck: SUCCESS
  • ✓ Biome Lint: SUCCESS
  • ✓ Unit Tests: SUCCESS
  • ✓ Mock Tests: SUCCESS
  • ✓ macOS Compatibility: SUCCESS

Verdict

Clean security review. All tests and checks pass. Ready to merge.


-- security/pr-reviewer

@louisgv louisgv merged commit 6ef20ed into OpenRouterTeam:main Mar 16, 2026
5 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.

2 participants