mirror of
https://github.com/block/buzz.git
synced 2026-11-08 18:31:56 +00:00
Paul's round-7.5 dispatch (unreviewed SHA: 4002067de3):
1. Backoff escalation dead code fixed: move drainRetryAttempt=0 reset inside the
success branch (drainRetryTimer===null after impl, i.e. no abort was scheduled).
Previously reset unconditionally on every pass return, so attempt stayed at 1
forever; escalation 1s→2s→4s…60s now engages on repeated failures.
2. ng=MAX_SAFE_INTEGER clamp-down: normalization now also clamps nextGen DOWNWARD
when parsed ng exceeds max(valid intent gens, valid receipt gens)+1. Previously
raised nextGen only; a corrupt ng=MAX_SAFE_INTEGER with low intent gens left
nextGen=MAX_SAFE_INTEGER, causing first enqueue to mint gen=MAX_SAFE_INTEGER and
the second enqueue to throw from the isSafeInteger guard.
5 new witnesses (Tests 55-59):
- Test 55: fake-scheduler, step-1 failure held across ≥2 timer firings; asserts
drainRetryTimer IDs (not first-scheduled entry) for delay 1s then 2s; verifies
attempt counter preserved across aborts and reset to 0 on success.
- Test 56: same-channel stale-receipt collision at MAX_SAFE_INTEGER ceiling —
ng=MAX_SAFE_INTEGER triggers rebase; replacement enqueue gets gen above all
retained receipt gens; frontier reaches 999.
- Test 57: ng=MAX_SAFE_INTEGER multi-enqueue — clamp-down fires; two enqueues
both receive safe distinct gens; both survive subsequent hydration.
- Test 58: thrown-handler witness — onDrainOutcome throws; transaction aborts;
gen1 restored live; bounded retry timer at 1s; next enqueue gets real gen (not
deferred placeholder), proving channel unlocked.
- Test 59: identity-swap — A deferred mid-transaction, B hydrates; B's enqueue
gets real gen and correct op (A's payload did not leak via clearTransactionState).
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