refactor(db): move feed store ownership - #6794
Draft
TheSentinel454 wants to merge 1 commit into
Draft
Conversation
TheSentinel454
force-pushed
the
codex/issue-2-feed-store
branch
from
August 25, 2026 20:06
a3df858 to
ecd1755
Compare
TheSentinel454
changed the base branch from
codex/issue-2-reaction-store
to
codex/issue-2-feed-roster-test-fixtures
August 25, 2026 20:12
Signed-off-by: tornquist <tornquist@squareup.com>
TheSentinel454
force-pushed
the
codex/issue-2-feed-store
branch
from
August 25, 2026 20:59
ecd1755 to
3062146
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.
Why
Continue tracker #2 by moving home-feed persistence wrappers beside the feed SQL while preserving the parent runtime/read-routing boundary. This child stacks on #6792.
What
DbAPIs and datastore spans intofeed.rs: mentions, needs-action, and activity, each with direct and routed variantsroute_read,RoutePredicate/RouteDecision, replica fence/session infrastructure, and the cross-domain routed tenant-confinement test inlib.rsfeed.rsStack
Non-goals
lib.rsPgExecutormigration, raw pool accessor, new crate, or directory-wide reorganizationRisk Assessment
Low. The six wrappers moved intact with module qualification only. Each routed path still uses
RoutePredicate::Bounded, the same reader connection helper, identical route metric labels, and the same writer fallback. Three PostgreSQL query tests and the cross-domain routed confinement test cover tenant/visibility behavior; the ownership guard protects the runtime/store split and one-span rule.Blox Verification
Author workstation:
buzz-tornquist-issue-2-store-stack(2046520), exact heada3df858458d5cebb515ae1bc10135a165e5b4758.query_feed_mentionsremained inlib.rs; passed after the movecargo fmt --all --checkandgit diff --check— passedcargo clippy -p buzz-db -p buzz-relay --all-targets -- -D warnings— passedcargo test -p buzz-db --quiet— 108 passed, 200 ignored; observability and all nine ownership guards passedrouted_reads_are_confined_to_the_requested_community— passed, covering all three routed feed wrappersinsert_mentions_indexes_rosters_past_bind_parameter_capfixture fails because migration 32 rejects its synthetic kind-39002 p-tags; the exact same failure was reproduced at parent headf614cc212c70c91aacd5e4013c0dc77f847bce8acargo test -p buzz-relay --lib -- --test-threads=1— 909 passed, 48 ignoredIndependent exact-head Blox review:
buzz-tornquist-pr-6794-review(2051317) verified the exact head and parent merge-base, byte-identical SQL/tests, all six moved wrappers and unique spans, BOUNDED routing/session/fallback behavior, and the retained runtime confinement boundary. Formatting, strict clippy, 108 DB unit tests, source guards, targeted PostgreSQL feed/routing regressions, 22 non-ignored feed tests, and 909 relay tests passed. The sole ignored-feed fixture failure reproduced with the same SQLSTATE23514at the exact parent. No findings at any severity.Generated with Codex
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 the exact direct-parent range
ed21d81e7fe1fa7606c6e67412b788cc6df12916..ecd17550f7e6e7b4f25399a546072177a0eb20a6on fresh Blox workstationbuzz-tornquist-pr-6794-final-review(ID2057633). The six feedDbwrappers and their spans move tofeed.rswithout SQL or routing behavior changes. The BOUNDED route predicate, replica transaction, route labels, and writer fallback remain unchanged; runtime route/session ownership stays inlib.rs.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
3dbf7ffe4524534b2d44b0781d144acdbbfc4cedff8c8dcf395ceeb9da6c916a25a3abe024c94c2939bc0745d034e3fa970aa8d44b29eba8cd63159f98c6de2407c71432b4a2646290f040cb7314083ea8f0f6e722370bf9c6a0e78576bb7375Comment-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.
f18b0d3fdc45610d375637c2585d8ae58976273530621460f04c38467ea0df1731fce2763d696c046fa2f104d42c6ba85bdf62e7ccb74ceaf4a84f67buzz-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, feed tests (22 passed / 4 ignored), all 4 feed PostgreSQL tests, and relay compilation.