Skip to content

Commit 209efdd

Browse files
committed
refactor: replace _previous_leased with derived LeaseState
Introduce LeaseState enum and _lease_state property derived from _lease_context, eliminating a class of state-synchronization bugs where _previous_leased could drift from _lease_context. Key changes: - Wrap handle_lease body in try/finally so early returns (stale lease, session setup race) always clean up _lease_context and log context - Reject overlapping leases in _apply_status instead of silently replacing _lease_context, preventing concurrent handle_lease tasks - Move before-lease hook spawn into _on_lease_acquired for cleaner ownership of lease startup - Remove stale _previous_leased from test fixtures Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Assited-by: claude-opus-4.6
1 parent 64105bc commit 209efdd

2 files changed

Lines changed: 408 additions & 153 deletions

File tree

0 commit comments

Comments
 (0)