This repository was archived by the owner on Apr 8, 2026. It is now read-only.
Commit bf59abc
committed
Restore prompt-approved tool execution in CLI parity runs
ConversationRuntime already performs permission-policy checks and interactive approvals before dispatching a tool. The CLI tool executor was routing those same tool calls back through GlobalToolRegistry::execute, which re-ran the enforcer without a prompter and flipped approved bash calls back into denials.
Add a preauthorized execution path for runtime-dispatched tools, keep registry enforcement for direct callers, and format the files that were already tripping rustfmt on main.
Constraint: CI on main was failing both cargo fmt and the mock parity harness after permission enforcement landed
Rejected: Remove registry enforcement globally | would reopen direct-dispatch permission gaps
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Use execute_preauthorized only after ConversationRuntime or an equivalent caller has already completed permission gating
Tested: cargo fmt --all --check; cargo test -p rusty-claude-cli; cargo test -p tools
Not-tested: Full workspace test matrix beyond the Rust CI workflow targets1 parent 618a79a commit bf59abc
File tree
3 files changed
+60
-23
lines changed- rust/crates
- runtime/src
- rusty-claude-cli/src
- tools/src
3 files changed
+60
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
834 | 837 | | |
835 | 838 | | |
836 | 839 | | |
837 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
4976 | 4975 | | |
4977 | 4976 | | |
4978 | 4977 | | |
4979 | | - | |
| 4978 | + | |
4980 | 4979 | | |
4981 | 4980 | | |
4982 | 4981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | | - | |
246 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
247 | 265 | | |
248 | 266 | | |
249 | 267 | | |
| |||
2798 | 2816 | | |
2799 | 2817 | | |
2800 | 2818 | | |
2801 | | - | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
2802 | 2823 | | |
2803 | 2824 | | |
2804 | 2825 | | |
| |||
2817 | 2838 | | |
2818 | 2839 | | |
2819 | 2840 | | |
2820 | | - | |
2821 | | - | |
| 2841 | + | |
2822 | 2842 | | |
2823 | 2843 | | |
2824 | 2844 | | |
| |||
4219 | 4239 | | |
4220 | 4240 | | |
4221 | 4241 | | |
4222 | | - | |
4223 | | - | |
| 4242 | + | |
| 4243 | + | |
4224 | 4244 | | |
4225 | 4245 | | |
4226 | 4246 | | |
| |||
4243 | 4263 | | |
4244 | 4264 | | |
4245 | 4265 | | |
4246 | | - | |
4247 | | - | |
4248 | | - | |
4249 | | - | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
4250 | 4271 | | |
4251 | 4272 | | |
4252 | 4273 | | |
| |||
4321 | 4342 | | |
4322 | 4343 | | |
4323 | 4344 | | |
4324 | | - | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
4325 | 4348 | | |
4326 | 4349 | | |
4327 | 4350 | | |
| |||
5813 | 5836 | | |
5814 | 5837 | | |
5815 | 5838 | | |
5816 | | - | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
5817 | 5843 | | |
5818 | 5844 | | |
5819 | 5845 | | |
| |||
5847 | 5873 | | |
5848 | 5874 | | |
5849 | 5875 | | |
5850 | | - | |
5851 | | - | |
5852 | | - | |
5853 | | - | |
| 5876 | + | |
5854 | 5877 | | |
5855 | 5878 | | |
5856 | 5879 | | |
| |||
5876 | 5899 | | |
5877 | 5900 | | |
5878 | 5901 | | |
| 5902 | + | |
| 5903 | + | |
| 5904 | + | |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
5879 | 5912 | | |
5880 | 5913 | | |
5881 | 5914 | | |
| |||
0 commit comments