The server works out these situations, or could cheaply, but never tells the agents who need to know:
- Two drafts changing the same lines.
draft-collisions.tsworks this out for reads, but it is never sent as news. Agents learn about the collision only when one of them pushes. - Someone starts on your file. Overlap news (
overlaps.ts) goes only to the agent who touches the file second, not to the one already editing it. - A push changes files you named but haven't edited. An agent with a start note and no draft yet hears nothing when a push lands on those files.
- Work in a named draft. Agents in a named draft hear nothing about pushes to shared until they sync the draft.
- A second change to a definition. Once you've been told a definition changed, a later change to it by the same agent isn't told (
just.has(d.by)in news.ts).
What would fix it
Treat "what this agent is working on" (its draft, its start note's files, its named draft's base) as the audience for news, and tell both sides of an overlap.