Commit Graph
1978 Commits
Author SHA1 Message Date
thePR0M3TH3AN b680e1dfa5 Merge pull request #924 from PR0M3TH3AN/test-fingerprint-edge-cases-17056355250998203024
🧪 Add edge case tests for generate_fingerprint
2026-02-26 14:35:44 -05:00
thePR0M3TH3AN c8879d0f3d Merge pull request #923 from PR0M3TH3AN/refactor/vault-load-index-9200132074012040692
Refactor Vault.load_index to improve readability
2026-02-26 14:35:31 -05:00
thePR0M3TH3AN df56456406 Merge pull request #922 from PR0M3TH3AN/agents/daily/style-agent-16178690583825486979
chore(style): apply black formatting
2026-02-26 14:35:17 -05:00
thePR0M3TH3AN 92753034af Merge branch 'beta' into agents/daily/style-agent-16178690583825486979 2026-02-26 14:35:09 -05:00
thePR0M3TH3AN 9408a64c1c Merge pull request #921 from PR0M3TH3AN/fix-backup-seed-overwrite-3580566875642074998
🔒 Fix Arbitrary File Overwrite in backup_parent_seed
2026-02-26 14:34:32 -05:00
thePR0M3TH3AN f7d679d448 Merge pull request #920 from PR0M3TH3AN/agents/daily/scheduler-update-agent-14403425269970827929
Daily Scheduler Run: scheduler-update-agent
2026-02-26 14:34:16 -05:00
thePR0M3TH3AN 11f61cec4c Merge pull request #919 from PR0M3TH3AN/code-health-display-service-3270220411041344632
🧹 Refactor display logic to DisplayService
2026-02-26 14:33:22 -05:00
thePR0M3TH3AN 7a74a3d77d Merge pull request #918 from PR0M3TH3AN/refactor-initialize-managers-2379820850270818796
Refactor initialize_managers in PasswordManager
2026-02-26 14:33:05 -05:00
thePR0M3TH3AN 499f2c0915 Merge pull request #917 from PR0M3TH3AN/perf-import-vault-blocking-7033826596991244331
⚡ Optimize import_vault endpoint to prevent blocking event loop
2026-02-26 14:32:50 -05:00
thePR0M3TH3AN 115eacb326 Merge pull request #916 from PR0M3TH3AN/jules-stats-manager-test-11560243951841616901
Add test for StatsManager.reset
2026-02-26 14:32:34 -05:00
thePR0M3TH3AN 0205a738e5 Merge pull request #915 from PR0M3TH3AN/atomic-write-cleanup-tests-2648208333040730996
test: verify atomic_write cleanup on failure
2026-02-26 14:32:14 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6a921b8f84 test: add comprehensive unit tests for generate_fingerprint
Add `src/tests/test_fingerprint.py` to cover:
- Happy path fingerprint generation.
- Custom fingerprint length.
- Input normalization (whitespace/case).
- Error handling via mocked exception in `hashlib.sha256`.
- Invalid input handling (NoneType).

This addresses the gap where the exception path in `src/utils/fingerprint.py` was unreachable with standard inputs.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:15:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN e6ff619860 Refactor Vault.load_index into smaller private methods.
Split the `load_index` method in `src/seedpass/core/vault.py` into
`_handle_legacy_file_migration`, `_restore_legacy_backup`,
`_load_and_handle_decryption`, `_check_schema_version`, and
`_apply_schema_migrations`. This improves readability and maintainability
by separating the concerns of legacy file handling, decryption, and schema
migration.

Verified with existing tests in `src/tests/test_legacy_migration.py` and
`src/tests/test_migrations.py`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:11:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN e40a245858 chore(style): apply black formatting
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:10:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 39f552d589 Fix: Prevent arbitrary file overwrite in backup_parent_seed
This change mitigates an arbitrary file overwrite vulnerability in the
`backup_parent_seed` API endpoint. Previously, the endpoint did not
check if the destination file already existed, allowing attackers or
accidental misuse to overwrite critical files if the path validation
passed.

The fix introduces a check using `resolved_path.exists()` after path
validation. If the file exists, the request is rejected with a
409 Conflict error.

A reproduction test case confirmed the vulnerability and verified the
fix. Regression tests on the API passed successfully.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 19:09:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2a3a960d7a docs(prompts): sync scheduler rosters — 2026-02-26
Executed `scheduler-update-agent`.
- Verified daily and weekly prompt directories against `roster.json`.
- Confirmed no drift in `daily-scheduler.md` and `weekly-scheduler.md`.
- Published completion log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 18:23:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 40f37b30bd Refactor display_sensitive_entry_info into DisplayService
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]>
2026-02-26 18:11:07 +00:00
google-labs-jules[bot]andPR0M3TH3AN 24fa2e8e1a Refactor initialize_managers in PasswordManager for better readability
Extracted logic from `initialize_managers` into helper methods:
- `_initialize_config_and_state`
- `_initialize_entry_manager`
- `_initialize_password_generator`
- `_initialize_nostr_client`
- `_handle_migration`

This improves code organization and maintainability without altering functionality. Verified with `test_vault_initialization.py`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 18:11:05 +00:00
google-labs-jules[bot]andPR0M3TH3AN cf9d473abe perf: offload blocking import_vault operations to thread
Refactors `import_vault` endpoint in `src/seedpass/api.py` to use `asyncio.to_thread` for blocking file I/O and synchronous `PasswordManager.handle_import_database` calls.
Replaces synchronous `pm.sync_vault()` with `await pm.sync_vault_async()` (with fallback) to prevent blocking the event loop or triggering `asyncio.run` errors.

This change ensures the API remains responsive during large vault imports.
Verified with a custom benchmark script showing concurrent requests are no longer blocked.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 17:48:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN 407dfee1a5 Add unit test for StatsManager.reset method
This commit adds a new test file `src/tests/test_stats_manager.py` to verify the functionality of the `StatsManager.reset` method. The test ensures that the `reset` method correctly resets the internal `_displayed` flag, allowing stats to be displayed again after a reset.

Testing:
- Added `test_stats_manager_reset` which mocks the manager and verifies `display_stats` calls before and after reset.
- Verified the test passes in isolation.
- Skipped full integration tests due to environment limitations, but the change is isolated to a new test file and does not modify production code.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 17:46:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 566988bdf9 test: verify atomic_write cleanup on failure
Added two new test cases to `src/tests/test_atomic_write.py`:
- `test_atomic_write_cleanup_on_failure`: Verifies that the temporary file is deleted if the write operation fails.
- `test_atomic_write_preserves_existing_on_failure`: Verifies that an existing destination file is preserved if the write operation fails.

These tests ensure the robustness of the `atomic_write` utility function.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 17:45:29 +00:00
thePR0M3TH3AN ece0dda09f chore(backups): add torch backup snapshot 2026-02-26T13-45-30-661Z 2026-02-26 08:48:45 -05:00
thePR0M3TH3AN b5d8caa280 fix(torch): handle self-copy update paths and record bitvid context note 2026-02-26 08:47:54 -05:00
thePR0M3TH3AN 75632cb780 chore(torch): update TORCH and rotate memory update 2026-02-26 08:34:19 -05:00
thePR0M3TH3AN 73068dba73 Merge pull request #910 from PR0M3TH3AN/agents/daily/protocol-research-agent-1628573958005058735
protocol-research-agent: Create Protocol Inventory & Compliance Report
2026-02-26 08:11:04 -05:00
thePR0M3TH3AN df0ed4f1a9 Merge branch 'beta' into agents/daily/protocol-research-agent-1628573958005058735 2026-02-26 08:10:55 -05:00
thePR0M3TH3AN ae2b863e69 Merge pull request #908 from PR0M3TH3AN/agents/daily/onboarding-audit-agent-8897219026798356218
Scheduler run: onboarding-audit-agent (daily)
2026-02-26 08:10:21 -05:00
thePR0M3TH3AN 056f12eb43 Merge branch 'beta' into agents/daily/onboarding-audit-agent-8897219026798356218 2026-02-26 08:10:12 -05:00
thePR0M3TH3AN a610fc2621 Merge pull request #909 from PR0M3TH3AN/agents/daily/perf-agent-1052491488505199855
perf-agent: Initial baseline and setup
2026-02-26 08:09:36 -05:00
thePR0M3TH3AN 1b10686146 Merge branch 'beta' into agents/daily/perf-agent-1052491488505199855 2026-02-26 08:09:22 -05:00
google-labs-jules[bot]andPR0M3TH3AN f13afb8dec Fix infinite loop in profile management test with robust input mocking
- 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]>
2026-02-26 09:34:18 +00:00
google-labs-jules[bot]andPR0M3TH3AN d2052904c5 Fix Windows CI failure in test_profile_management.py
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]>
2026-02-26 09:24:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN d3264adddc Fix Windows CI failure in test_profile_management.py
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]>
2026-02-26 09:23:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN e20dfc55e9 Fix formatting and infinite loop in profile management test
- 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]>
2026-02-26 09:22:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN 02c31cb9fc Fix formatting in profile management test
- 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]>
2026-02-26 09:07:33 +00:00
google-labs-jules[bot]andPR0M3TH3AN 65912b611a perf-agent: Fix formatting and CI failures
Re-formatted `src/tests/test_profile_management.py` and `perf/perf_agent.py` to address persistent CI check failures.
Ensured test isolation uses robust monkeypatching.

- Formatted perf/perf_agent.py
- Formatted src/tests/test_profile_management.py

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 09:05:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3a95fb72d8 perf-agent: Fix formatting and Windows test failures
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]>
2026-02-26 09:03:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN e748b6bf27 Fix Windows CI failure in test_profile_management.py
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]>
2026-02-26 09:03:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN d6794bf892 Fix infinite loop in profile management test
- 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]>
2026-02-26 08:56:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN a7efb62c58 perf-agent: Fix formatting and tests
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]>
2026-02-26 08:55:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN 178f6d7fe9 perf-agent: Initial baseline and fix CI failure
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]>
2026-02-26 03:59:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN ffe80e5b4d Fix Windows CI failure in test_profile_management.py
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]>
2026-02-26 03:30:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN d8720e83f5 protocol-research-agent: Create Protocol Inventory & Compliance Report
- Add PROTOCOL_INVENTORY.md
- Add reports/protocol/protocol-report-2026-02-26.md
- Add src/tests/test_bip85_compliance.py
- Update KNOWN_ISSUES.md
- Update memory-update.md
- Add torch/task-logs/daily/2026-02-26T03-14-42Z__protocol-research-agent__completed.md

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 03:16:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3e03a56844 perf-agent: Initial baseline and setup
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). Added perf-agent tool script.

- 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.
- 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]>
2026-02-26 03:07:46 +00:00
google-labs-jules[bot]andPR0M3TH3AN af32d2844c Scheduler run: onboarding-audit-agent (daily)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 03:03:05 +00:00
thePR0M3TH3AN 967c90bfa2 update 2026-02-25 22:01:22 -05:00
thePR0M3TH3AN 0ffdaf4b09 docs: align development docs with current code behavior 2026-02-25 21:45:14 -05:00
thePR0M3TH3AN 073b1065ca Handle unlock cancellation messages robustly in settings flow 2026-02-25 21:35:33 -05:00
thePR0M3TH3AN 882cd060fa Fix Python 3.10 compatibility for UTC timezone usage 2026-02-25 21:26:32 -05:00
thePR0M3TH3AN c25d1df78d Format files to satisfy CI black check 2026-02-25 21:22:39 -05:00