You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
buzz-db: move misplaced types to domain modules #12
Several types and helpers are defined at the bottom of `lib.rs` rather than in their domain modules:
`ApiTokenRecord` struct (lines 5409–5431) — belongs in `api_token.rs`
`AllowlistEntry` struct (lines 5434–5442) — belongs in a new `allowlist.rs` or in `relay_members.rs`
`parse_api_token_row` function (lines 5446–5479) — belongs in `api_token.rs`
`TokenSummary` struct (lines 652–665) — belongs in `api_token.rs`
Additionally, the allowlist operations (`is_pubkey_allowed`, `has_allowlist_entries`, `add_to_allowlist`, `remove_from_allowlist`, `list_allowlist` — ~100 lines inline in `lib.rs`) have no domain module.
Proposed change
Move `ApiTokenRecord`, `TokenSummary`, and `parse_api_token_row` into `api_token.rs`
Move `AllowlistEntry` and allowlist operations into `relay_members.rs` (they're closely related to membership) or a new `allowlist.rs`
Priority
Low — small cleanup, naturally done alongside #2 (lib.rs breakup).
🤖 AI review update (2026-08-23)
Do this as small #2 slices. Move API token records, parsing, methods, tests, and spans into api_token.rs. Put pubkey allowlist state in a dedicated allowlist.rs rather than relay_members.rs: authentication allowlisting and NIP-43 relay membership are separate policies even though both use pubkeys.
Completed as part of block#6987 (merged 2026-08-28): API-token and allowlist persistence/types now live in domain store modules; lib.rs is a compatibility facade.
Activity
refactor(db): extract domain stores from database runtime (#6987)
refactor(db): extract domain stores from database runtime (#6987)
TheSentinel454 commentedon Sep 3, 2026
Completed as part of block#6987 (merged 2026-08-28): API-token and allowlist persistence/types now live in domain store modules; lib.rs is a compatibility facade.
refactor(db): extract domain stores from database runtime (block#6987)