graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Map conflict detection (DeepSWE yjs-map-conflict-detection, distilled)
doc.py must expose Doc, MapConflictError.
Doc(map_conflict_policy="allow"|"collect"|"error").
doc.get_map(name) returns a map-like object with set(key, value) and
delete(key). doc.transact(fn) runs fn inside one transaction.
Conflicts: two sets, or a set and a delete, on the same key
inside one transaction.
allow: apply last write; do not record or throw.collect: apply last write; record conflicts.get_map_conflicts()returns a list of dicts withkey,type(set-setordelete-set),source(local),message(non-empty),resolutionwithwinner,strategy(string),deterministic(bool).get_map_conflict_summary()returns{count, byType, byKey}wherebyType/byKeymap strings to counts.error: raiseMapConflictErrorwith.conflicts(list). The transaction must be atomic: no partial application.
Values that are dicts (stand-in for nested Y types) make type ambiguous.