1 duplicate realtime claim takeover
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Duplicate Realtime Claim Takeover

Duplicate realtime claim takeover decides what happens when a fresh game entry for the same character replaces older pending or active state.

How It Works

The current policy is TakeoverSameCharacterKickOldSession. A newer claim can rotate pending tickets, evict active sessions, send a duplicate_session disconnect, delete old resume-ledger state, and persist enough location state to make takeover deterministic.

How To Use It

Do not special-case duplicate login in route handlers. Use the takeover policy and finalize path so pending claims, active handles, resume ledger, disconnects, and persistence retry stay coordinated.

Invariants

Only one active claim should own a character. Old sessions must not keep a valid resume record after takeover. Location persistence during takeover should either succeed or enqueue durable retry with session_takeover context.

Debugging

Check replaced tokens, pending tickets, active handles, old resume-ledger deletion, disconnect reason, and persistence retry jobs. If both sessions remain active, inspect stale claim removal and active directory eviction.

Examples

If a player logs in from a second client, the old client should receive duplicate_session, the new claim should activate, and any old resume entry should be removed.