spawn/shared
A e97a061129
refactor: reduce complexity in 3 shared/common.sh functions (#539)
1. _cloud_api_retry_loop: consolidate two duplicate retry branches
   (network error + HTTP 429/503) into a single retry path using a
   retry_reason variable. Reduces from 47 to 43 lines, eliminates
   duplicated _api_should_retry_on_error / _update_retry_interval calls.

2. interactive_pick: extract list display + selection into reusable
   _display_and_select helper. The main function is now a thin wrapper
   that checks env var, fetches items, then delegates to the helper.

3. generic_ssh_wait: replace inline backoff calculation (3 lines) with
   existing _update_retry_interval helper, reducing duplication.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-11 15:12:23 -08:00
..
common.sh refactor: reduce complexity in 3 shared/common.sh functions (#539) 2026-02-11 15:12:23 -08:00