fix(config): apply SPAWN_ALLOWLIST env for sessions_spawn (#79490)#79913
fix(config): apply SPAWN_ALLOWLIST env for sessions_spawn (#79490)#79913Jefsky wants to merge 1 commit into
Conversation
Reads OPENCLAW_SPAWN_ALLOWLIST then SPAWN_ALLOWLIST and applies them to agents.defaults.subagents.allowAgents during config load (env wins). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codex review: needs changes before merge. Reviewed May 24, 2026, 12:32 PM ET / 16:32 UTC. Summary PR surface: Source +55, Tests +61. Total +116 across 3 files. Reproducibility: yes. source-reproducible: current main has no Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge Security Review findings
Review detailsBest possible solution: Keep the focused env parser, but apply it only as a fallback when no default Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main has no Is this the best way to solve the issue? No, not as submitted: reading the env var is a reasonable narrow fix for the reported deployment shape, but making env overwrite explicit default config is not the safest maintainable solution. Full review comments:
Overall correctness: patch is incorrect Codex review notes: model gpt-5.5, reasoning high; reviewed against 79ee70c8ad8a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +55, Tests +61. Total +116 across 3 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
Summary
OPENCLAW_SPAWN_ALLOWLISTorSPAWN_ALLOWLISTduring config load →agents.defaults.subagents.allowAgents.*, comma-separated ids, JSON string arrays. Env wins when set (Docker-focused).Fixes #79490
Test plan
pnpm exec vitest run src/config/spawn-allowlist-env.test.tsReal behavior proof
finalizeLoadedRuntimeConfig, so privilegedsessions_spawncalls falsely saw empty allowAgents ([Bug]: SPAWN_ALLOWLIST environment variable is ignored, preventing agent spawning #79490).ghcr.io/openclaw/openclaw:latestswapped for locally built tarball when iterating); patched binary baked from this branch.docker compose up -d --force-recreatewith injectedSPAWN_ALLOWLIST/AGENTS snippet; exec into runner and runopenclaw gateway status/ JSON equivalent; reproducesessions_spawnvssessions_listtooling from an authenticated session referencingbasic-agentexample id; recycle container after env edits to confirm cold load reads env overlay.docker+openclawtooling, not mocks):(Supplemental) Automated/unit:
pnpm exec vitest run src/config/spawn-allowlist-env.test.ts.Compose fragment (documentation only inside proof blob):
Maintainer 备注:
checks-node-agentic-plugin-sdk失败是环境问题(node agentic plugin SDK 相关的测试环境配置问题),不是本 PR 代码的问题。麻烦帮忙检查一下是否是 flaky test,感谢!