Skip to content

Conversation

AYAHASSAN287
Copy link

@AYAHASSAN287 AYAHASSAN287 commented Oct 5, 2025

Summary

This PR adds full Python wrappers for all Settings RPC endpoints and introduces an extensive functional test suite that validates:

  • Positive scenarios where setters persist data correctly and getters return expected values.
  • Negative scenarios ensuring wrong types or invalid values are rejected and do not alter existing settings.
  • Type and roundtrip validation across all fields to confirm data integrity and correctness.

Scope (new coverage)
Wrappers (settings.py)

Added wrappers for all Settings APIs, including:

Base / Node / Backup / News APIs (get_settings, save_setting, get_node_config, backup_path, messages_backup_enabled, news_*).

  • Notifications APIs — full getter/setter coverage for:
  • notificationsGetAllowNotifications
  • notificationsGetGroupChats, notificationsSetGroupChats
  • notificationsGetOneToOneChats, notificationsSetOneToOneChats
  • notificationsGetPersonalMentions, notificationsSetPersonalMentions
  • notificationsGetGlobalMentions, notificationsSetGlobalMentions
  • notificationsGetSoundEnabled, notificationsSetSoundEnabled
  • notificationsGetVolume, notificationsSetVolume
  • notificationsGetMessagePreview, notificationsSetMessagePreview
  • Exemptions APIs — notificationsSetExemptions, notificationsGetExMuteAllMessages, notificationsGetExPersonalMentions, etc.
  • Miscellaneous APIs — set_bio, mnemonic_was_shown, last_tokens_update, thirdparty_services_enabled.

Tests (test_settings.py)

Added full functional coverage validating:

  • Positive paths: correct values saved and reflected in getters.
  • Negative paths: invalid inputs raise errors and preserve original state.
  • Type correctness: all getters verified to return expected types (bool, str, int, or ISO timestamp).
  • Setter–Getter roundtrips: each configurable setting verified to persist and return accurately.
  • Exemptions API coverage: includes full multi-field set, readback, update, and invalid-input combinations.

Known Issues / Follow-ups

  • backup-path currently accepts arbitrary strings (no validation).
  • notificationsSetGroupChats accepts invalid string values.
  • notificationsSetMessagePreview allows -1.
  • notificationsSetIdentityVerificationRequests accepts invalid strings and types.
  • notificationsGetDefaultExemptions endpoint not fully deployed (test skipped).

@AYAHASSAN287 AYAHASSAN287 marked this pull request as draft October 5, 2025 19:07
@status-im-auto
Copy link
Member

status-im-auto commented Oct 5, 2025

Jenkins Builds

Click to see older builds (81)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 8bb78db #1 2025-10-05 19:11:12 ~3 min macos/status-go 📦zip
✔️ 8bb78db #1 2025-10-05 19:11:40 ~3 min linux/status-go 📦zip
✔️ 8bb78db #1 2025-10-05 19:13:55 ~5 min windows/status-go 📦zip
✔️ 8bb78db #1 2025-10-05 19:18:48 ~10 min tests-rpc 📄log
✔️ 8bb78db #1 2025-10-05 19:18:54 ~11 min linux/nwaku 📦zip
✔️ 8bb78db #1 2025-10-05 19:34:47 ~26 min tests 📄log
✔️ 21f0c42 #2 2025-10-10 13:41:12 ~3 min macos/status-go 📦zip
✔️ 21f0c42 #2 2025-10-10 13:42:38 ~5 min linux/status-go 📦zip
✔️ 21f0c42 #2 2025-10-10 13:43:31 ~5 min windows/status-go 📦zip
✖️ 21f0c42 #2 2025-10-10 13:49:23 ~11 min tests-rpc 📄log
✔️ 21f0c42 #2 2025-10-10 13:50:06 ~12 min linux/nwaku 📦zip
✔️ 21f0c42 #2 2025-10-10 14:04:30 ~26 min tests 📄log
✔️ 74910f5 #3 2025-10-12 12:38:24 ~4 min linux/status-go 📦zip
✔️ 74910f5 #3 2025-10-12 12:39:17 ~4 min macos/status-go 📦zip
✔️ 74910f5 #3 2025-10-12 12:40:21 ~5 min windows/status-go 📦zip
✔️ 74910f5 #3 2025-10-12 12:45:30 ~10 min tests-rpc 📄log
✔️ 74910f5 #3 2025-10-12 12:45:59 ~11 min linux/nwaku 📦zip
✔️ 74910f5 #3 2025-10-12 13:01:39 ~27 min tests 📄log
✔️ 963c2bf #4 2025-10-12 12:42:29 ~3 min linux/status-go 📦zip
✔️ 963c2bf #4 2025-10-12 12:44:00 ~4 min macos/status-go 📦zip
✔️ 963c2bf #4 2025-10-12 12:46:05 ~5 min windows/status-go 📦zip
✔️ 963c2bf #4 2025-10-12 12:57:15 ~11 min linux/nwaku 📦zip
✔️ 963c2bf #4 2025-10-12 12:59:22 ~13 min tests-rpc 📄log
✔️ 963c2bf #4 2025-10-12 13:29:24 ~27 min tests 📄log
✔️ 047d59a #5 2025-10-15 11:13:40 ~7 min windows/status-go 📦zip
✔️ 047d59a #5 2025-10-15 11:15:14 ~8 min linux/status-go 📦zip
✔️ 047d59a #5 2025-10-15 11:24:25 ~18 min linux/nwaku 📦zip
✖️ 047d59a #5 2025-10-15 11:26:49 ~20 min tests-rpc 📄log
✔️ 047d59a #5 2025-10-15 11:35:39 ~29 min macos/status-go 📦zip
✔️ 047d59a #5 2025-10-15 11:42:57 ~36 min tests 📄log
e494bb9 #6 2025-10-15 12:41:47 ~46 sec macos/status-go 📄log
✔️ e494bb9 #6 2025-10-15 12:45:04 ~4 min linux/status-go 📦zip
✔️ e494bb9 #6 2025-10-15 12:47:46 ~6 min windows/status-go 📦zip
✔️ e494bb9 #6 2025-10-15 12:52:30 ~11 min linux/nwaku 📦zip
✖️ e494bb9 #6 2025-10-15 12:52:46 ~11 min tests-rpc 📄log
✔️ e494bb9 #6 2025-10-15 13:09:30 ~28 min tests 📄log
✔️ 43e34f7 #7 2025-10-15 18:03:16 ~3 min linux/status-go 📦zip
✔️ 43e34f7 #7 2025-10-15 18:03:58 ~4 min macos/status-go 📦zip
✔️ 43e34f7 #7 2025-10-15 18:06:52 ~7 min windows/status-go 📦zip
✔️ 43e34f7 #7 2025-10-15 18:10:47 ~11 min linux/nwaku 📦zip
✔️ 43e34f7 #7 2025-10-15 18:12:06 ~12 min tests-rpc 📄log
✔️ 43e34f7 #7 2025-10-15 18:28:49 ~29 min tests 📄log
✔️ 7b583d2 #8 2025-10-16 19:41:53 ~3 min macos/status-go 📦zip
✔️ 7b583d2 #8 2025-10-16 19:42:15 ~4 min linux/status-go 📦zip
✔️ 7b583d2 #8 2025-10-16 19:45:32 ~7 min windows/status-go 📦zip
✔️ 7b583d2 #8 2025-10-16 19:49:45 ~11 min linux/nwaku 📦zip
✖️ 7b583d2 #8 2025-10-16 19:51:55 ~13 min tests-rpc 📄log
✔️ 7b583d2 #8 2025-10-16 20:06:33 ~28 min tests 📄log
✔️ 394e9a5 #9 2025-10-17 15:49:56 ~3 min linux/status-go 📦zip
✔️ 394e9a5 #9 2025-10-17 15:50:11 ~4 min macos/status-go 📦zip
✔️ 394e9a5 #9 2025-10-17 15:55:08 ~8 min windows/status-go 📦zip
✔️ 394e9a5 #9 2025-10-17 15:57:33 ~11 min linux/nwaku 📦zip
✖️ 394e9a5 #9 2025-10-17 15:59:31 ~13 min tests-rpc 📄log
✔️ 394e9a5 #9 2025-10-17 16:13:36 ~27 min tests 📄log
✔️ 3a0b1a4 #10 2025-10-19 08:55:51 ~4 min linux/status-go 📦zip
✔️ 3a0b1a4 #10 2025-10-19 08:58:44 ~6 min windows/status-go 📦zip
✔️ 3a0b1a4 #10 2025-10-19 09:03:54 ~12 min linux/nwaku 📦zip
✖️ 3a0b1a4 #10 2025-10-19 09:05:00 ~13 min tests-rpc 📄log
✔️ 3a0b1a4 #10 2025-10-19 09:20:18 ~28 min tests 📄log
✔️ 7bf5c74 #11 2025-10-19 09:00:14 ~4 min linux/status-go 📦zip
✔️ 7bf5c74 #11 2025-10-19 09:05:31 ~6 min windows/status-go 📦zip
✔️ 7bf5c74 #11 2025-10-19 09:15:24 ~11 min linux/nwaku 📦zip
✖️ 7bf5c74 #11 2025-10-19 09:17:53 ~12 min tests-rpc 📄log
✔️ 7bf5c74 #11 2025-10-19 09:48:22 ~27 min tests 📄log
✔️ e1ee154 #12 2025-10-19 15:13:53 ~3 min macos/status-go 📦zip
✔️ e1ee154 #12 2025-10-19 15:14:14 ~4 min linux/status-go 📦zip
✔️ e1ee154 #12 2025-10-19 15:17:52 ~7 min windows/status-go 📦zip
✔️ e1ee154 #12 2025-10-19 15:21:50 ~11 min linux/nwaku 📦zip
✖️ e1ee154 #12 2025-10-19 15:24:25 ~14 min tests-rpc 📄log
✔️ e1ee154 #12 2025-10-19 15:39:06 ~28 min tests 📄log
✔️ c6ec2c2 #13 2025-10-20 05:49:40 ~3 min macos/status-go 📦zip
✔️ c6ec2c2 #13 2025-10-20 05:50:30 ~4 min linux/status-go 📦zip
✔️ c6ec2c2 #13 2025-10-20 05:53:04 ~6 min windows/status-go 📦zip
✔️ c6ec2c2 #13 2025-10-20 05:56:51 ~10 min linux/nwaku 📦zip
✖️ c6ec2c2 #13 2025-10-20 06:00:19 ~14 min tests-rpc 📄log
✔️ c6ec2c2 #13 2025-10-20 06:13:25 ~27 min tests 📄log
✔️ fcd6bc2 #14 2025-10-20 06:00:23 ~3 min macos/status-go 📦zip
✔️ fcd6bc2 #14 2025-10-20 06:00:46 ~4 min linux/status-go 📦zip
✔️ fcd6bc2 #14 2025-10-20 06:03:31 ~6 min windows/status-go 📦zip
✔️ fcd6bc2 #14 2025-10-20 06:07:43 ~10 min linux/nwaku 📦zip
✖️ fcd6bc2 #14 2025-10-20 06:14:09 ~13 min tests-rpc 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 8a708ea #15 2025-10-20 06:15:44 ~3 min macos/status-go 📦zip
✔️ 8a708ea #15 2025-10-20 06:16:01 ~3 min linux/status-go 📦zip
✔️ 8a708ea #15 2025-10-20 06:19:11 ~6 min windows/status-go 📦zip
✔️ 8a708ea #15 2025-10-20 06:23:53 ~11 min linux/nwaku 📦zip
✖️ 8a708ea #15 2025-10-20 06:28:19 ~13 min tests-rpc 📄log
✔️ 8a708ea #14 2025-10-20 06:41:15 ~27 min tests 📄log
✔️ c94a52e #16 2025-10-20 06:40:28 ~4 min linux/status-go 📦zip
✔️ c94a52e #16 2025-10-20 06:40:47 ~4 min macos/status-go 📦zip
✔️ c94a52e #16 2025-10-20 06:43:49 ~7 min windows/status-go 📦zip
✔️ c94a52e #16 2025-10-20 06:47:53 ~11 min linux/nwaku 📦zip
✖️ c94a52e #16 2025-10-20 06:51:21 ~14 min tests-rpc 📄log
✔️ c94a52e #15 2025-10-20 07:09:11 ~27 min tests 📄log

@codecov
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.61%. Comparing base (512e27d) to head (e1ee154).

Files with missing lines Patch % Lines
services/accounts/settings.go 0.00% 8 Missing ⚠️
multiaccounts/settings_notifications/database.go 0.00% 7 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6984   +/-   ##
========================================
  Coverage    59.61%   59.61%           
========================================
  Files          820      820           
  Lines       115759   115774   +15     
========================================
+ Hits         69010    69022   +12     
+ Misses       39691    39650   -41     
- Partials      7058     7102   +44     
Flag Coverage Δ
functional 35.51% <0.00%> (+0.08%) ⬆️
unit 54.98% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
multiaccounts/settings_notifications/database.go 68.04% <0.00%> (+27.30%) ⬆️
services/accounts/settings.go 86.27% <0.00%> (+26.70%) ⬆️

... and 31 files with indirect coverage changes

@AYAHASSAN287 AYAHASSAN287 changed the title First draft for settings wrappers and test file added test: First draft for settings wrappers and test file added Oct 19, 2025
AYAHASSAN287 and others added 24 commits October 20, 2025 07:55
- Sets MOBILE_GOARCH to amd64 when ARCH is x86_64
- Sets ANDROID_CLANG_TARGET to x86_64-linux-android<API>
* test: community chats

* test: community chats review
* chore: upgrade go-waku and go-discover

* chore: make vendor

* feat: go-waku v0.10.0
- Use sqlite.Migrate in protocol to remove logic duplication.

- Remove legacy ad-hoc migration fix. It is now safe to assume that no
  users are running versions old enough to require this workaround.
These utils are generic enough to be moved to crypto package.
Not sure if this will only hide the root cause because the proper flow on pairing is unknown to me. But from what I've seen Waku is only started after login. While `subscribe` and `unsubscribe` is used in the pairing flow as well.
AYAHASSAN287 and others added 10 commits October 20, 2025 07:55
* feat: improvemets to multistandardbalance controller

* feat: introduce tokenbalances package

* chore: replace balance fetching capabilities from reader and token manager with tokenbalances

* feat: allow overriding multicall3 contract address

* chore: fix tests

* chore: pr comments
* fix: goimports only 1 local package

* fix: vscode settings goimports

* fix: un-gitignore IDEA code styles

* feat: goland code styles

* fix: remove generate_handlers nolint comment

* chore: lint-fix all files
* feat: local timesource

* fix: nwaku

* fix: rebase issues
* feat: added numThreads to expvars

* test: added num of threads and goroutines to benchmarks

* fix: issues
* chore: make rpc.Client implement EthClientGetter

* chore: remove unused types

* chore: cleanup unused methods and use interface instead of rpc Client

* chore: cleanup transactor

* chore: move pendingtxtracker to separate package

* chore: fix tests
@AYAHASSAN287 AYAHASSAN287 requested a review from fbarbu15 October 20, 2025 06:35
Copy link
Contributor

@fbarbu15 fbarbu15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, left some comments
Please remove parameterized tests were possible to lower the number of new tests
And then I will re-review

type NotificationsSettings struct {
db *sql.DB
}
type ExemptionsDefaults struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with the changes in the .go files?

add_resp = self.account.accounts_service.add_keypair_via_seed_phrase(
user_1.passphrase, self.account.password, keypair_name, wallet_account_details_derivation
)
self.account.accounts_service.migrate_non_profile_keycard_keypair_to_app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with this change?

return response.content.decode("utf-8")

def get_boot_api_config(self):
return copy.deepcopy(self._boot_api_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you already did a deepcopy at line 295 / 303

def test_news_feed_enabled(self):
result = self.config.settings_service.news_feed_enabled()
assert isinstance(result, bool), f"Expected boolean, got {type(result)}"
print(f"News feed enabled: {result}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't use prints, but logger
please update everywhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyhow I don't see the purpose of the print/log here
please remove then if they were just for debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants