Commit 806de38
fix: don't retry permanent errors in RunWithRetries (#164)
## Summary
`RunWithRetries` in `internal/system/helpers.go` previously wrapped
**all** errors with `retry.RetryableError`, meaning permanent failures
such as `ErrNotInstalled` (binary not found) were retried with
exponential backoff for the full `maxDuration` — typically 5 minutes —
before finally being reported.
This change:
- **Treats `ErrNotInstalled` as a permanent error**, returning it
immediately without retrying. This sentinel error is returned by
`DryRunWorker` when a read-only command's binary is not on the system,
and retrying it cannot succeed.
## Motivation
Several call sites pass a 5-minute `maxDuration`. When a command fails
with a permanent error (e.g. a snap or binary that simply does not
exist), the user experiences an unexplained 5-minute hang before the
error is finally surfaced. This is particularly problematic in dry-run
mode where `ErrNotInstalled` is the expected signal that a binary is
absent.
🤖 Generated with [Claude Code](https://claude.com/claude-code) but owned
by me.
Co-authored-by: Claude Code <noreply@anthropic.com>1 parent 6307920 commit 806de38
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
0 commit comments