|
|
a7a97fc299
|
fix(code-runner): 去掉 nproc ulimit,修复容器启动 EAGAIN
容器启动时报 'exec /bin/sh: resource temporarily unavailable',根因是
HostConfig 里的 ulimit nproc=64 与 non-root user(1000:1000) 组合:
RLIMIT_NPROC 按 UID 计数且在容器初始 exec 阶段就生效,与容器内实际进程数无关,
导致 sh 都起不来。pids_limit=64 已在 cgroup 层兜底进程数限制,nproc 是冗余且
有害的双重约束。
复现:docker run --ulimit nproc=64 --user 1000:1000 → exec 失败
去掉 nproc(保留 nofile + pids_limit + 其他沙箱约束)→ python/node 正常运行
cargo test infra::docker 全过。
|
2026-07-05 22:05:01 +08:00 |
|
|
|
f3eb93f320
|
docs(agents): document code runner and fix clippy/biome lint
文档:
- AGENTS.md 新增「Code Runner」架构章节(三层架构 + WASM 可见性规则 +
governor 0.8 无 per_day 的处理 + runner 镜像契约)
- Environment 段补齐 CODE_RUNNER_* 与 RATE_LIMIT_CODE_EXEC_* 环境变量
Lint 修复(clippy --all-targets --all-features -D warnings 全绿):
- runner.rs/runner.rs: use_signal 冗余闭包 → 直接传 fn
- runner_config.rs: &*RUNNER_CONFIG 去 deref;assert_eq!(...false/true) → assert!
- markdown.rs: 局部变量 /// 改 //;Option.map().flatten() → and_then
- languages.rs: 删除从未读取的 LanguageDef.name 字段(语言名即 map key)
- docker.rs: start_container if let Err → ?;timeout match → is_err();
嵌套 if 合并(修 task 2 遗留 + clippy 1.96 新 lint)
- pages/admin/posts.rs: use_signal 冗余闭包(预存 lint,顺带修绿)
- codemirror editor.ts: biome format 重排 setSchema 单行
|
2026-07-03 18:57:25 +08:00 |
|
|
|
5fdc88a48c
|
fix(runner): resolve task 2 container runner review findings
|
2026-07-03 18:02:56 +08:00 |
|
|
|
d8d30df80c
|
feat(infra): implement Docker execution layer using bollard client
|
2026-07-03 17:59:52 +08:00 |
|
|
|
b0ebba3475
|
fix(runner_config): remove server gate on runner_config, safeguard clamp logic, and parse allow_network case-insensitively
|
2026-07-03 17:52:50 +08:00 |
|
|
|
60725053e4
|
feat(infra): implement runner config parsing and resource limits clamping
|
2026-07-03 17:50:42 +08:00 |
|
|
|
2fba43dc3f
|
chore(infra): add bollard dependency and modular structure
|
2026-07-03 17:49:08 +08:00 |
|