policy: preview review-required gateway repairs#99776
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step Review history (22 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review I restacked the policy series onto current Fresh proof from the top of the stack (
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review of the Review-Required Previews PR. No blocking findings in the incremental diff against the Gateway HTTP PR. Best-fix verdict: best for this preview-only behavior. Keeping these gateway findings review-required while adding non-mutating preview Evidence checked: Proof gap: I did not run packaged CLI proof, so exact stdout/stderr rendering from surfacing the preview in both |
|
No blocking findings from Omar on this PR. I propagated the lower-stack review fixes through this branch in |
|
@clawsweeper re-review Reviewer-requested fixes are pushed on this updated head. Fresh local proof before push: focused policy/core/CLI/tooling Vitest passed, |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer acceptance for current head Rationale: |
|
@clawsweeper re-review Current head: ebd6b12 Restacked onto current Focused validation on the synced tree passed:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
Summary
mainafter policy: repair denied gateway http endpoints #99731 merged.doctor --fixpreviews for Gateway policy findings that should not be auto-mutated:policy/gateway-non-loopback-bind: previews settinggateway.bind=loopbackforgateway.bindandgateway.customBindHostnon-loopback findings.policy/gateway-node-command-denied: previews appending the missing command togateway.nodes.denyCommands.changesin the structured repair flow so review-required guidance is visible without counting the check as repaired.docs/cli/policy.md; no generic Doctor docs were changed.Real behavior proof
Behavior or issue addressed:
doctor --fixsource repair flow now surfaces review-required preview guidance for Gateway bind and Gateway node-command policy findings without mutating config or counting the check as repaired.Real environment tested:
WSL Ubuntu source checkout at PR head
ebd6b1248e574dfaa72bbf30b31ba1c24a09c7b7, rebased on currentmain. The proof used the real Policy doctor registration plusrunDoctorHealthRepairsagainst an isolated temp workspace withplugins.entries.policy.config.workspaceRepairs=true; no live Gateway server, provider, network call, or LLM call was started.Exact steps or command run after this patch:
openclaw.jsoncand in-memory config withgateway.bind="lan"andgateway.nodes.denyCommands=["mcp.help"].policy.jsoncwithgateway.exposure.allowNonLoopbackBind=falseandgateway.nodes.denyCommands=["mcp.help","system.run"].registerPolicyDoctorChecksand runrunDoctorHealthRepairsforpolicy/gateway-non-loopback-bindandpolicy/gateway-node-command-denied.checksRepairedstays zero, and the resulting Gateway config plus config file remain unchanged.node scripts/run-vitest.mjs extensions/policy/src/doctor/register.test.ts src/flows/doctor-repair-flow.test.ts --reporter=dot.Evidence after fix:
Supporting validation:
Observed result after fix:
The repair flow detected both review-required Gateway findings, reported both skipped preview changes, preserved
checksRepaired=0, and left both the effective Gateway config and the config file unchanged. Operators see the proposedgateway.bindandgateway.nodes.denyCommandschanges as review guidance only.What was not tested:
No packaged CLI invocation, live Gateway server, provider, network call, or LLM call was run. This proof exercises the real source-entry doctor registration and repair runner, not a packaged install.
Stack
main