---
title: "Expire stale collaborator presence"
description: "Verify a prepared collaborator presence indicator appears during an active session and disappears after that session ends and its defined expiry elapses."
canonical_url: "https://vostride.com/agent-library/collaboration/presence-expiry-contract.md"
md_url: "https://vostride.com/agent-library/collaboration/presence-expiry-contract.md"
content_kind: "recipe"
topic: "collaboration"
---

# Expire stale collaborator presence

Verify a prepared collaborator presence indicator appears during an active session and disappears after that session ends and its defined expiry elapses.

## Risk

Presence is an ephemeral claim that should age out when a collaborator disconnects. A deterministic fixture heartbeat and expiry boundary are necessary; screenshots alone cannot prove the remote session lifecycle.

## Fixtures

- A disposable document is open to the QA browser and one prepared fixture collaborator named Beacon QA.
- An external session harness records Beacon connection, heartbeat, disconnection, and the product-defined presence expiry interval.
- No other collaborator joins this document during the journey, and the initial state shows no Beacon presence.

## Steps

1. Open the document and verify Beacon QA is absent from the collaborator indicator.
2. Start the prepared Beacon session and verify its presence avatar or name appears in the document UI.
3. Confirm the external harness has recorded an active heartbeat, then terminate that fixture session.
4. Wait through the documented expiry using the harness timing evidence and verify Beacon disappears from active presence.
5. Reload the document and verify no stale Beacon indicator returns while the document itself remains usable.

## Expected results

- The visible arrival corresponds to an externally confirmed active collaborator session.
- The visible departure occurs after the confirmed disconnect and within the documented expiry allowance.
- The final presence inventory contains no disconnected Beacon session.

## False-pass traps

- A missing avatar before the fixture session ever connected is not a successful expiry test.
- An avatar hidden by a collapsed overflow menu is not proof that its presence record expired.

## Cleanup

- Terminate the fixture collaborator session and delete the disposable document if no longer needed.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Collaboration QA recipes](/agent-library/collaboration.md)
- [Software factory QA library](/agent-library.md)
