wiki:StateFileJournal

To keep the StateFile consistent even in case of its own failures, tailor uses a journal: every time the next pending changeset is effectively applied on the SourceRepository WorkingDir and committed on the TargetRepository's one, Tailor writes that single changeset in the journal.

Just before leaving, and to be real sure even any time the StateFile is opened, the presence of the journal triggers a finalization process, that drops already applied changesets from the queue and then rewrites the StateFile itself, removing the journal.