Anonymous subscriptions to reports and requests #11

Merged
Breadway merged 3 commits from feature/bug-20-subscriptions into main 2026-10-12 09:52:49 +08:00
Owner

Part of BUG-EP1, implements breadboard issue BUG-20 (anonymous subscriptions). Stacked on the BUG-19 branch.

POST /v1/reports/{receipt}/follow subscribes an install to the cluster behind a report (no account, receipt is the capability, follow token returned). DELETE /v1/follows/{token} unsubscribes. One follow per install per cluster, tokens stored hashed only, merges fold followers into the target, ungrouped reports get 409, banned installs get 403. Admin cluster page shows follower count.

Verified: cargo test (all suites green, 6 new tests in tests/follow.rs), cargo clippy with -D warnings clean, cargo fmt clean.

Closes BUG-20

Part of BUG-EP1, implements breadboard issue BUG-20 (anonymous subscriptions). Stacked on the BUG-19 branch. POST /v1/reports/{receipt}/follow subscribes an install to the cluster behind a report (no account, receipt is the capability, follow token returned). DELETE /v1/follows/{token} unsubscribes. One follow per install per cluster, tokens stored hashed only, merges fold followers into the target, ungrouped reports get 409, banned installs get 403. Admin cluster page shows follower count. Verified: cargo test (all suites green, 6 new tests in tests/follow.rs), cargo clippy with -D warnings clean, cargo fmt clean. Closes BUG-20
feat: anonymous subscriptions to reports and requests
All checks were successful
check / check (push) Successful in 1m3s
4157963532
Follow the cluster behind any grouped report with POST
/v1/reports/{receipt}/follow (install header required, ban checked,
network rate limited) and stop with DELETE /v1/follows/{token}.
Follows are one per install per cluster, tokens stored hashed, and
merge folds followers into the target. Ungrouped reports get 409 so
clients can retry after triage. The admin cluster page shows the
follower count.
fix: reporter follow auth, recoverable follow token, merge aliases
All checks were successful
check / check (push) Successful in 1m1s
6b35801a28
Address review on the anonymous subscriptions slice:
- follow has two authorized flows: the reporter proves themselves with the
  report's deletion token in the Authorization header (no install id
  needed), and any other subscriber proves themselves with their install id
  (the separate non-reporter flow). A wrong token with no install is 403
- a retry now rotates the caller's follow token and returns a usable one,
  so a lost first response is recoverable under install-scoped idempotency;
  no other install's token is ever revealed
- merging clusters keeps every capability token as an alias on the target
  (the unique-per-install index is dropped, idempotency is enforced by
  rotating), and the follower count counts distinct installs
- tests: reporter auth, wrong-token fallback, lost-response recovery,
  merge aliases with each token unsubscribing, distinct-install counting
Breadway force-pushed feature/bug-20-subscriptions from b2859bbc1f
All checks were successful
check / check (push) Successful in 1m33s
to 098e90cd1f
All checks were successful
check / check (push) Successful in 1m6s
2026-10-12 09:21:56 +08:00
Compare
Breadway changed target branch from feature/bug-19-request-intake to main 2026-10-12 09:52:48 +08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadbug-server!11
No description provided.