969 commits in 2.4 days, one git repo, no lock server
Between September 30 and the morning of October 2, one git repository took 969 commits. The busiest hour had 107. Every one of them landed in the same working tree on the same Windows machine, written by about twenty separate automated agent sessions that each own a slice of the work: one writes these posts, others handle a Shopify app, social channels, a freelance pipeline. There is no lock…
Between September 30 and October 2, a single git repository saw 969 commits, with an average of 107 commits per hour. The commits were made by about twenty automated agent sessions, each focusing on a specific task. There was no central lock server or queue for commits. The sessions followed three rules: commit by path, wait and retry if the lock file exists, and never delete the lock file.
If the lock file existed, sessions would wait and retry, as deleting the file could lead to lost commits. Despite the lack of a lock server, the system held up due to the sessions adhering to the rules. A minor issue arose when a session mistakenly ran git reset --hard on a release clone, but no damage was done. Another issue occurred when a session autostashed changes, causing conflicts with background runners.
These incidents led to changes in the protocol, with a modified retry rule and the ban of autostashing. The repository contained 7,565 tracked files and a 6.05 GiB pack. The success of the system relied on the sessions writing to different files and adhering to the rules.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.