fix(admin): allow cold storage worker DB startup - #7770
Merged
Merged
Conversation
Signed-off-by: Ravneet Arora <rarora@squareup.com>
🔐 Codex Security Review
|
Signed-off-by: Ravneet Arora <rarora@squareup.com>
Contributor
Author
|
@buzz-security-review aa200bb |
bradseiler
approved these changes
Sep 22, 2026
wpfleger96
pushed a commit
that referenced
this pull request
Sep 22, 2026
…-history * origin/main: fix(admin): allow cold storage worker DB startup (#7770) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96
pushed a commit
that referenced
this pull request
Sep 22, 2026
…c-agent-commit-identity * origin/main: fix(desktop): bound startup request bursts and recover quota refusals (#7790) fix(audit): frame hash inputs with TLV (#7492) fix(admin): allow cold storage worker DB startup (#7770) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
brow
added a commit
that referenced
this pull request
Sep 22, 2026
…-dev * origin/main: fix(desktop): bound startup request bursts and recover quota refusals (#7790) fix(audit): frame hash inputs with TLV (#7492) fix(admin): allow cold storage worker DB startup (#7770) feat(relay): add admin HTTP routes for member restriction management (#7302) fix(relay): fire kick live side effects at convergence; persist target; fence re-add race with held lock (#7298) feat(relay): add atomic complete read-state snapshots (#7572) fix(desktop): register macOS badges for new and existing installs (#7783) fix(mobile): avoid opening empty threads on message tap (#7756) fix(workflows): make deletion persistent and retryable (#7735) fix(mobile): preserve thread replies through refresh failures (#7757) fix(mobile): keep iOS message menu actions responsive after rebuilds (#7758) fix(relay): exclude ephemeral activity from message quota (#7736) release: push gateway chart 0.3.1 (#7749) fix(push): label plaintext push gateway service as HTTP (#7717) Replace personal and internal data in desktop test fixtures (#7748) Add mobile VISION (#7710) fix(mobile): keep relay sessions stable during push lease updates (#7745) Signed-off-by: Tom Brow <tomb@block.xyz>
wpfleger96
pushed a commit
that referenced
this pull request
Sep 22, 2026
…n-surface * origin/main: docs(nip-fi): clarify federated identity amendments (#7803) fix(desktop): refresh channels after access-revoked closure (#7784) fix(desktop): bound startup request bursts and recover quota refusals (#7790) fix(audit): frame hash inputs with TLV (#7492) fix(admin): allow cold storage worker DB startup (#7770) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96
pushed a commit
that referenced
this pull request
Sep 22, 2026
…-hardening * origin/main: docs(nip-fi): clarify federated identity amendments (#7803) fix(desktop): refresh channels after access-revoked closure (#7784) fix(desktop): bound startup request bursts and recover quota refusals (#7790) fix(audit): frame hash inputs with TLV (#7492) fix(admin): allow cold storage worker DB startup (#7770) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96
added a commit
that referenced
this pull request
Sep 22, 2026
NIP-FI admin disconnect/deny API implementation, rebased onto origin/main (c213d90) after main advanced past the original merge-base (77729ab). No buzz-relay production code changed by main's 3 new commits (#7770, #7492, #7790) — rebase is conflict-free. Squash of all commits from 2a42ddf through 360150d97: Production: - Deny-map JWT verifier and command installer (S4) - Disconnect endpoint and route wiring - Admin HTTP routes for deny/undeny, expiry TTL - WS connection admission: deny-map check wired in - Audio pre-writer send bounding (1s timeout policy) - nip_fi_session.rs: bounded pre-registration pairing sends - handler.rs MINOR: Ok(Ok(())) success check replaces is_err() Witnesses (Thufir round-5 required corrections): - R2: drain_terminal!() race witness (before_not_a_member_drain_terminal hook + cancel_race_test_hook; falsification: remove lifecycle_cancel() → frame-1 timeout RED) - F3: real admission → 48101 JOIN wire bytes → handle_huddle_liveness_req oracle → authoritative generation == wire generation - F4: valid future deadline + cancel-while-held (not already-expired); falsification: already-expired → hook timeout RED - F5: {"kinds":[13534]} REQ skips DB lookup, reaches after_req_permit_acquired; AUTH OK(true) check; real Postgres+Redis pools; canonical denial frame + 1008 close; zero global+channel refcounts asserted - F6: ENV_TEST_MUTEX synchronization for Config::from_env() - F7: 10s bounded consumer threads; entry-hook Drop guards - R1: reason-published/before-enqueue witness - F1/F2: LifecycleClosed transition primitives Evidence inventory corrections per Thufir's requirement: root raw cancels follow pairing_deny_terminal/auth_deny_terminal; audio pre-registration pairing sends direct denial/close; post-registration deny-set/expired paths send directly then raw-cancel; wrapper cancellation exists before AND after run(control).await. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Sep 22, 2026
NIP-FI admin disconnect/deny API implementation, rebased onto origin/main (c213d90) after main advanced past the original merge-base (77729ab). No buzz-relay production code changed by main's 3 new commits (#7770, #7492, #7790) — rebase is conflict-free. Squash of all commits from 2a42ddf through 360150d97: Production: - Deny-map JWT verifier and command installer (S4) - Disconnect endpoint and route wiring - Admin HTTP routes for deny/undeny, expiry TTL - WS connection admission: deny-map check wired in - Audio pre-writer send bounding (1s timeout policy) - nip_fi_session.rs: bounded pre-registration pairing sends - handler.rs MINOR: Ok(Ok(())) success check replaces is_err() Witnesses (Thufir round-5 required corrections): - R2: drain_terminal!() race witness (before_not_a_member_drain_terminal hook + cancel_race_test_hook; falsification: remove lifecycle_cancel() → frame-1 timeout RED) - F3: real admission → 48101 JOIN wire bytes → handle_huddle_liveness_req oracle → authoritative generation == wire generation - F4: valid future deadline + cancel-while-held (not already-expired); falsification: already-expired → hook timeout RED - F5: {"kinds":[13534]} REQ skips DB lookup, reaches after_req_permit_acquired; AUTH OK(true) check; real Postgres+Redis pools; canonical denial frame + 1008 close; zero global+channel refcounts asserted - F6: ENV_TEST_MUTEX synchronization for Config::from_env() - F7: 10s bounded consumer threads; entry-hook Drop guards - R1: reason-published/before-enqueue witness - F1/F2: LifecycleClosed transition primitives Evidence inventory corrections per Thufir's requirement: root raw cancels follow pairing_deny_terminal/auth_deny_terminal; audio pre-registration pairing sends direct denial/close; post-registration deny-set/expired paths send directly then raw-cancel; wrapper cancellation exists before AND after run(control).await. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Sep 22, 2026
NIP-FI admin disconnect/deny API implementation, rebased onto origin/main (c213d90) after main advanced past the original merge-base (77729ab). No buzz-relay production code changed by main's 3 new commits (#7770, #7492, #7790) — rebase is conflict-free. Squash of all commits from 2a42ddf through 360150d97: Production: - Deny-map JWT verifier and command installer (S4) - Disconnect endpoint and route wiring - Admin HTTP routes for deny/undeny, expiry TTL - WS connection admission: deny-map check wired in - Audio pre-writer send bounding (1s timeout policy) - nip_fi_session.rs: bounded pre-registration pairing sends - handler.rs MINOR: Ok(Ok(())) success check replaces is_err() Witnesses (Thufir round-5 required corrections): - R2: drain_terminal!() race witness (before_not_a_member_drain_terminal hook + cancel_race_test_hook; falsification: remove lifecycle_cancel() → frame-1 timeout RED) - F3: real admission → 48101 JOIN wire bytes → handle_huddle_liveness_req oracle → authoritative generation == wire generation - F4: valid future deadline + cancel-while-held (not already-expired); falsification: already-expired → hook timeout RED - F5: {"kinds":[13534]} REQ skips DB lookup, reaches after_req_permit_acquired; AUTH OK(true) check; real Postgres+Redis pools; canonical denial frame + 1008 close; zero global+channel refcounts asserted - F6: ENV_TEST_MUTEX synchronization for Config::from_env() - F7: 10s bounded consumer threads; entry-hook Drop guards - R1: reason-published/before-enqueue witness - F1/F2: LifecycleClosed transition primitives Evidence inventory corrections per Thufir's requirement: root raw cancels follow pairing_deny_terminal/auth_deny_terminal; audio pre-registration pairing sends direct denial/close; post-registration deny-set/expired paths send directly then raw-cancel; wrapper cancellation exists before AND after run(control).await. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Sep 23, 2026
NIP-FI admin disconnect/deny API implementation, rebased onto origin/main (c213d90) after main advanced past the original merge-base (77729ab). No buzz-relay production code changed by main's 3 new commits (#7770, #7492, #7790) — rebase is conflict-free. Squash of all commits from 2a42ddf through 360150d97: Production: - Deny-map JWT verifier and command installer (S4) - Disconnect endpoint and route wiring - Admin HTTP routes for deny/undeny, expiry TTL - WS connection admission: deny-map check wired in - Audio pre-writer send bounding (1s timeout policy) - nip_fi_session.rs: bounded pre-registration pairing sends - handler.rs MINOR: Ok(Ok(())) success check replaces is_err() Witnesses (Thufir round-5 required corrections): - R2: drain_terminal!() race witness (before_not_a_member_drain_terminal hook + cancel_race_test_hook; falsification: remove lifecycle_cancel() → frame-1 timeout RED) - F3: real admission → 48101 JOIN wire bytes → handle_huddle_liveness_req oracle → authoritative generation == wire generation - F4: valid future deadline + cancel-while-held (not already-expired); falsification: already-expired → hook timeout RED - F5: {"kinds":[13534]} REQ skips DB lookup, reaches after_req_permit_acquired; AUTH OK(true) check; real Postgres+Redis pools; canonical denial frame + 1008 close; zero global+channel refcounts asserted - F6: ENV_TEST_MUTEX synchronization for Config::from_env() - F7: 10s bounded consumer threads; entry-hook Drop guards - R1: reason-published/before-enqueue witness - F1/F2: LifecycleClosed transition primitives Evidence inventory corrections per Thufir's requirement: root raw cancels follow pairing_deny_terminal/auth_deny_terminal; audio pre-registration pairing sends direct denial/close; post-registration deny-set/expired paths send directly then raw-cancel; wrapper cancellation exists before AND after run(control).await. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The standalone S3 accounting worker can exit before its scan begins because database startup inherits the relay’s three-second connection budget. A cold DNS probe took about five seconds.
Give
buzz-admin storage-snapshotits own pool: one connection, no minimum idle connections, and a 30-second acquisition budget. Retry startup timeouts and transport failures at most twice, after two and five seconds. Total startup wait is bounded to 97 seconds. Configuration, authentication, TLS, and protocol errors fail immediately.Log each startup attempt’s elapsed time and error category without connection credentials. Relay defaults stay unchanged. Retries stop before lock acquisition; the same lock-owning database session still publishes the completed snapshot.
Related issue
Follow-up to #7543. No duplicate startup fix found.
Testing
Archived-command check: built a nextest archive, temporarily moved
target/debug/buzz-adminout of the checkout, and ranscripts/postgres-test-run.sh --archive-file <archive>. Both tests failed before the path fix and passed afterward. The tests use nextest’s relocated executable path, with the original Cargo path retained for local runs.Manually restored the old startup call and ran
scripts/postgres-test-run.sh -p buzz-admin --test postgres_storage_snapshot -E 'test(storage_snapshot_retries_then)'. It failed before reaching S3; restoring the fix passed. This confirms the test exercises the actual worker command.Local
just cipassed all stages before mobile tests, which stopped at SDK discovery in theobjective_cnative hook. The default Xcode tools report an unaccepted license. Two existing PostgreSQL tests hit connection timeouts in the parallel run and passed individually.After merge, build a worker image and repeat the cold-pod staging smoke test through snapshot publication before changing relay metrics mode.
Generated with Codex