mirror of
https://github.com/block/buzz.git
synced 2026-11-11 20:01:09 +00:00
Three test-correctness fixes, no production logic changes: 1. test_retain_agent_record_user_intent_clears_gate_but_reconcile_does_not: The interactive-save call previously used the same record (unchanged content), so the early-return branch fired and set_publish_blocked(false) cleared the gate before the retain_user_intent_event path was reached. Reverting the changed-content branch to retain_event left the test green. Added Case B: interactive save with a different system_prompt, which exercises the retain_user_intent_event path directly. Also added Case D: reconcile with changed content, confirming retain_event does not clear the gate. Now all four combinations (same/changed × user/reconcile) are verified. 2. test_non_persona_tombstone_user_intent_clears_gate: Previously called retain_user_intent_event directly — reverting tombstone_managed_agent_pending to retain_event left zero test callers on the production path, so the suite stayed green. Extracted tombstone_agent_pending_inner from commands/agents.rs into managed_agents/reconcile.rs (pub(crate), symmetric with retain_agent_record) and rewired tombstone_managed_agent_pending to call it. Test now drives the seam directly. Pre-seeds the tombstone coordinate with publish_blocked=true so retain_event (which leaves the existing value) and retain_user_intent_event (which calls set_publish_blocked(false)) produce distinguishable outcomes. Mutation at the production call site now fails the suite. 3. test_mark_synced_and_stamp_baseline_atomic_both_written_on_success: Previously tested the success path only. Added Case B: drops the persona_baselines table before the call, forces the baseline INSERT to fail, and asserts the call errors AND pending_sync is still 1 (transaction rolled back). If the function is split back into two autocommit statements, the UPDATE commits first and pending_sync becomes 0 before the INSERT fails — the rollback assertion catches the regression. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
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 frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm 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