-
Notifications
You must be signed in to change notification settings - Fork 36
Refactor/remove background sync #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70ed72c
feat(nostr_manager): add since to global batched subscriptions
jgmontoya ebf0c15
feat(whitenoise): compute and pass global since for user batches (wit…
jgmontoya 20faa8e
feat(nostr_manager): allow since in setup_account_subscriptions_with_…
jgmontoya 30bd49c
feat(whitenoise): pass per-account since (10s buffer) to account subs…
jgmontoya 64c373f
feat(event_processor): advance account last_synced_at via database he…
jgmontoya b4482f9
test(integration/subscription_processing): add follow list check to P…
jgmontoya 322c655
refactor(whitenoise): remove background_sync_account_data and related…
jgmontoya adf4a81
test(integration/subscription_processing): add testcase to verify las…
jgmontoya 470b0a2
fixup! feat(whitenoise): pass per-account since (10s buffer) to accou…
jgmontoya 4ac821e
feat(nostr_manager event_processor): add timestamp validation with fu…
jgmontoya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
2 changes: 2 additions & 0 deletions
2
src/integration_tests/test_cases/subscription_processing/mod.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| pub mod publish_subscription_update; | ||
| pub mod verify_last_synced_timestamp; | ||
|
|
||
| pub use publish_subscription_update::*; | ||
| pub use verify_last_synced_timestamp::*; |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Enforce “account-only” for follow-list builder or during run
Builder says “account-based only,” but nothing prevents using it for external users. Guard it to fail fast.
pub fn with_follow_list(mut self, follows: Vec<PublicKey>) -> Self { + // Guard at build time to avoid misusing this path + if self.account_name.is_none() { + panic!("with_follow_list is only supported for account-based tests"); + } self.follow_pubkeys = Some(follows); self }Alternatively, prefer a graceful error in
run()(see next comment) if panics in tests are undesirable.📝 Committable suggestion
🤖 Prompt for AI Agents