Repository navigation
Reliability
- Connection pool close/create races fixed;
ConnectionBudgetFIFO waiters with reserved wakeup, timeout/cancellation slot return, close wakes all waiters. - Paramiko wall-clock timeout covers channel setup, I/O drain, and exit-status wait; watchdog closes channel (transport fallback).
- AsyncSSH timeouts map to
SSHCommandTimeoutError; sudo uses one deadline;execute_sudocloses the remote process on outer cancellation. - SFTP downloads/uploads stage to temp files/dirs and atomically commit; failed sessions are discarded before reuse.
- CLI closes its repository deterministically via
click.Context.call_on_close(no more GC-dependent cleanup).
Scalability
- Sync/Async Batch Executor use bounded worker scheduling: at most
min(max_concurrency, host_count)workers/tasks/futures;BatchResultstill retains one entry per host. - Reduced Paramiko auxiliary threads (readiness polling on the command worker; wall-clock Timer retained).
- Reusable TaskRunner persistent workers with idle retirement and deterministic
close(). - SQLite thread-local connections: one cached connection per calling thread, explicit
close()/ context-manager support.
Benchmarks below are synthetic/local measurements (fake transports, tracemalloc Python peak), not production throughput guarantees.
Storage
- SQLite schema v4 with indexed
host_tags(exact label filtering incl.%/_); automatic v3 backfill,hosts.tagsJSON retained. - JSON → SQLite migration imports hosts/profiles/recipes/tags/credentials in one transaction.
Security
RejectPolicypreserved; system/userknown_hostsloaded by default.- Secure SFTP staging (
0600downloads,0700upload dirs); no secret echo in CLI progress; dependency audit + secret scanning in CI.
Compatibility
- JSON repository
get()/list()now return detached snapshots (SQLite already did); mutate-then-save()is required to persist:h = repo.get(n); h.port = 2222; repo.save(h). - New APIs are additive-only (
ConnectionBudget.acquire(..., cancel_event=...),get_metrics()waiter count,TaskRunner.close(),SqliteHostRepository.close()). - No CLI commands removed. See CHANGELOG for the full list.