feat(admin): add community archive commands - #7107
Conversation
🔐 Codex Security Review
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66653d52e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
954b85a to
10097b9
Compare
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
10097b9 to
c9190f5
Compare
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 Combined review at c9190f52447b65673862a7cc63efcdde5a2a32c5. The lifecycle guards, idempotency, archive-transition fence, row locking, rolling-deployment compatibility, and negative command paths look sound. Current-head CI is green. I found one user-visible blocker in live verification and one test-wiring gap:
-
IMPORTANT / Correctness — archive closes connected clients with the false reason
community deleted. A release-built relay accepted a WebSocket connection to the active community, andbuzz-admin communities archivethen persisted the archive and published its fenced disconnect successfully. The client received close code1008with reasoncommunity deleted, even though the same community could immediately be restored withunarchive. That tells clients a reversible state transition was permanent destruction. Please carry the lifecycle cause throughConnControl/CommunityConnectionControl, use an archive-specific close reason for archive-triggered disconnects, and retaincommunity deletedonly for permanent deletion. Add a user-visible regression that asserts the close reason for both transitions while preserving old/new payload compatibility during rolling deployment. -
MINOR / Correctness — the two exact archive-fencing regressions are not executed by CI.
archive_disconnect_fence_tracks_the_exact_archive_transitionandinactive_community_fence_holds_the_row_lock_through_disconnectare ignored PostgreSQL tests, but noBackend Integrationfilter in.github/workflows/ci.ymlselects them. The green job therefore does not prove these race fences. Please add exactbuzz-dbselectors so both run in CI.
The rest of the live matrix passed: archive persistence and fresh-connection rejection, idempotent re-archive, unarchive and immediate reconnect, stale delayed-command rejection after unarchive, owner/host/deployment-community guards, and retryable propagation evidence for zero subscribers or unavailable Redis.
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Why
Operators need reversible community archive and restore controls without entering the destructive deletion workflow, while retaining exact host, current-owner, and deployment-community safety guards.
What
buzz-admin communities archiveandbuzz-admin communities unarchiveas single-operator commands with required operator identity and reason evidenceConnControl::DisconnectCommunityafter archive onlyRisk Assessment
Moderate: this operator-only CLI changes community admission state and archive sends a live disconnect command. Exact host/current-owner matching, a protected deployment-host guard, idempotent mutations, and reversible unarchive constrain the blast radius.
References
docs/plans/2026-08-31-buzz-admin-community-archive.mdGenerated with Codex