Files
buzz/desktop
Duncan 5bdd313aee fix(personas): address Carl/Wes review — publication recovery, refresh lock, linked identity effects
Three correctness fixes from review 5070974257:

P1-1 (combined saves bypass publication recovery): settle publication
independently at the definition boundary before advancing to I/L writes.
When the publish command throws after persona persist and I/L writes remain,
attempt the publish-only retry immediately — not at final settlement where the
!observedRemainder gate suppresses it. On retry success, clear publishFailed
and continue the same save. On retry failure (or no seam), set firstError to
block I/L advancement with a clear publication-failure reason; the
partial-failure toast names both D (saved) and the I/L remainder (not saved).
Definition-only saves retain the existing final !observedRemainder && publishFailed
path unchanged. New family-12 TS tests cover D+I and D+L combined save with
retry success, retry failure, and no-seam cases; mutation (restoring the
original !observedRemainder gate) turns all four RED.

P1-2 (unlocked retry refresh can undo explicit unshare): serialize
refresh_for_persona_at inside a managed_agents_store_lock scope in
publish_and_refresh_teams_at, acquired after the network await and held for
the synchronous refresh. Without the lock a concurrent set_team_shared(false)
can retain an unshared head that the unlocked refresh overwrites at the same
monotonic timestamp. Adds REFRESH_LOCK_OBSERVER (cfg(test)) matching the
PRE_GUARD_OBSERVER pattern; new test asserts try_lock() fails while the
refresh runs — removing the lock scope causes try_lock() to succeed, turning
the test RED.

P2 (successful publish-only retry hides skipped linked identity effects):
capture retain_result without ? in update_persona_with, complete linked
managed-agent name/avatar propagation and save_managed_agents, then propagate
the retain error. Before the fix, a strict publication failure after
save_personas skipped propagate_persona_name_rename and save_managed_agents
entirely; a subsequent publish-only retry published the persona but linked
instances retained stale names/avatars. New Rust regression seeds a persona
+ linked instance, induces a retain failure, and asserts the linked agent's
name was updated before the error propagated; restoring retain()?  before
the propagation block turns the test RED.

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-09-01 10:23:53 -04:00
..
…

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition