Files
buzz/desktop/src-tauri
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 96b9b0aca1 fix(desktop): generation-gate barrier enforcement, import-identity barrier, reconcile Result propagation
Four pass-3 findings resolved:

1. CRITICAL — generation-gate the enforcement phase: added `is_current()` on
   `ReadinessClaim`; `run_boot_barrier_for_scope` now checks it while holding
   `managed_agents_store_lock` and returns `Abandoned` without writing if the
   claim is preempted. Stale relay evidence (e.g. `HeadState::Absent` re-opening
   a parked coordinate) can no longer reach `run_decision_pass`.

2. IMPORTANT — test (j): exercises the stale barrier's actual decision pass
   through the enforcement seam. Vacuity block confirms the stale evidence WOULD
   clear `publish_blocked` on an unguarded scratch db; enforcement seam shows
   the guard blocks the write on the real store.

3. IMPORTANT — `import_identity` now calls `force_claim_in_progress` and
   `spawn_event_sync_with_held_claim` after swapping keys, so the new owner's
   disk projections are enqueued and the barrier certifies the scope ready.
   Without this, config publication stopped silently until restart.

4. IMPORTANT — reconcile legs return `Result`: `migrate_personas_to_events`,
   `migrate_teams_to_events`, and `reconcile_agents_to_events` all return
   `Result<(), String>`; `run_event_sync` propagates with `?`;
   `spawn_event_sync_with_held_claim` drops the claim without completing when
   any leg fails, leaving the scope `Unready` for retry rather than certifying
   `Ready` after a partial reconcile.

All four fixes are in `desktop/src-tauri` only. 2111 tests pass, clippy -D warnings
clean, cargo fmt clean, just desktop-check green.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-01 14:09:31 -04:00
..