Repository navigation
Commit 111584e
fix(providers): match standalone 'terminated' in transport retry regex (#267)
## Summary
- The transport-level retry regex in `isTransportLevelError` required
`fetch failed` before `terminated`, but pi-agent-core only captures
`error.message` (not `error.cause`), so the `errorMessage` can be just
`"terminated"` without the prefix
- This caused the retry logic to be skipped, surfacing `CodesignError:
terminated` directly to the user instead of retrying with conversation
replay
- Added `terminated` as a standalone match in the regex, and added tests
at both the provider and agent layers
## Test plan
- [x] `pnpm --filter @open-codesign/providers test` — all 37 tests pass
(new: `marks standalone terminated as retryable`)
- [x] `pnpm --filter @open-codesign/core test -- -t "transport-level
retry"` — all 7 tests pass (new: `retries a standalone terminated
error`)
- [ ] Manual: trigger a generation with a proxy that drops SSE
connections → should retry instead of showing "terminated" error
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent c0d7e9c commit 111584e
3 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
1241 | 1267 | | |
1242 | 1268 | | |
1243 | 1269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments