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 3 commits 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 <[email protected]>
|
Codex review: needs changes before merge. Reviewed July 3, 2026, 11:45 PM ET / 03:45 UTC. Summary PR surface: Source +55, Tests +61. Total +116 across 3 files. Reproducibility: yes. Source inspection shows current main and v2026.6.11 have no Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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: Land a fallback-only env bridge that fills a missing default allowlist for env-only Docker deployments, preserves explicit JSON and per-agent allowlists, keeps configured-agent wildcard limits, and documents precedence. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main and v2026.6.11 have no Is this the best way to solve the issue? No as written. A config-load fallback is the right narrow layer for env-only Docker deployments, but it should not override explicit default allowlists and should document the new env surface. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel 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?
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(config): apply SPAWN_ALLOWLIST env for sessions_spawn (#79490) This is item 1/1 in the current shard. Shard 1/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
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,感谢!