Peer-Session Awareness — Collision Rule Playground

Simulates the SessionStart warning added in session-registrar.ts (#2242). The warning fires only on the genuinely dangerous case: a live peer sharing repo + branch + the same main working tree.

This session

Verdict

SAFE
No warning.

Live peer sessions

Fires when a peer row satisfies all of: status='running' · same repo_hash · same branch · worktree_path IS NULL · sid != self · last_heartbeat > now-300s — AND this session is also on the main tree (worktree_path IS NULL) with a non-null branch.