mirror of
https://github.com/block/buzz.git
synced 2026-10-31 14:31:02 +00:00
Add the opportunistic prune worker for the local archive DB: it deletes kind-24200 observer-frame scope rows whose archived_at is older than observer_retention_days, cascading orphan GC to both derived indexes, and keeps every other kind forever. Triggers are startup + post-commit, detached from the archive write and collapsed by an in-process single-flight flag plus a >=24h archive_meta.prune_last_success_at gate into at most one scan per day. Candidate scope keys are materialized and fixed per batch transaction; the candidate-scoped GC cascades observer_channel_index (which the whole-scan GC does not cover) and agent_metric_index. The observer-index insert becomes a conditional INSERT ... SELECT so a stale backfill callback cannot resurrect an index row for a pruned event. The prune-candidate SQL constant is colocated with the worker so the EXPLAIN-shape test pins the shipped query. 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