staleHead property

TomStaleHead? staleHead
getter/setter pair

When set, every head read answers with this value instead of the truth — the shape a replica takes under eventual consistency.

Set to const TomStaleHead(null) for the 404-shaped answer (a replica that has not seen a ref create), or TomStaleHead(sha) for a ref that has not caught up with a later commit. A wrapper rather than a bare String? because the interesting case is null, and a nullable field cannot distinguish "answer null" from "answer truthfully".

This is a fact about the remote, not about our own writes: the GitHub backend already refuses a ref answer it can prove is historical, but only for commits it made itself. A stale read of another device's commit is unprovable and must be believed — which is the state this reproduces.

Implementation

TomStaleHead? staleHead;