Skip to content

Print the granted lease from witan task claim - #748

Open
blarghmatey wants to merge 2 commits into
mainfrom
witan-claim-prints-lease
Open

blarghmatey wants to merge 2 commits into
mainfrom
witan-claim-prints-lease

Conversation

@blarghmatey

Copy link
Copy Markdown
Member

What are the relevant tickets?

N/A. Follow-up to #741, which made the claim lease length server configuration and has a granted task_claim return lease_seconds.

Description (What does it do?)

witan task claim printed only the assignee, so a person claiming from the CLI had no way to learn when the claim lapses. It now prints the lease the server granted, e.g. Claimed tk-abc (assignee=alice, lease 120 minutes).

  • The minutes-or-seconds wording moves out of the witan task run prompt into _lease_length in cli/run_helpers.py, which both use. A lease that is not whole minutes is stated in seconds.
  • Against a deployment that predates lease_seconds, the line prints as before, without the lease.

How can this be tested?

  • test_cli.py::test_task_claim_cli_prints_the_lease_it_was_granted sets a 90-minute lease and checks the claim output names it. It fails on main (the output is (assignee=alice)) and passes here.
  • tests/test_cli.py, tests/test_launch_spec.py and tests/test_claim_overlaps.py pass locally (107 passed). uv run prek run --files on the changed files passes.
  • By hand: witan task claim <slug> prints lease 60 minutes under the default lease.

https://claude.ai/code/session_01FGZebERkUorXxXDu66F91m

The lease length is server configuration and a granted claim reports it,
but `witan task claim` printed only the assignee, so a person claiming from
the CLI had no way to learn when the claim lapses. It now prints the lease
alongside the assignee, worded the same way as the `witan task run` prompt,
whose minutes-or-seconds logic moves into a shared helper.

Claude-Session: https://claude.ai/code/session_01FGZebERkUorXxXDu66F91m
Copilot AI balanced review requested due to automatic review settings November 25, 2026 16:08

@agent-optibot agent-optibot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Prints the server-granted lease when claiming tasks from the CLI.

  • Adds: the granted lease to witan task claim output beside the assignee.
  • Adds: _lease_length formatting for whole-minute and second-based leases.
  • Changes: witan task run to share lease formatting with task claims.
Details for reviewers

Core files: mcp/servers/witan/witan/cli/tasks.py, mcp/servers/witan/witan/cli/run_helpers.py

More changes

  • Adds: coverage for printing a 90-minute granted lease. (test_cli.py)
  • Changes: the changelog to document lease output from witan task claim. (20261125_105520_blarghmatey_witan_claim_prints_lease.md)

Unchanged

  • Claims from deployments without lease_seconds keep the previous output.

Summary of 79385c9 · React 👍 or 👎 on my comments to tune what I raise · Commands · Review config

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@blarghmatey

Copy link
Copy Markdown
Member Author

#optibot review

@agent-optibot agent-optibot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status: Code Looks Good 👍

No blocking issues found.

📌 Reviewed up to the latest commit · ⏱️ Review completed in 3 minutes

  • 🔄 re-review this PR

…rmations

`witan task run` and a consolidated multi-task run claim too, and their
confirmations still printed no lease, so the CLI said when a claim lapses
on only one of its three claim paths. All three now share the lease note.

Claude-Session: https://claude.ai/code/session_01FGZebENkedYTS2g2uYmEbC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants