Open
Conversation
## 问题
- `spawn.ts` 中硬编码 `memoryMb: 512`,无法创建更大内存的子沙盒
- 尝试创建非 512MB 沙盒时会失败,但可能已扣费
- 512MB 内存不足以运行编译等任务,导致子代理 OOM
## 解决方案
1. 添加 `childSandboxMemoryMb` 配置项到 `AutomatonConfig`
2. 默认值从 512MB 提升到 1024MB
3. `spawn.ts` 中两处硬编码改为从配置读取
## 修改文件
- `src/types.ts`: 添加 `childSandboxMemoryMb?: number` 配置项
- `src/replication/spawn.ts`: 使用配置值替代硬编码 512
## 使用方法
在 `automaton.json` 中配置:
```json
{
"childSandboxMemoryMb": 1024
}
```
## 测试
- ✅ 本地构建通过
- ✅ 沙盒部署验证(1GB 内存)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
Bug 描述
src/replication/spawn.ts中硬编码了memoryMb: 512,导致以下问题:复现步骤
automaton.json中的inferenceModel: "glm-5"解决方案
修改内容
childSandboxMemoryMb配置项到AutomatonConfigspawn.ts中两处硬编码改为从配置读取修改文件
src/types.ts: 添加childSandboxMemoryMb?: number配置项src/replication/spawn.ts: 使用配置值替代硬编码 512使用方法
在
automaton.json中配置:{ "childSandboxMemoryMb": 1024 }测试
影响范围