mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
2.8 KiB
2.8 KiB
Memory Update (2026-03-01)
Nostr backup failure observability
handle_post_to_nostr()previously printed only a generic❌ Sync failed…whensync_vault()returnedNone, even ifnostr_client.last_errorhad useful detail.PasswordManager.sync_vault_async()swallowed exceptions and returnedNonewithout reliably settingnostr_client.last_error, making root-cause diagnosis hard from CLI.
Changes made
- Updated
sync_vault_async()to copy exception text intonostr_client.last_errorbefore returningNone. - Updated
handle_post_to_nostr()to includenostr_client.last_errorin user-visible failure output and log line when available. - Added regression tests:
test_handle_post_failure_shows_nostr_errortest_sync_vault_sets_last_error_on_exception
Testing note
- Could not run pytest in this environment because
pytestis not installed (python3 -m pytest->No module named pytest).
Nostr namespace reset workflow
- Added Nostr Settings menu actions for profile-scoped reset operations:
8. Reset Nostr sync stateclearsmanifest_id,delta_since, andlast_sync_tswhile preservingnostr_account_idx.9. Start fresh Nostr namespace (new key index)incrementsnostr_account_idx, clears sync metadata, and reinitializes the Nostr client when available.
- This provides a first-class path for users who want to ignore legacy Nostr history and publish/retrieve only new data under current deterministic behavior.
- Added tests for both handlers and menu dispatch to prevent regressions.
Documentation updates for Nostr reset workflow
- Added
docs/nostr_namespace_reset.mddocumenting menu options8(reset sync state) and9(start fresh namespace), plus validation steps for robust publish/restore. - Linked the new guide from
docs/nostr_setup.md,docs/README.md, and rootREADME.md. - Exposed the guide in website docs navigation via
landing/docs.html(Nostr Namespace Reset).
Nostr sync failure after namespace increment
- Root-cause pattern: when profile
offline_modeis enabled,sync_vault_async()exits early and previously returnedNonewithout a helpful message, so UI showed only❌ Sync failed…. - Fixes:
PasswordManager.sync_vault_async()now setsnostr_client.last_errorfor early-return cases (offline_mode, missing encrypted index, and missing publish result).main.handle_post_to_nostr()now explicitly reports offline mode when no detailed error is present.
- Regression tests added:
src/tests/test_post_sync_messages.py::test_handle_post_failure_offline_mode_messagesrc/tests/test_background_vault_sync_paths.py::test_sync_vault_async_sets_offline_error
- Verified with local venv:
./.venv/bin/pytest -q src/tests/test_post_sync_messages.py./.venv/bin/pytest -q src/tests/test_background_vault_sync_paths.py