feat: autoscale Sprite memory via Resources Policy

Sprites have no size presets and CPU/storage are fixed (8 vCPU / 100 GB),
so memory policy (limit + autoscale) is the sizing lever for bursty
unknown workloads. ensureSprite now applies idempotently, non-failing:

- memoryAutoscale (default true) lets the platform grow memory under
  pressure instead of thrashing at a fixed cap
- memoryLimitMB (0 = Fly default ceiling 8192) is the peak ceiling
- Settings UI exposes both controls
This commit is contained in:
nandi committed 2026-11-20 13:41:25 -08:00
1 parent b2c8f4492d
commit 4ae69f54ce
3 files changed
+78

No files matched your search

+4
View File
@@ -19,6 +19,8 @@ export const flySpritesSettingsSchema = z.object({
defaultRegion: z.string().default(""),
defaultRamMB: z.number().int().nonnegative().default(0),
defaultCpus: z.number().int().nonnegative().default(0),
memoryLimitMB: z.number().int().nonnegative().default(0),
memoryAutoscale: z.boolean().default(true),
defaultRemoteCwd: z.string().default("/workspace"),
defaultProviderMode: z.enum(["shell", "acp"]).default("acp"),
acpCommand: z.string().default("claude-code-acp"),
@@ -56,6 +58,8 @@ export const defaultFlySpritesSettings: FlySpritesSettings = {
defaultRegion: "",
defaultRamMB: 0,
defaultCpus: 0,
memoryLimitMB: 0,
memoryAutoscale: true,
defaultRemoteCwd: "/workspace",
defaultProviderMode: "acp",
acpCommand: "claude-code-acp",