Repository navigation
Commit 9ae937b
committed
test(opencode-go): abort the Anthropic request mid-flight so the completion catch runs
The abort-identity test aborted its controller before completePrompt was called, so the
error surfaced during model resolution and the anthropic completion catch's
isRequestAborted(error, options?.abortSignal) branch was never reached. The mock now
rejects with a generic Error from an abort listener on the request signal the provider
forwarded - the shape the sibling Responses test in this file uses - and the test aborts
only after messages.create has been called.
Control on the branch itself: disabling the anthropic completion catch leaves the old
test passing unchanged and fails the new one with
"Opencode Go completion error: The Opencode Go request was aborted", so the new shape
reaches the branch the old shape did not. Dropping the second argument to isRequestAborted
still passes under both shapes: with a mid-request abort the error that reaches the catch
is the merged-signal AbortError, so the caller-signal argument is not yet load-bearing in
either shape. That is a limit of this change, not a claim that it is closed.
Gate accounting: packageForPath() returns null for this spec path, so the mutation-diff
leg charges 0 changed lines for this commit.1 parent 68d3663 commit 9ae937b
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1422 | 1431 | | |
1423 | 1432 | | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1424 | 1436 | | |
1425 | 1437 | | |
1426 | | - | |
| 1438 | + | |
1427 | 1439 | | |
1428 | 1440 | | |
1429 | 1441 | | |
| |||
0 commit comments