Skip to content

Add kata federation lease renew to extend a timed lease before it expires - #334

Merged
wesm merged 4 commits into
kenn-io:mainfrom
naveenspark:feature/lease-renewal
Sep 3, 2026
Merged

Add kata federation lease renew to extend a timed lease before it expires#334
wesm merged 4 commits into
kenn-io:mainfrom
naveenspark:feature/lease-renewal

Conversation

@naveenspark

@naveenspark naveenspark commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Timed federation write leases could be acquired from the CLI with kata federation lease acquire --ttl, but there was no CLI way to extend one. A holder whose lease was about to expire had to release and re-acquire, which drops the lease identity and opens a window for another actor to take the issue. The daemon and the MCP lease tool already supported renewal; only the CLI lacked it.

kata federation lease renew <issue-ref> --ttl <duration> now posts to the daemon's existing renew action. The lease keeps its claim UID, its revision advances, and the new expiry is computed from the hub's clock, so the holder keeps exclusive coordination without a gap. --ttl is required and accepts the same whole-unit 60s–24h durations as acquire.

Renewal applies only to timed leases. Renewing a hard lease (one acquired without --ttl) fails with the daemon's hard claims cannot be renewed validation error, and renewing a lease held by someone else or no lease at all fails with claim not held. Both surface as ordinary CLI errors with non-zero exit; there is no path that reports success without the hub extending the lease.

Human output prints renewed lease on <ref> as <holder>, agent output reports State: renewed, and JSON output is the daemon's lease response unchanged. The command is documented in the CLI reference and the federation design doc.

@roborev-ci

roborev-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (4bd12c4)

Verdict: No Medium, High, or Critical findings; the code appears clean.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 2m5s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (4fb546c)

Verdict: Code is clean; no medium, high, or critical issues found.


Reviewers: 2 done | Synthesis: codex, 5s | Total: 2m4s

@wesm wesm self-assigned this Sep 3, 2026
@wesm

wesm commented Sep 3, 2026

Copy link
Copy Markdown
Member

looking

@wesm wesm changed the title Expose timed lease renewal in the CLI Add kata federation lease renew to extend a timed lease before it expires Sep 3, 2026
…ction

The federation operations guide lists the lease commands operators run,
but it did not show the new renew command that the CLI reference and
design doc already list. Operators reading only that guide would not
know a timed lease can be extended without release and re-acquire.

Renew applies only to timed leases. A lease acquired without --ttl is a
hard lease, and the hub rejects renewing it. The CLI relied on the
daemon for that behavior with no test at the command surface, so this
adds one that asserts the user-visible error.

The renew command also checked for an empty --ttl itself before calling
the shared TTL parser, which already reports whether a TTL was given.
The command now uses that result instead of a second check.

🤖 Generated with [Claude Code](https://claude.com/claude-code) (claude-fable-5-1)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (e786f68)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 3m10s

@wesm
wesm merged commit 6784848 into kenn-io:main Sep 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants