The merge conflict: one writer at a time
The merge conflict: one writer at a time
Repair lab (Module 9, L9.1 -- the first lesson of Multi-agent orchestration): two writers append to one shared registry for twenty rounds with no coordination, and 21 lines land where 41 belong. Nothing errors, nothing marks a conflict and no line repeats; the last write wins and both writers keep exactly 10 of their 20 lines, with wB-feature-00 the first one gone, in 5 of 5 runs. Four of the five obvious checks pass the corrupt file (non-empty, changed, no duplicates, both writers appear) and only the exact count in proposal order fails it. Of four coordination mechanisms, 3 of 4 survive a healthy run and 1 of 4 survives the writer dying after 20 applied: a durable mailbox replays the 20 remaining to 41 of 41 while an in-memory queue stops at 21 and a shared lock completes 0 of 1. Repair with one writer draining proposals in arrival order: 41 of 41, 5 of 5 runs, 0 order violations. 3 retries still write 21 of 41 and one direct write 3 proposals stale costs 3 lines. Arrival order waits 1 proposal for the newcomer against 20 in author order (which inverts 190 pairs). Serializing 40 proposals costs 40 drain units on one artifact and 10 across 4 shards; 3 artifacts and 6 agents means 3 write tokens and 3 proposers. Loss scales with the writer count, 0, 20, 40 and 60, and not with speed. In-memory only; scripted writers, no threads, model or provider call.
This Harness Engineering lesson is part of a paid plan. Sign in with a plan that includes this course to read it.