mirror of
https://github.com/block/buzz.git
synced 2026-10-31 14:31:02 +00:00
Addresses Paul's four C2 findings before C3. F1 (barrier bypass): register_owner_session/register_owner_bearer re-read the current generation at registration, so a capability derived from a losing identity could be stamped with the winning generation and survive the C5 barrier. Both now take &OwnerIdentityEgressLease as a compile-enforced witness and stamp lease.generation() via a shared register_durable() helper — a bump between admission and registration leaves a stale stamp that the first admit_exercise refuses (fail-closed). Huddle registers the session while the auth lease is still held (before the joined await, not spanning it). Corrects the DurableRegistry "same lock" and media.rs "no bump can slip" doc claims. Adds a red-then-green control: admit under gen N, drain bumps to N+1, register, exercise refuses. F3 (doctrine): the upload legacy retry re-attached the signed header without a second admit_exercise. Revalidate before the retry dispatch — two transmissions, two validations. F4 (scope): create_auth_event (frontend relay WS) now signs under a per-send bounded lease, gating reconnection against an in-flight drain. Frontend session REGISTRATION (capability + native-WS teardown) is explicitly deferred to C6/C7 with the frontend identity store. F2 (gates): split six files under the desktop file-size ratchet — never trimmed. owner_identity_egress.rs → directory module with the durable substrate in durable.rs; relay.rs/media.rs/identity.rs move test modules to sibling _tests.rs files; card.rs extracts the card-archive cluster to card/archive.rs and messages.rs the feed-item projection to messages/feed_item.rs. 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