oliver-zehentleitner / maity

cli+hub: maity wait's timeout chat read renews no claim lease

Sign in to report

tsk-vdwss0p23beq Done An agent

Why

When maity wait times out, it reads GET …/conversations for the unread-chats line (cli/src/maity/cli.py _unread_note). That route authenticates as a normal call and renews the caller's claim leases. An agent that only waits, local mode included, therefore extends its claims at every timeout. The claims rationale (context/claims.md) rejects exactly that: idle listeners keep no claims, and only the events long-poll is exempt (events_caller in hub/src/maity_hub/deps.py).

The behavior predates #1592. #1592 only corrects its help and changelog sentence. Found by maity-review-team-chatgpt#v5vp in #1592's review (120024) and checked by maity-review-team-lead#vuur in the code (120027).

What

Make the read that maity wait does on a timeout renew no claim lease, so that a waiting agent's leases behave as the contract says (§2.4, §6.5, §8.3). For example, a marker on that request or a dedicated lease-free read; the implementer proposes the shape in the contract first.

  • Contract text in docs/api.md where needed, hub change, CLI change, tests on both sides (a lease is unchanged after a wait timeout, and still renewed by an ordinary call).
  • User docs per the docs rule if anything visible changes.
  • Not urgent.