fix(gateway): support native Windows exec approvals#101669
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44e2551a0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| shells: Type.Optional(Type.Array(NonEmptyString)), | ||
| description: Type.Optional(Type.String()), |
There was a problem hiding this comment.
Allow null native rule metadata from Windows nodes
When a Windows native rule has no shell filter or description, the released companion's rule model represents those as nullable Shells/Description and system.execApprovals.get copies them into shells/description for each returned rule. This validator only accepts arrays/strings, so ordinary Windows policies with rules like hostname can be rejected at the gateway as “node returned invalid exec approvals payload” instead of rendering in the CLI/UI. Please allow or normalize null for these optional native fields before validating.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 9:23 AM ET / 13:23 UTC. Summary PR surface: Source +466, Tests +385, Docs +18, Other +54. Total +923 across 16 files. Reproducibility: yes. source-reproducible: the released Windows companion returns nullable shells/description fields for ordinary rules, while the PR schema only accepts arrays/strings before the gateway forwards data to CLI/UI consumers. I did not run a live Windows companion session in this review. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the native/file-backed split, but normalize or accept null optional native rule metadata at the protocol boundary, cover that exact Windows payload in protocol/gateway/CLI/UI tests, and add current-head Windows get/set proof before merge. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the released Windows companion returns nullable shells/description fields for ordinary rules, while the PR schema only accepts arrays/strings before the gateway forwards data to CLI/UI consumers. I did not run a live Windows companion session in this review. Is this the best way to solve the issue? No, not yet: the owner-boundary choice is good, but the patch must accept or normalize the released Windows null metadata shape before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e591dcfa8213. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +466, Tests +385, Docs +18, Other +54. Total +923 across 16 files. View PR surface stats
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
|
732f41c to
ce5656d
Compare
|
Land-ready proof for
Known proof gap: no active Windows Crabbox/pond lease was available. The transport fix is therefore proved against released Windows source plus exact protocol/Gateway/CLI/UI integration tests, not a fresh physical Windows session. |
|
Merged via squash.
|
* fix(gateway): support native Windows exec approvals Co-authored-by: Vincent Koc <[email protected]> * chore: defer changelog entry to release * test: use tracked approvals temp directories --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(gateway): support native Windows exec approvals Co-authored-by: Vincent Koc <[email protected]> * chore: defer changelog entry to release * test: use tracked approvals temp directories --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
The released Windows companion returns a host-native exec-approval policy from
system.execApprovals.getand accepts that policy onsystem.execApprovals.set. OpenClaw's dedicatedexec.approvals.node.*path assumed every node used the OpenClaw approvals-file shape, so Windows policy reads, writes, and Control UI rendering were incorrect.Closes the surviving approvals slice of #88163.
Why This Change Was Made
The remaining #88163 changes are intentionally excluded: loopback auth, command exposure, raw invoke blocking, build tooling, and pairing behavior have either landed independently or changed architecture on current
main.User Impact
Windows companion nodes can be inspected with
openclaw approvals get --node ...and updated withopenclaw approvals set --node .... Concurrent writes are hash-guarded. Control UI displays the native policy without offering the incompatible approvals-file editor. Existing file-backed gateway, macOS, and headless-node behavior remains unchanged.Evidence
openclaw-windows-nodev0.6.12: get and constraints, hash-guarded replacement set, and canonical rules/actionstsgo:core,tsgo:core:test,tsgo:test:packages, andtsgo:test:uipassedoxfmt --checkon all touched TypeScript/Markdown andgit diff --checkpassedProof gap: no active Windows Crabbox/pond lease was available for a fresh native Windows run. This change is therefore proved against the released companion source contract plus exact Gateway/CLI/UI integration tests, not a new physical Windows session.