Files
Chronos/tests
Alby96andClaude Opus 5.5 bc87a57830 fix(projects): one atomic catch-up merge, Main settled from the records, lost records rebuilt
The catch-up merge of a push whose mirror a crash cut short with settings
written meanwhile was two appends (External, then Merge), resumed by a purely
structural test that also fired on ordinary histories (two outside edits in
a row, a second index with an older mirror) and reverted the latest edit.
It is now one Merge version on the head in which the settings written
meanwhile (the settings in force, which older clients wrote) win where both
changed; the head's values stay in its version. A merge that adds nothing to
the head makes no version, so a cut before its mirror is finished next time
by the same index or a rebuilt one without any marker. The structural resume
is gone. An index meeting Main with a lagging record merges project.json the
same way, so a newer outside edit is no longer reverted by an older push.
Versions the catch-up records as mirrored are named in Main's record too
when project.json holds them, so records no longer lag behind externals.

Duplicate Main claimants (an index that met the sequence before Main's
record arrived) are settled from the records: the oldest claimant with a
version is Main in every index, the others are ordinary projects, and their
records say so when the archive takes writes.

A live project folder whose record is missing while the index holds the
project gets its record (and missing version files) written again from the
index instead of being held back forever. A record behind the index no
longer gives the index its old name. MirrorAsync reads the version leniently
and skips a newer one, as the other branches do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:56:51 +01:00
..