Commit ea32f80
agentHost: address agent merge review feedback (#331158)
* agentHost: address agent merge review feedback
Follow-ups to PR #331010 review comments:
- Rename settings from `chat.agentHost.agentMerge.*` to `chat.agentMerge.*`.
- Reject client writes to host-owned `agentMerge.controller` session config so a
forged controller state cannot drive a native merge.
- Reconcile injected autonomy configuration every cycle and roll back keys that
policy later revokes; never widen configuration while a turn is active.
- Revalidate the merge target before starting a turn and before merging, and
refresh live state, config and top-level comments inside the merge step.
- Split `AgentMergeRepairAction` out of `AgentMergeAction` so repair paths
cannot express a merge.
- Carry all feedback comments per review thread and bound the prompt with
explicit caps and an aggregate character budget.
- Fail closed when fork head provenance is missing, and ignore refs from a
different GitHub host.
- Cancel the controller turn when the runtime stops.
- Split the enable/disable command preconditions with a dedicated context key and
make the configure quick pick's reset a title button.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: address agent merge PR review feedback
- Preserve host-written session config across a client `SessionConfigChanged`
with `replace: true`. Omitting `agentMerge.controller` previously cleared the
bound target, comment watermark and attempt budgets, which bypassed the
authorization boundary that explicit-write rejection was meant to enforce.
- Canonicalize pull request web hosts to their API host when checking that the
credential matches. GitHub Enterprise Cloud serves `tenant.ghe.com` from
`api.tenant.ghe.com`, so comparing the web host rejected every GHE Cloud pull
request. The derivation now reuses `deriveGitHubEndpoints`.
- Refresh top-level comments inside `prepareMerge`, last, before the snapshot and
token are captured. Refreshing them in the controller beforehand left a window
across `prepareMerge`'s own authoritative refreshes in which a new maintainer
comment could be missed; refreshing afterwards would invalidate the preparation
generation. A comment landing after capture now invalidates the preparation.
- Migrate the legacy `chat.agentHost.agentMerge.*` setting ids to their new
`chat.agentMerge.*` names so an explicit opt-out is not silently discarded.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 156357c commit ea32f80
11 files changed
Lines changed: 628 additions & 136 deletions
File tree
- src/vs
- platform
- agentHost
- common
- node
- test
- common
- node
- github/common
- sessions/contrib/providers/agentHost
- browser
- workbench/contrib/chat/browser
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
149 | | - | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
156 | 168 | | |
157 | 169 | | |
158 | 170 | | |
159 | | - | |
160 | | - | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
167 | 188 | | |
168 | 189 | | |
169 | 190 | | |
| |||
247 | 268 | | |
248 | 269 | | |
249 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
250 | 293 | | |
251 | 294 | | |
252 | 295 | | |
| |||
281 | 324 | | |
282 | 325 | | |
283 | 326 | | |
284 | | - | |
| 327 | + | |
285 | 328 | | |
286 | 329 | | |
287 | 330 | | |
| |||
292 | 335 | | |
293 | 336 | | |
294 | 337 | | |
| 338 | + | |
295 | 339 | | |
296 | 340 | | |
297 | 341 | | |
298 | 342 | | |
299 | 343 | | |
300 | 344 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
314 | 361 | | |
315 | 362 | | |
316 | 363 | | |
| |||
0 commit comments