pingqiuandClaude Opus 5.5 6896463a44 volume: name the cause when the workspace lease guard fences
The guard fenced silently: when renewals kept failing until the lease
expired, it drained the volume through blockvolume's lease-stop path, which
logged nothing, and returned the raw RPC error (issue #205).

- Every fence records its first cause: lease expired without a successful
  renewal, expired after a failed renewal (with the renewal's latency and
  error), an invalid reply, a reply that arrived after the deadline,
  revocation by the master, or shutdown. The guard logs it once as
  "workspace lease: fenced ...", FenceCause() returns it, and the non-ACK
  drain error carries it.
- Every failed renewal is logged with its latency and the lease deadline,
  also when the lease is still valid: a run of them is the warning before
  an expiry fence.
- An expiry after a failed renewal returns "workspace lease expired:
  renewal failed after <d>: <err>", wrapping the RPC error.
- blockvolume logs when it stops because the guard requested the drain.

The fence behaviour itself is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 03:50:08 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%