Repository navigation
Print the granted lease from witan task claim - #748
Open
blarghmatey wants to merge 2 commits into
Open
blarghmatey wants to merge 2 commits into
blarghmatey wants to merge 2 commits into
Conversation
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
There was a problem hiding this comment.
Summary
Prints the server-granted lease when claiming tasks from the CLI.
- Adds: the granted lease to
witan task claimoutput beside the assignee. - Adds:
_lease_lengthformatting for whole-minute and second-based leases. - Changes:
witan task runto 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_secondskeep the previous output.
Summary of 79385c9 · React 👍 or 👎 on my comments to tune what I raise · Commands · Review config
Contributor
There was a problem hiding this comment.
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.
Member
Author
|
#optibot review |
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
N/A. Follow-up to #741, which made the claim lease length server configuration and has a granted
task_claimreturnlease_seconds.Description (What does it do?)
witan task claimprinted 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).witan task runprompt into_lease_lengthincli/run_helpers.py, which both use. A lease that is not whole minutes is stated in seconds.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_grantedsets 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.pyandtests/test_claim_overlaps.pypass locally (107 passed).uv run prek run --fileson the changed files passes.witan task claim <slug>printslease 60 minutesunder the default lease.https://claude.ai/code/session_01FGZebERkUorXxXDu66F91m