Commit b843e39
fix(model-apps): never execute a mutating probe as a read
Caught by Copilot in review. `executeProbes` called `readOne` for every planned
probe without consulting `probe.mutating`, and `readOne` is the only operation it
performs. So with `--allow-mutations`, a `write`/`create`/`delete` probe was
exercised as a GET, the 200 came back, and `interpretOutcome` reported PASS.
That is a false pass on the privilege that matters most, on the exact path a
maker opts into specifically to test it -- and it contradicted what the script
header, AGENTS.md and the CHANGELOG all already claimed, which is that
`--allow-mutations` PLANS mutating probes without executing them. The docs were
right; the code was wrong.
Mutating probes now short-circuit before any IO and are reported `inconclusive`
with the reason, so they can never be counted as passes and never add round
trips. `planProbes` still includes them, because showing what WOULD be exercised
is the point of the flag; actually exercising them needs fixture creation and
cleanup, which is a separate design.
Three regression tests, red-green verified: disabling the guard fails all three,
including one asserting an all-mutating run reports zero passes so it cannot look
like success. 34 probe tests, 1514 total.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 42626da2-b66f-4162-acaa-b1127ef23d891 parent 3b7cb28 commit b843e39
2 files changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
215 | 230 | | |
216 | 231 | | |
217 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
0 commit comments