fix(doctor): align Personal shell approval fallback - #1744
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
The updated runbook text can read as if non-shell tools also fail closed when ApprovalPolicy is absent.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This pull request aligns netclaw doctor output with the runtime fail-closed rule for Personal host shell approval. It also updates the OpenSpec contract and the operator runbook to match the shipped behavior.
Changes:
- Update the doctor check to warn only for an explicit
shell_execute = Autooverride on Personal with host shell enabled. - Update and extend doctor regression tests for missing policy, missing override, and explicit
Auto/Approvaloverrides. - Update OpenSpec requirements and archive the completed OpenSpec change.
File summaries
| File | Description |
|---|---|
| src/Netclaw.Cli/Doctor/ToolAudienceProfilesDoctorCheck.cs | Replace the “missing gate” warning with an “explicit Auto override” warning for Personal host shell. |
| src/Netclaw.Cli.Tests/Doctor/ToolAudienceProfilesDoctorCheckTests.cs | Update test expectations and add coverage for explicit Auto and missing-override cases. |
| openspec/specs/tool-approval-gates/spec.md | Document the Personal shell fail-closed fallback and the exact override precedence. |
| openspec/specs/netclaw-cli/spec.md | Update the doctor requirement and scenarios to match the new warning rule. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/tasks.md | Archive tasks for the completed change. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/specs/tool-approval-gates/spec.md | Store the delta spec for tool approval gates in the archived change. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/specs/netclaw-cli/spec.md | Store the delta spec for CLI doctor behavior in the archived change. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/proposal.md | Archive the proposal for the completed change. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/design.md | Archive the design notes for the completed change. |
| openspec/changes/archive/2026-08-03-align-personal-shell-approval-fallback/.openspec.yaml | Add OpenSpec metadata for the archived change. |
| docs/runbooks/tool-approval-gates.md | Update the operator guidance for existing installs to describe the fail-closed shell fallback. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| Existing Personal configs without an exact `shell_execute` override use the | ||
| fail-closed `Approval` mode. This rule also applies when `ApprovalPolicy` is | ||
| absent or its `DefaultMode` is `Auto`. | ||
|
|
||
| Rerun `netclaw init` or add the `Approval` override to make this behavior | ||
| explicit. Set an exact `shell_execute` override to `Auto` only when shell | ||
| commands must run without approval. |
There was a problem hiding this comment.
Fixed in 0666f8d. The runbook now states that the fallback applies only to Personal shell_execute calls.
There was a problem hiding this comment.
🟢 Ready to approve
The change is narrow, matches the runtime resolution logic, and it includes focused regression tests and updated specifications.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 0 new
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary
shell_executeoverride selectsAuto.Contract
A clean Personal install writes an exact
shell_execute = Approvaloverride.A missing policy or exact override also resolves to
Approvalfor Personal shell calls.An exact
Auto,Approval, orDenyoverride remains authoritative.This pull request does not change shell parsing or the approval matrix.
Validation
dotnet test src/Netclaw.Cli.Tests/Netclaw.Cli.Tests.csproj --filter "FullyQualifiedName~ToolAudienceProfilesDoctorCheckTests"passed 18 tests.ToolApprovalGateTestspassed 42 tests.dotnet slopwatch analyzefound no issues.git diff --checkpassed.openspec validate --allpassed 71 items.