Skip to content

v0.13.0

@nshkrdotcom nshkrdotcom tagged this 07 Feb 03:10
This release focuses on internal system hardening, non-blocking GenServer
operations, and the introduction of a structured public API error contract.

Internal Hardening and Asynchronous Execution:
Refactored core components (GRPCWorker, HeartbeatMonitor, LifecycleManager)
to utilize non-blocking callbacks. Long-running gRPC calls, health checks,
and heartbeat pings now execute in supervised async tasks with internal
request queuing. This ensures workers remain responsive to state queries
and lifecycle management even during active RPC execution.

Structured Error Contract:
Introduced Snakepit.Error structs and a normalization layer for all public
API returns. Internal error tuples are now converted into categorized
structs, providing a consistent interface for Snakepit.execute and pool-level
operations.

Instance Isolation and Resource Management:
Added instance isolation tokens via SNAKEPIT_INSTANCE_TOKEN to support
concurrent VM deployments on shared hosts. This prevents cleanup logic from
targeting workers owned by other live instances. ProcessRegistry DETS
persistence is now batched behind a configurable flush interval to reduce
I/O overhead in GenServer callbacks.

Resilience and Race Condition Fixes:
Replaced Process.alive? checks with monitor-based or catch-based patterns
to eliminate TOCTOU races. Improved supervisor shutdown hygiene by ensuring
in-flight tasks are explicitly cancelled and demonitored. Added pre-stream
buffering for Python telemetry to prevent event loss during startup.

Deprecation Framework:
Implemented a telemetry-based deprecation framework. Legacy modules such as
Snakepit.Executor and Snakepit.HealthMonitor now emit VM-once telemetry
events to guide users toward modern equivalents while maintaining stability.

Centralization:
Consolidated configuration resolution, timeout execution, and supervisor
fallback logic into internal helper modules (Config, TimeoutRunner, and
AsyncFallback) to reduce code duplication and standardize system behavior.
Assets 2
Loading