fix: workspace upgrade scaling - merge config and fix tier thresholds

Merged
KH
1y ago
+182-19

Two bugs fixed:

  1. resize() was sending a partial config that replaced the entire Fly.io
    machine config, wiping out the image, services, auto_stop settings,
    and other env vars. Now it fetches the current config first and merges
    the new guest specs into it, preserving all existing settings.

  2. getCurrentTier() had wrong memory thresholds that incorrectly mapped
    actual machine memory to tier names (e.g., 2048MB was returning 'large'
    instead of 'small'). This broke auto-scaling by making the system think
    workspaces were already at higher tiers than they actually were.

Also fixed: skip_launch is now passed as a query parameter (matching
updateMachineImage behavior) and response errors are properly checked.