You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f3e9fa
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,26 +73,26 @@ confirmation, not app runs.
73
73
- Agents post reviews as comments, never Request Changes. Humans decide which
74
74
findings must be fixed.
75
75
76
+
## Open-source boundary
77
+
78
+
This repository is public and contains the relay, NIP specifications, legacy desktop app, and mobile clients. Never commit values that only make sense inside Block: the employee-only bb-block community and its hosts (`block.builderlab.xyz`, `buzz.block.builderlab.xyz`, `*.communities.block.xyz`), private GitHub organizations or repositories, organization-specific SSH users, internal hosts, cloud accounts, IAM roles or buckets, internal ticket keys, `go/` links, internal Slack channels, or real employees' names and personal setups. Public Builderlab (`app.builderlab.xyz`, `*.communities.builderlab.xyz`) is supported and fine.
79
+
80
+
Distributor-specific values belong in the relevant release configuration: build-time settings for clients and deployment configuration for the relay. If a setting is missing, add a generic one; never hardcode a Block-only value or special-case a host or organization.
81
+
82
+
The rule covers functionality, not only identifiers. Every feature here must be generic: useful to any operator or distributor, with no knowledge of one company's internal services, workflows or identity setup. Functionality that only serves Block lives in Block's private repositories (release builds, deployment configuration, private plugins) and reaches this code only through generic settings or documented extension points that never name, detect or special-case a specific organization, plugin or service. Review judges a change's purpose and approach, not just its strings.
83
+
84
+
Tests, fixtures, docs, and examples use example values (`example.org`, `example-org`, fictional names).
85
+
86
+
Reviewers treat a violation as a blocking finding.
87
+
76
88
## Ecosystem
77
89
78
-
Buzz spans six repos. This one (`block/buzz`) is the OSS source for the relay, mobile, CLI, and the deprecated Buzz 0.X desktop app. [block/buzz-app](https://github.com/block/buzz-app) is the OSS source for the Buzz 1.0 desktop and web app. The others handle internal builds and deployment:
90
+
This repository (`block/buzz`) is the OSS source for the relay, mobile, CLI, and the deprecated Buzz 0.X desktop app. [block/buzz-app](https://github.com/block/buzz-app) is the OSS source for the Buzz 1.0 desktop and web app. Block's internal builds and deployments live in private repositories.
|[block/buzz-app](https://github.com/block/buzz-app)| OSS source — Buzz 1.0 desktop and web app; all new desktop feature work |
84
-
|[squareup/buzz-releases](https://github.com/squareup/buzz-releases)| Buildkite pipelines producing Block-signed macOS + iOS builds with `-block` desktop version suffix |
85
-
|[squareup/sprout-oss](https://github.com/squareup/sprout-oss)| CI pipeline building the relay Docker image and pushing to internal ECR |
86
-
|[squareup/block-coder-tf-stacks](https://github.com/squareup/block-coder-tf-stacks)| Terraform + ArgoCD deploying the relay to the staging Kubernetes cluster |
87
-
|[squareup/sprout-backend-blox](https://github.com/squareup/sprout-backend-blox)| Desktop backend provider script connecting Blox workstation agents to the relay |
88
-
89
-
```
90
-
block/buzz (source)
91
-
├─► buzz-releases (desktop + mobile builds → Artifactory, GitHub, Mobile Releases)
The subscriber uses a **dedicated**`redis::aio::PubSub` connection — not from the pool. This is intentional: pool connections cannot hold `PSUBSCRIBE` state.
552
552
553
-
**Current state:** The subscriber loop is spawned in `buzz-relay/src/main.rs` and populates the broadcast channel. A consumer task subscribes via `pubsub.subscribe_local()`, calls `sub_registry.fan_out()` on each received event, and delivers matches to local WebSocket connections via `conn_manager.send_to()`. Multi-node fan-out is now wired end-to-end. Local-echo deduplication is implemented via `AppState.local_event_ids` — events published by the local relay instance are tracked and skipped when received via the Redis round-trip.
553
+
**Current state:** The subscriber loop is spawned in `buzz-relay/src/main.rs` and populates the broadcast channel. A dispatcher task subscribes via `pubsub.subscribe_local()` and routes each event to one of 16 delivery workers by `(community, topic)`, so one channel's events keep their order while channels deliver concurrently (`handlers/multinode_fanout.rs`). Each worker calls `sub_registry.fan_out()`, applies the access gate, and delivers matches to local WebSocket connections via `conn_manager.send_to()`. Live delivery never drops an event silently: when a worker's bounded queue is full, or an event is not delivered within 2 s of this node reading it from Redis, that event's local recipients get `CLOSED "resync: ..."` for syncs, are fenced from every further live EVENT frame as soon as the loss is detected (so a client's resume cursor stops moving), and are closed so clients catch up from their cursor; when the dispatcher itself lags the broadcast, every subscribed connection is treated the same way. Only the fence is immediate: closes are paced (at most 5,000/s per node) so a loss cannot become a reconnect storm. Clients resume from the newest `created_at` they received minus 5 s, so a closed client replays a missed event only while the 2 s deadline plus the event's writer clock skew and publish delay stays under that 5 s; an ordinary reconnect has the same limit. A dispatcher that falls behind without overflowing the broadcast detects a loss late, and dispatcher lag loses events it never sees; neither is bounded by the deadline. Multi-node fan-out is now wired end-to-end. Local-echo deduplication is implemented via `AppState.local_event_ids` — events published by the local relay instance are tracked and skipped when received via the Redis round-trip.
554
554
555
555
**Reconnection:** exponential backoff 1s → 30s (`backoff_secs * 2`). Backoff resets to 1s only after a clean stream end, not on each reconnect attempt.
556
556
@@ -579,6 +579,12 @@ multi-community mode every query filter includes `community_id`, so the shared
579
579
`events` table is infrastructure, not a cross-community result space; the relay
580
580
re-authorizes every candidate hit before returning it.
581
581
582
+
A database built from `migrations/0008_fresh_install_search_allowlist.sql` indexes
583
+
only an allowlist of kinds, and so does one converted by
584
+
`scripts/maintenance/nip_rs_search_allowlist.sql`. Such a database does not index
585
+
kind 30180 (custom emoji entries) until an operator runs the updated maintenance
586
+
script, which must happen before the emoji migration rollout.
587
+
582
588
**Key behaviors:**
583
589
-`SearchService::new(pool)` wraps a `PgPool`; `search(&SearchQuery)` runs a
584
590
parameterized FTS query against the `events.search_tsv` GIN index and returns
Copy file name to clipboardExpand all lines: CONTEXT.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Buzz domain language
2
2
3
-
Shared terminology for Buzz product behavior. This glossary currently covers mobile [push suppression](#push-suppression); it is not a complete model of Buzz.
3
+
Shared terminology for Buzz product behavior. This glossary currently covers mobile [push suppression](#push-suppression) and [mobile builds](#mobile-builds); it is not a complete model of Buzz.
4
4
5
5
## Notifications
6
6
@@ -51,3 +51,17 @@ A [suppression activity signal](#suppression-activity-signal) that extends how l
51
51
### Inactivity cutoff
52
52
53
53
The time of the last observed [desktop activity](#desktop-activity) plus the duration specified in the spec, when [desktop inactivity](#desktop-inactivity) begins. New desktop activity moves this cutoff forward.
54
+
55
+
## Mobile builds
56
+
57
+
### Internal build
58
+
59
+
A mobile app an organization distributes only to its own members, for example through device management. It uses only that organization's Builderlab and reaches only that organization's community.
0 commit comments