fix(cli): make 'bin/rune' bootstrap stable#166
Conversation
zake-dev
left a comment
There was a problem hiding this comment.
Two minor inline notes (retry semantics + typos). Nothing blocking.
| fetch() { | ||
| curl --fail --silent --show-error --location --connect-timeout 5 \ | ||
| --retry "$NET_RETRY" --retry-delay "$NET_RETRY_DELAY" \ | ||
| --retry-max-time "$NET_RETRY_MAXTIME" "$@" |
There was a problem hiding this comment.
Retry rarely fires for slow responses under the mcp-server budget. Here --retry-max-time is 3s, but each call adds a larger --max-time (binary = 10s, see L66). When a request hangs, the single attempt runs to its --max-time, by which point the 3s retry window is already closed, so no retry happens. --retry only helps fast failures (e.g. an immediate HTTP 504). So the comment on L72 ("rides out ... timeouts") slightly overstates it — retries cover fast errors, not slow/hung ones. Suggestion: tweak the comment to say "fast transient errors", and consider --retry-all-errors if you also want mid-transfer resets retried. (Not blocking.)
There was a problem hiding this comment.
No retry on slow response is intended but I think comment is not proper. I'll fix this soon.
Or do you think it is better to add --retry-all-errors rather than ignore?
There was a problem hiding this comment.
Agreed — comment fix is enough.
It won't change the slow-response behavior anyway (that comes from --retry-max-time 3s < --max-time 10s, i.e. timing, not error type).
It would also retry permanent errors like a 404 missing asset — on the non-mcp path (60s window) that turns a fast "not found" into a slow failure.
So keep default --retry and just reword, e.g. "retries fast transient errors only; slow/hung requests are intentionally not retried to stay within the spawn budget." 👍
| } | ||
|
|
||
| # Network time budget | ||
| # - `mcp-server`: MCP entryponit run by Claude Code session with ~30s timeout. |
There was a problem hiding this comment.
Typos in comments (no logic impact):
- L59
entryponit->entrypoint - L83
stucked->stuck - L124
lokc->lock
Summary
bin/runecurl --retry --retry-max-timeconsidering subcommandmcp-server/install<pid> <timestamp>for checking ownership, and reclaim stale lockbin/runeNotes for Reviewers