Source Code as a Transactional Abstraction
We argue that this is the next evolution in code, the move data lakes made from files to transactional tables, and assemble its foundations from a three-part series. The…
Source code and source control are now transactional abstractions. Data lakes made the same move when Delta Lake and Spark turned files on object stores into tables with a transaction log, snapshots and optimistic concurrency; this series builds that foundation for source control.
The test: 1,000 agents writing to one branch of one repository at the same moment, on the reference build running on Cloudflare.
1,000 simulated agents pushed changes to the same branch within seconds. All 1,000 landed in each of 6 runs, and no request was refused. The previous design, which built Git trees while landing, got 4 of 1,000 through under the same load.
Short bursts. A sustained-load test is still to come.
With 1,000 agents writing at once, 95% of commits were saved within this time.
Under 1 s in 2 of 3 runs. With one shared login for all agents it was 1.1–1.6 s.
A change is final the moment it enters the transaction log. The Git copy that git clone sees is rebuilt in the background and trails by a few seconds.
On an earlier build the lag was 17 s.
The core rules (how changes are logged, checked and merged) are written in the Lean proof language, and Lean verifies every proof. No step is skipped or taken on trust.
The proofs cover the design, not the running code.
When the system lands a batch of changes together, including merged ones, the result is exactly what you would get by landing them one after another.
Holds when no change reads or writes a file an earlier change in the same batch wrote, and merges don't write back stale content. Merges are modelled line by line with stable line identities; shifting line numbers are not covered.
Without a check between changes in the same batch, two changes can each pass on their own yet produce a result no one-at-a-time order could. The analysis in Part I found this, Lean confirms it, and the fix is now in the code.
Shown with a concrete example. The test workloads do not yet exercise the check.
We argue that this is the next evolution in code, the move data lakes made from files to transactional tables, and assemble its foundations from a three-part series. The…
This paper gives the transaction model on which that view rests. In Git, when many always-online agents write against one moving branch, every lost compare-and-swap race on the…
This paper supplies the part of that foundation that concerns derived data. We model search indexes, symbol tables, blame and work plans as views over the transaction log…
This Part measures what that transaction system costs on cloud primitives and where its serialized authority saturates. The architecture needs an object store, one serialized…
Part I of this series gave the transaction model behind that view and proved its properties by hand. This paper makes the core of that model machine-checked. A Lean 4 development…
A repository is a database, a change is a transaction with a read set and a write set, and a version is a snapshot. Commits are built on the server and recorded without moving any ref. A landing validates against every log entry written since its base and appends one hash-chained entry in the same atomic step as the ref update.
Search indexes, symbol tables, blame and work plans are views over the log, maintained by partitioned jobs over immutable snapshots. A view is consistent at a snapshot whenever the key of each stored partition result determines that result.
An object store, one serialized authority per repository, a durable queue and stateless compute are enough. The reference implementation runs on Cloudflare, and the paper measures where the authority saturates.
A Lean 4 development formalizes the core of the model and proves that an accepted batch, merges included, installs the serial execution of its members, with checked counterexamples showing that neither hypothesis can be dropped.
Composed, the three parts let a branch's Git commit be a deterministic function of the log prefix, so Git is built after landing without weakening the log's guarantees.