summaryrefslogtreecommitdiff
path: root/lib/hyperstack/client.rb
AgeCommit message (Collapse)Author
2026-05-25fix(client): use nil-safe fetch fallback in list_flavors/list_imagesPaul Buetow
Replace || fallback with Hash#fetch block in list_flavors and list_images. The old code incorrectly swapped falsy-but-present values (empty string, false, 0) via ||. fetch only falls through when the key is absent, preserving legitimate falsy values from the API.
2026-05-25fix(client): explicitly rescue Net::ReadTimeout alongside Net::OpenTimeoutPaul Buetow
Net::ReadTimeout inherits from Timeout::Error and was already caught indirectly, but listing it explicitly matches the pattern used in Config and InferenceTester and guards against future Ruby changes. Also makes the retry intent obvious for anyone auditing the rescue clause.
2026-03-25hyperstack: split 3335-line monolith into lib/hyperstack/ modulesPaul Buetow
Extracts all classes from hyperstack.rb into focused library files: - lib/hyperstack/config.rb — ConfigLoader + Config (TOML loading, validation) - lib/hyperstack/state.rb — StateStore + PrefixedOutput (JSON state, threaded output) - lib/hyperstack/client.rb — HyperstackClient (REST API + retry logic) - lib/hyperstack/wireguard.rb — LocalWireGuard (wg1.conf peer management, /etc/hosts) - lib/hyperstack/provisioning.rb — ProvisioningScripts + RemoteProvisioner (SSH bootstrap) - lib/hyperstack/manager.rb — Manager (VM lifecycle orchestration) - lib/hyperstack/watcher.rb — VllmWatcher (Prometheus + GPU dashboard) - lib/hyperstack/cli.rb — CLI (OptionParser command dispatch) hyperstack.rb becomes a 46-line entry point with require_relative calls. All files pass `ruby -c` syntax check and `--help` runs correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>