Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
adbdc7a
refactor(db): move API token store ownership
codex Aug 26, 2026
4af650a
refactor(db): extract authentication allowlist store
codex Aug 26, 2026
926dbbc
refactor(db): extract reminder delivery store
codex Aug 26, 2026
bafd6cf
refactor(db): move event query store ownership
codex Aug 26, 2026
fcfee50
refactor(db): move thread store ownership
codex Aug 26, 2026
ede8d41
refactor(db): move reaction store ownership
codex Aug 26, 2026
8ef4b48
test(db): use canonical feed roster fixtures
codex Aug 26, 2026
ac197e3
refactor(db): move feed store ownership
codex Aug 26, 2026
670a86b
refactor(db): move user and DM store ownership
codex Aug 26, 2026
c5cca0c
refactor(db): move push store ownership
codex Aug 26, 2026
dcc2082
refactor(db): move workflow store ownership
codex Aug 26, 2026
17965f1
refactor(db): move workflow run and approval store ownership
codex Aug 26, 2026
ec33841
refactor(db): move relay member store ownership
codex Aug 26, 2026
2e0bd0a
refactor(db): move relay invite store ownership
codex Aug 26, 2026
312673f
refactor(db): move product feedback store ownership
codex Aug 26, 2026
12aabfa
refactor(db): move moderation store ownership
codex Aug 26, 2026
f8830b1
refactor(db): move git repository store ownership
codex Aug 26, 2026
ab26be0
refactor(db): move archived identity store ownership
codex Aug 26, 2026
85f366d
refactor(db): move usage store ownership
codex Aug 26, 2026
6f3f1c8
refactor(db): move admin moderation store ownership
codex Aug 26, 2026
f7a7cc0
refactor(db): move partition maintenance store ownership
codex Aug 26, 2026
221e24f
refactor(db): move deletion store ownership
codex Aug 26, 2026
bb3aaa1
refactor(db): separate runtime and store modules
codex Aug 26, 2026
551dd83
fix(db): update runtime source reference
TheSentinel454 Aug 27, 2026
6d38820
fix(db): update migration fixture paths
TheSentinel454 Aug 28, 2026
be24430
refactor(db): move new relay admin stores
TheSentinel454 Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,540 changes: 30 additions & 7,510 deletions crates/buzz-db/src/lib.rs

Large diffs are not rendered by default.

418 changes: 0 additions & 418 deletions crates/buzz-db/src/reaction.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ mod tests {
assert!(migrations[32].sql.as_str().contains("kind = 30179"));
assert!(migrations[32].sql.as_str().contains("search_tsv"));
assert!(!migrations[0].sql.as_str().contains("30179"));
assert!(include_str!("../../../schema/schema.sql")
assert!(include_str!("../../../../schema/schema.sql")
.contains("kind IN (1059, 30179, 30300, 30350, 30622, 44100, 44101, 44200)"));

// Public push-gateway authority is intentionally deployment-global and
Expand Down Expand Up @@ -1040,7 +1040,7 @@ mod tests {
.contains("CREATE INDEX relay_invites_expires_at_idx ON relay_invites (expires_at)"));
assert!(!relay_invites.contains("_operator_global_tables"));

let desired_schema = include_str!("../../../schema/schema.sql");
let desired_schema = include_str!("../../../../schema/schema.sql");
assert!(
desired_schema.contains("CREATE TABLE join_policy_acceptances"),
"desired-state schema must include join-policy evidence used by invite claims",
Expand Down Expand Up @@ -1156,7 +1156,7 @@ mod tests {
// parameters. Its post-apply reconciliation must restore and verify
// both parts of the live heartbeat contract for fresh bootstraps.
let pgschema_reconciliation =
include_str!("../../../scripts/reconcile-schema-after-pgschema.sql");
include_str!("../../../../scripts/reconcile-schema-after-pgschema.sql");
assert!(pgschema_reconciliation
.contains("ALTER TABLE replica_heartbeat SET (vacuum_truncate = false)"));
assert!(pgschema_reconciliation.contains("INSERT INTO replica_heartbeat (id) VALUES (1)"));
Expand Down Expand Up @@ -1309,7 +1309,7 @@ mod tests {
.sql
.as_str()
.contains("error_code"));
assert!(include_str!("../../../schema/schema.sql").contains("error_code TEXT"));
assert!(include_str!("../../../../schema/schema.sql").contains("error_code TEXT"));
}

#[test]
Expand Down Expand Up @@ -1480,7 +1480,7 @@ mod tests {
let migrator_run_to = ["MIGRATOR", ".run_to("].concat();

let manifest_dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
let this_file = manifest_dir.join("src/migration.rs");
let this_file = manifest_dir.join("src/runtime/migration.rs");
let crates_dir = manifest_dir.parent().expect("workspace crates dir");
// The push gateway migrates its own dedicated authority database; it
// never holds relay tenant tables, so it is exempt from the relay
Expand Down
1,044 changes: 1,044 additions & 0 deletions crates/buzz-db/src/runtime/mod.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
//! observes `token >= M` on its own connection has, by WAL/storage replay
//! order, also replayed every commit that preceded M's commit; every
//! transaction then partitions into exactly three buckets:
//! (a) finished before the activity scan — its commit precedes `M`'s
//! commit, so the replica session has replayed it;
//! (b) open at the activity scan — represented by `xact_start`, so it is
//! bounded by the `oldest_xact_start` term;
//! (c) started after the activity scan — its deferred floor guard runs
//! after `S`, so it cannot commit a row with
//! `created_at < S - floor`.
//! (a) finished before the activity scan — its commit precedes `M`'s
//! commit, so the replica session has replayed it;
//! (b) open at the activity scan — represented by `xact_start`, so it is
//! bounded by the `oldest_xact_start` term;
//! (c) started after the activity scan — its deferred floor guard runs
//! after `S`, so it cannot commit a row with
//! `created_at < S - floor`.
//! There is no fourth bucket. Each committed token `M` therefore proves a
//! **fence wall** of `min(oldest_xact_start, S) - floor - clock_margin`:
//! every channel-window row with `created_at <= fence_wall(M)` is present
Expand Down
Loading
Loading