Extracted the monolithic `display_sensitive_entry_info` method from `PasswordManager` into a new `DisplayService` class in `src/seedpass/core/display_service.py`. This improves maintainability and separation of concerns.
- Created `src/seedpass/core/display_service.py` with `DisplayService` class.
- Implemented specific display methods for each entry type (TOTP, SSH, SEED, PGP, Nostr, Key/Value, Managed Account, Password).
- Updated `src/seedpass/core/manager.py` to use `DisplayService`.
- Verified with existing tests `test_manager_retrieve_totp.py` and `test_manager_search_display.py`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `src/tests/test_profile_management.py` to use a more robust `input` mock iterator.
- Mock returns fallback "y" responses after the initial choice ("3") to break any potential infinite loops in `confirm_action` if mocking fails or module reloading interferes.
- Addresses `OSError` and timeout on Windows CI caused by interactive prompt loops.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replace unsafe module reloading with explicit monkeypatching of constants.
This prevents potential OSError: [Errno 22] Invalid argument on Windows
during TemporaryDirectory cleanup or test execution when modules are reloaded
in a way that affects global state or file handles.
Also ensured `pm.fingerprint_manager` is initialized using the monkeypatched
`APP_DIR` from the manager module context to guarantee it operates within
the temporary directory context and aligns with the mocked constants.
Co-authored-by: PR0M3TH3AN <[email protected]>
Patched `masked_input` in `utils.password_prompt` to bypass `msvcrt.getwch()` usage during tests, preventing `OSError: [Errno 22] Invalid argument` in non-interactive CI environments.
Ensured the test logic relies on the mocked `builtins.input` as intended.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Run `black` on `src/tests/test_profile_management.py`.
- Mock `utils.password_prompt.confirm_action` to prevent infinite recursion during reload.
- Use an iterator for `input` mock to prevent infinite loops.
- Add docstring to test function.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Run `black` on `src/tests/test_profile_management.py` to fix CI failure.
- Remove unused `Vault` import and suppress `E402` lint errors.
Co-authored-by: PR0M3TH3AN <[email protected]>
Formatted `src/tests/test_profile_management.py` and `perf/perf_agent.py` to fix CI failure.
Replaced `importlib.reload` with robust `monkeypatch.setattr` in `src/tests/test_profile_management.py` to resolve Windows `OSError`.
- Formatted perf/perf_agent.py
- Formatted src/tests/test_profile_management.py
- Updated src/tests/test_profile_management.py to use safe test isolation pattern
Co-authored-by: PR0M3TH3AN <[email protected]>
Replace unsafe module reloading with explicit monkeypatching of constants.
This prevents potential OSError: [Errno 22] Invalid argument on Windows
during TemporaryDirectory cleanup or test execution when modules are reloaded
in a way that affects global state or file handles.
Also ensured `pm.fingerprint_manager` is initialized using the monkeypatched
`APP_DIR` to guarantee it operates within the temporary directory context.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Mock `utils.password_prompt.confirm_action` explicitly in `src/tests/test_profile_management.py` to prevent infinite recursion during `manager_module` reload.
- Use an iterator for `builtins.input` mock to prevent infinite loops if logic fails.
- Fixes CI timeout and crash on Windows caused by `confirm_action` repeatedly asking for input.
Co-authored-by: PR0M3TH3AN <[email protected]>
Executed perf-agent daily run. Established performance baseline, set up reporting structure, and ran initial search patterns (0 hits found for JS patterns in Python-centric codebase).
Fixed CI failure in `src/tests/test_profile_management.py` by replacing `importlib.reload` with robust `monkeypatch.setattr` for `APP_DIR` and checksum files, resolving `OSError` on Windows during testing.
- Added perf/perf_agent.py tool script.
- Added reports/performance/INITIAL_BASELINE.md and daily-perf-report-2026-02-26.md.
- Added src/context/CONTEXT_2026-02-26T02-59-27Z.md.
- Modified src/tests/test_profile_management.py to fix test isolation.
- Updated .scheduler-memory/memory-store.json and memories.md.
- Added .scheduler-memory/session-*/ logs.
- Added torch/task-logs/daily/2026-02-26T03-02-16Z__perf-agent__completed.md.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replace unsafe module reloading with explicit monkeypatching of constants.
This prevents potential OSError: [Errno 22] Invalid argument on Windows
during TemporaryDirectory cleanup or test execution when modules are reloaded
in a way that affects global state or file handles.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Reformatted `src/tests/helpers.py`, `src/tests/test_generate_test_profile_sync.py`, `src/tests/test_manifest_id_privacy.py`, and `src/tests/test_restore_from_nostr_setup.py` using `black`.
- Refactored `src/tests/helpers.py` to fix dispersed imports and remove unused imports (`time`, `asyncio`), resolving `flake8` warnings.
- Split long lines in `src/tests/helpers.py` to improve readability and compliance with style guides.
- Verified formatting with `black --check .`.
- Verified all tests pass with `pytest`.
- Confirmed `flake8` errors related to line length in `helpers.py` are acceptable as CI does not enforce strict 79-char limit (using `black` defaults).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Moved `client` and `dummy_nostr_client` fixtures to `src/tests/conftest.py` to fix F811 redefinition errors and improve test organization.
- Introduced `make_dummy_nostr_client` factory fixture to support tests requiring multiple client instances.
- Updated all affected tests to use the new fixture pattern.
- Removed deprecated `is_flag=True` from Typer boolean options in CLI modules.
- Fixed F541 (f-string without placeholders) in `entry_management.py`.
- Fixed F841 (unused variable) in `manager.py`.
Co-authored-by: PR0M3TH3AN <[email protected]>
The file src/nostr/event_handler.py does not exist in the codebase, and EventHandler is not used in src/nostr/client.py.
However, src/repo-context.txt incorrectly contained references to this file and usage.
This change updates src/repo-context.txt to remove the hallucinated/outdated code references, aligning the documentation with the actual codebase state.
Attempts to remove unused imports in src/nostr/client.py were reverted as tests rely on monkeypatching them.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added `src/tests/test_core_api_services.py` to test public methods of
`VaultService`, `ProfileService`, `SyncService`, `EntryService`,
`ConfigService`, `UtilityService`, and `NostrService` in `src/seedpass/core/api.py`.
These tests ensure proper thread safety (locking) and delegation to
the underlying `PasswordManager` and its components.
Key improvements:
- Verified locking behavior for thread-safe operations.
- Validated delegation logic for all service methods.
- Covered edge cases like default vs. custom password generation policies.
- Mocked external dependencies (pubsub bus, manager components) to isolate service logic.
Co-authored-by: PR0M3TH3AN <[email protected]>