pingqiuandClaude Opus 5.5 7b7877e16f storage: reconciliation is owned by a generation; a BASE install supersedes a running worker
Every reconciliation start and every BeginBaseInstall bumps a generation.
A worker selects slices, records compare results and certifies the dirty
set only while its own generation is current, so:
- a worker running when a BASE install begins can no longer finish over
  it and clear the install guard (Base=Installing), in memory or on disk;
  finishReconcile also refuses while the guard is set (two independent
  guards);
- a worker that saw its set empty, or compared a chunk, before a BASE
  install restarted reconciliation can neither certify the replacement
  run nor delete from its set.
A replaced run closes its channel, and waitReconciled re-checks against
the current run.

Deterministic schedules (test hook at slice, compare and certify):
- held worker -> BeginBaseInstall -> worker resumes: cuts stay refused
  as base_installing, the persisted header keeps Installing, a restart
  still refuses;
- old worker paused at certify -> Begin/EndBaseInstall -> old resumes:
  the replacement stays reconciling and untouched, cuts refused;
- old worker paused after a compare -> Begin/End -> old resumes: the
  replacement set is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 12:31:49 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%