Skip to content

Refuse a bad COMPUTER_MEMORY_BYTES instead of capping a computer at 512 bytes - #374

Open
Bartok9 wants to merge 1 commit into
CopilotKit:mainfrom
Bartok9:bartok/computer-memory-bytes-parse
Open

Refuse a bad COMPUTER_MEMORY_BYTES instead of capping a computer at 512 bytes#374
Bartok9 wants to merge 1 commit into
CopilotKit:mainfrom
Bartok9:bartok/computer-memory-bytes-parse

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What this changes

COMPUTER_MEMORY_BYTES=512m used to become 512 via parseInt, which Docker accepts as a memory cap Chromium cannot live in. Empty COMPUTER_MEMORY_BYTES= is still unset (no cap). Anything that is not a whole number of bytes now exits the supervisor before a computer is created — same empty-string / prefix trap as PORT (#343).

Where it runs

  • New state that outlives a request? None. Process env at supervisor start.
  • What happens on the second replica? Each supervisor process parses its own env the same way. No shared state.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • Gateway path unchanged (supervisor boot only).
  • No new refusals on acting calls.
  • Nothing new from the client.

Changelog

  • Unreleased line: a bad COMPUTER_MEMORY_BYTES refuses to start.

Proof

bun is not on this machine. Tests added in supervisor/tests/computer-memory-bytes.test.ts matching listen-port.test.ts.

Empty COMPUTER_MEMORY_BYTES= is still unset (no cap). Suffix units such as
512m used to become 512 bytes via parseInt, which Docker accepts and Chromium
cannot live in.
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.

1 participant