Repository navigation
fix(codex): preserve enabled network restrictions on invalid config - #156906
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 23, 2026, 10:25 PM ET / September 24, 2026, 02:25 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Codex plugin rejects invalid enabled network proxy settings, repairs two blank saved fields through Doctor, and documents native domain restrictions. Merge readiness⛔ Blocked before merge - 3 items remain Current main and v2026.9.6 still discard the malformed enabled proxy configuration. This PR addresses that defect, but its deliberate interruption of existing Codex sessions after an update needs an owner decision before merge. Priority: P0 Review scores
Verification
How this fits togetherOpenClaw validates saved Codex plugin settings before resolving an app-server session. The resolver passes valid network rules into a native Codex permission profile that governs sandboxed commands. flowchart LR
A[Saved Codex settings] --> B[Plugin validation]
B --> C{Enabled proxy valid?}
C -- Yes --> D[Native permission profile]
D --> E[Sandboxed commands]
C -- Blank fields --> F[Doctor repair]
F --> A
C -- Other invalid input --> G[Visible error]
Decision needed
Why: The branch prevents silent loss of network restrictions, but choosing an operator-visible interruption over automatic recovery is an upgrade policy decision. Before merge
Agent review detailsSecurityNone. PR surfaceSource +45, Tests +215, Docs +179. Total +439 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep invalid enabled policies fail-closed and use the existing Doctor transform for safe normalization, with a visible update recovery path before the next Codex turn. Do we have a high-confidence way to reproduce the issue? Yes: current-main source shows that a manifest-valid blank optional field makes parsing fail and returns empty configuration, discarding the enabled proxy. This read-only review did not execute that path. Is this the best way to solve the issue? Yes for preserving the network policy and keeping repair with the plugin's Doctor owner. Whether the required manual recovery is the right upgrade experience remains an owner decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d9d8f0829d87. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
|
Addressed both findings in the follow-up commit:
Verified the actual published OpenClaw 2026.9.6 updater against a restored official-plugin baseline with both saved blank fields. The candidate activates successfully, all 158 installed files match the packed artifact before and after Doctor, Doctor removes only those plugin fields while retaining enabled/allow/deny rules, and its second run leaves config bytes unchanged. This is a same-version candidate compatibility replay: the established version-sync tool changes only disposable package metadata to satisfy the published host; all compiled code is unchanged. No package or version was released. Five parser regressions, five new Doctor cases, 11 existing Doctor cases, and all 26 selected repository checks pass. The previous release accepted the saved shape but discarded the plugin config at runtime; the repair restores authored network intent rather than claiming prior enforcement. |
…penclaw#156906) * docs(codex): specify native network allowlist behavior * fix(codex): reject invalid config with enabled network restrictions * fix(codex): repair blank network options and explain config errors * docs: remove task-specific network allowlist spec
Backport #151260: 1a7ba53 Backport #156906: 4f6eb26 Keep saved native policy and explicit ask/false behavior. Reject invalid enabled network settings without exposing values; preserve the existing plugin-owned repair of blank optional fields and binding invalidation. Co-authored-by: stevenlee-oai <[email protected]> Co-authored-by: Kevin <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: jalehman <[email protected]>
What Problem This Solves
Codex could silently discard an enabled network allowlist when another plugin setting passed manifest validation but failed runtime parsing. Invalid enabled configurations now stop with the rejected field path and a repair instruction, without exposing configuration values.
User Impact
The existing
appServer.networkProxy.domainsAPI and native enforcement remain unchanged. Valid and disabled configurations retain their behavior. After updating, users with blank optionalnetworkProxy.profileNameorremoteWorkspaceRootsettings can runopenclaw doctor --fix; the existing Codex Doctor removes only those blank fields and preserves the domain rules. Other invalid fields require correction before Codex runs.Why This Change Was Made
Keep networking policy in native Codex and compatibility repair in the existing plugin Doctor. The docs explain
approvalPolicy: "never", explicit denies, and native managed-policy inheritance. No new network policy system, config API, or core startup hook is added.Evidence
284c7f8d39440890e78e0fd00ad8a60241ac6da7.plugins updatesuccessfully replaces the original official plugin with the candidate, then explicitdoctor --fixremoves the two blank fields, preserves the allow/deny map, and leaves identical config bytes on a second run. All 158 installed files match the frozen candidate before and after Doctor.Native Codex 0.155.1 through the OpenClaw resolver/client accepted allowed HTTPS GETs in full and limited modes and rejected unlisted and explicitly denied hosts. Managed allow inheritance was confirmed. A direct TCP attempt with proxy variables cleared and a pre-resolved address failed while proxied HTTPS to the same host succeeded. This lower-level proof used
command/exec; POST method restrictions and controlled origin receipt counts remain unverified.Independent code, simplification, documentation, and dead-code reviews found no remaining issues. The isolated CLI autoreviewer could not access its configured models and produced no report.
Live OpenClaw → Codex verification
A separate isolated OpenClaw gateway ran three successful agent turns with native Codex 0.155.1 and gpt-5.4. OpenClaw authored only
github.com: "allow", with the proxy enabled,approvalPolicy: "never", and workspace-write sandboxing. Hosted/cached web search, standalone search, web fetch, browser, Codex apps, and OpenClaw's host execution tools were disabled. Native session receipts contain eight realexec_commandcalls and zero web-search items; curl used normal TLS and fresh URL query nonces.https://github.com/robots.txt: HTTP 200, exit 0.example.com,example.org,www.wikipedia.org, andwww.python.org: native policy rejection before execution.api.github.com: reachable; GitHub returned HTTP 403 with its rate-limit headers, not a policy rejection.https://nodejs.org/robots.txt: HTTP 200, exit 0 despite being absent from the OpenClaw-authored map.The managed host supplied 182 inherited allows and 42 denies. Consequently this is not a strict GitHub-only policy on that host: OpenClaw's map does not revoke native managed allowances. The test proves real model-driven execution and denial outside the effective native policy, not universal denial of every host absent from the OpenClaw map. The isolated gateway and its child processes were stopped after verification.