refactor(db): move relay membership store ownership - #6804
Draft
TheSentinel454 wants to merge 1 commit into
Draft
Conversation
TheSentinel454
force-pushed
the
codex/issue-2-relay-members-store
branch
from
August 25, 2026 20:07
1492465 to
245c08f
Compare
TheSentinel454
force-pushed
the
codex/issue-2-relay-members-store
branch
from
August 25, 2026 20:59
245c08f to
75a5146
Compare
TheSentinel454
force-pushed
the
codex/issue-2-relay-members-store
branch
from
August 26, 2026 14:33
75a5146 to
bdab285
Compare
Signed-off-by: OpenAI Codex <codex@openai.com>
TheSentinel454
force-pushed
the
codex/issue-2-relay-members-store
branch
from
August 26, 2026 15:53
bdab285 to
349a3d9
Compare
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.
Current reconstructed head
Exact base:
codex/issue-2-workflow-runs-approval-storeat1db9c199a2e0029e38228a9bf9ecb78d8d61ab16Exact head:
codex/issue-2-relay-members-storeat349a3d9bff5a9b292ef61fea1705f155ea1c405dThis current head removes
crates/buzz-db/tests/store_ownership.rs; no replacement path-sensitive ownership test is introduced. Apart from removing that complete test-file diff, the production patch is byte-for-byte identical to the previously reviewed slice. This remains part of tracker #2 and the #17/#19 acceptance work.Independent exact-head review from a separate clean Blox workstation found no issues. Current-head evidence passed formatting, strict
buzz-dbclippy, 111 non-PostgreSQL library tests with 200 PostgreSQL tests ignored, the observability source test, relay consumer compilation, exact ownership/unique-span review checks, and 10 relay-membership PostgreSQL tests on native PostgreSQL where applicable.Summary
Continue tracker #2 by making
relay_members.rsown the relay-membership persistence boundary. The roster records, SQL, allowlist backfill, and focused PostgreSQL tests already lived there; this child moves the remainingDbAPIs and datastore spans out oflib.rs, including the bounded routed membership read and the locked NIP-43 snapshot reconciliation/publication operations.has_admin_or_ownerwas the one pre-existing unspanned facade; it now has a fixed-name, no-cardinality datastore span.Stack
Domain moved
is_relay_memberorchestration, preserving the writer fallback and route metrics exactlycrates/buzz-db/src/lib.rsfalls from 4,621 to 4,259 lines.Non-goals
Risk
Moderate review surface, low semantic risk. Existing SQL helpers and focused tests remain byte-for-byte in
relay_members.rs; the facade methods and NIP-43 orchestration moved intact. The bounded permission-read routing and NIP-43 transaction/advisory-lock timing are unchanged. The only additive instrumentation is the missing fixed-namehas_admin_or_ownerspan required by #19; it adds no dynamic labels or sensitive fields.Blox verification
Author workstation:
buzz-tornquist-issue-2-store-stack(2046520), exact head14924657e84d5d516fb0022e0681cbe18391ea77.cargo fmt --all --checkgit diff --check c74438e849c57d4840122d674edf1a989a54d37c..HEADcargo clippy -p buzz-db --all-targets -- -D warningscargo clippy -p buzz-relay --all-targets -- -D warningscargo test -p buzz-db --lib: 108 passed, 200 ignoredcargo test -p buzz-db --test observability_source: 1 passedBUZZ_MAX_COMMUNITIES_PER_OWNER=3. No behavior/test correction is included in this pure-move PR.cargo test -p buzz-relay --lib: 909 passed, 48 ignoredIndependent exact-head Blox review: no findings. Review artifacts were preserved before teardown.
Remaining tracker work
Next: relay invites, followed by moderation/product feedback, git registry and archived identities, usage/admin/maintenance, deletion ownership, and the final runtime-boundary audit.
Superseded pre-comment restack verification
PR #6700 merged before publication completed. This layer was restacked onto current main through the exact parent named above; the final cumulative tip is 2ddcc8a. Cumulative author gates passed: formatting and diff checks; buzz-db and buzz-relay all-target clippy with -D warnings; DB lib 111 passed / 200 ignored; ownership 22/22; observability 1/1; the full isolated PostgreSQL domain matrix; and relay lib 910 passed / 49 ignored.
Outcome
No actionable findings.
Reviewed exact direct-parent range
acbcc4abe1a9ab035eb9ffcf87a3d380d5ce1b6e..245c08f24df4e77c0e8486f9aa7abcc70d784e7bon fresh Blox workstationbuzz-tornquist-pr-6804-final-review(ID2057733). Relay membership wrappers, membership records, NIP-43 reconciliation/publication orchestration, SQL ownership, and spans are co-located inrelay_members.rs. The bounded permission route and writer fallback are preserved. The NIP-43 transaction timer still observes the entire lock/read/build/write/commit-or-rollback lifecycle, with the membership advisory-lock metric unchanged. The cross-cutting route proof remains inlib.rs.has_admin_or_ownerreceives its required single fixed-name datastore span; no SQL or client-visible semantics change.Verification
No code edits or external mutations were made. Buzz relay credentials/ownership reporting were unavailable under the documented fallback. The workstation was deleted after artifact transfer.
Artifacts
ae343c6cd3b07a1f4fcbc87e7d6c32cec0d9d2c7e5155e446e18183637e1047e1e176f227c9d451e48f7df57b0161806953560a490164dc4839719fa9bac65d3b51336e789070f8fd3a3dde4492ace58a8f2e3a1f634155a3a32e23c03f5bb95Comment-addressed restack
Review follow-up on #6777 removed only the low-value replaceable ownership source test. This PR was restacked onto its rewritten parent; its production patch is unchanged.
723b40d924744483328cf436f8d946e8176e3aba75a5146da1e7886e7ad7e5a957e56288d42e8d616fa2f104d42c6ba85bdf62e7ccb74ceaf4a84f67buzz-db/buzz-relayClippy; DB lib 111 passed / 200 ignored; ownership 21/21; observability 1/1; every moved PostgreSQL test; relay lib 910 passed / 49 ignored.buzz-dbClippy, current ownership/observability guards, relay-members tests (2 unit plus 10 PostgreSQL), and relay compilation.