You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combined with the fact that a held lease's ttlDeadline is set once at grant
(src/core/lease-lifecycle.ts:53, lease.heldTtlBackstopMs, default 1h in src/core/config.ts) and never extended, this means a held lease has no
escape hatch at all. At T+60min it expires, the device is reclaimed — i.e.
erased — and the holder is not notified.
docs/CLI.md currently documents pitlane lease renew as "detached mode
only", which matches the code but leaves CLI held mode with no way to keep a
long-running lease alive.
Proposed change
Remove HeldLeaseRenewalError; LeaseLifecycle.renew() accepts held leases
and extends the deadline by lease.heldTtlBackstopMs (held) or the caller's ttlMs.
Drop the special-case mapping in src/daemon/server.ts (HeldLeaseRenewalError
import and its error branch).
pitlane lease renew <lease-id> works for held leases.
Update docs/CLI.md: held-mode CLI leases are hand-renewed; state the default
backstop and that renewal resets it.
This is deliberately the low-tech fix and is independent of the heartbeat work —
it is worth landing first as immediate relief for CLI held mode, and it remains
the CLI's mechanism until the parent-death watch makes an automatic sliding TTL
safe there.
Acceptance criteria
renew extends a held lease's deadline and re-arms the expiry timer
(deterministic test with the fake clock).
lease.renewed is emitted for held leases as it is for detached ones.
pitlane lease renew on a held lease exits 0 and prints the new deadline.
docs/CLI.md no longer says renewal is detached-only.
Activity
feat(lease): allow manual renewal of held leases (#47)