The test `test_modify_entry_invalid_fields` was hardcoding `index = 0` for TOTP entries because `add_totp` returns a URI string instead of an index.
This change unifies the index determination logic by calling `entry_manager.get_next_index()` before adding the entry. This ensures the correct index is verified for all entry types, including TOTP.
Modified:
- src/tests/test_modify_entry_validation.py: Use get_next_index() for dynamic index determination.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added a new test case `test_verify_checksum_missing` to `src/tests/test_checksum_utils.py` to ensure that `verify_checksum` correctly raises `FileNotFoundError` and logs an appropriate error message when the checksum file does not exist. This improves diagnostic reliability for checksum verification failures.
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]>
Formatted `perf/perf_agent.py` with black to fix CI `Check formatting` failure.
Ensured `src/tests/test_profile_management.py` uses correct monkeypatching to fix Windows CI `OSError`.
- Formatted perf/perf_agent.py
- Updated src/tests/test_profile_management.py
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]>