Fence owner discovery by profile, lease and loopback endpoint, and hand the authenticated URL to the existing Ink transport without acquiring a competing lease. Distinguish lease age from turn activity in unsupported-owner recovery. Client slice only: requires the integration runtime to advertise shared_runtime_url and provide the session-attach handshake. Classic CLI attachment remains an integration gap.
14 lines
514 B
Python
14 lines
514 B
Python
"""Ownership age is not evidence that a model turn is running."""
|
|
|
|
from hermes_cli.active_sessions import session_already_owned_message
|
|
|
|
|
|
def test_owner_refusal_distinguishes_lease_age_from_turn_activity():
|
|
message = session_already_owned_message("session", {
|
|
"surface": "desktop", "pid": 123, "started_at": 1,
|
|
})
|
|
assert "lease age" in message
|
|
assert "turn activity is unknown" in message
|
|
assert "close the session in its owning surface" in message
|
|
assert "running " not in message
|