What problem does it solve?
Go functions that acquire multiple fallible resources (contexts, files, transactions, leases, subprocesses, HTTP responses) often leak them on error, cancellation, or panic paths, causing deadlocks, leaked ports, and poisoned connections that are hard to detect in review.
Core Features & Use Cases
- Acquisition Matrix Audit: Enumerates every resource acquisition in a changed function and maps each to its owner, cleanup action, error policy, and shutdown order using a canonical pairing table.
- Exit-Path Verification: Walks success, error, cancellation, panic-recovery, and runtime.Goexit exits backward to prove every live resource is released or ownership is transferred.
- Canonical Failure Testing: Provides test patterns that inject failing dependencies, cancel mid-flight, force HTTP body failures, and restart components to prove resources are actually released rather than merely called.
- Use Case: After modifying a daemon function that claims a task lease, registers with a registry, and spawns an ACP subprocess, run this audit to confirm the lease is released when registration fails and the process group is killed on context cancellation.
Quick Start
Audit the function I just changed for cleanup gaps on every error and cancellation path, and add tests proving each resource is released.