mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
chore(style-agent): format code and update task logs
- Ran `black .` to reformat Python files: - src/seedpass/core/display_service.py - src/seedpass/core/manager.py - src/seedpass/core/password_generation.py - src/tests/test_stats_manager.py - test_atomic_write_perms.py - Verified with `pytest` (766 passed) and `npm run lint`. - Updated `.scheduler-memory/latest/daily/memories.md` with execution details. - Added daily task log: `torch/task-logs/daily/2026-02-27T...__style-agent__completed.md`. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
da553bcdc4
commit
5e9ff2ab8f
15 files changed
+193
-46
No files matched your search
@@ -20,9 +20,13 @@ If `npx --no-install torch-lock init --help` prints initialization prompts, it m
|
||||
|
||||
---
|
||||
|
||||
### 3. [2026-02-26] (scheduler, daily, retrieve)
|
||||
### 3. [2026-02-25] (scheduler, daily, store, insight)
|
||||
|
||||
Memory retrieval seed for daily :: scheduler memory retrieval
|
||||
### 1. [2026-02-25] (torch, scheduler, host-mode)
|
||||
When running `npm run --prefix torch scheduler:daily`, the scheduler resolves config from `torch/torch-config.json` (cwd-scoped), not the repo-root `torch-config.json`.
|
||||
|
||||
### 2. [2026-02-25] (torch, scheduler, handoff)
|
||||
A non-inter…
|
||||
|
||||
---
|
||||
|
||||
@@ -36,10 +40,6 @@ A non-inter…
|
||||
|
||||
---
|
||||
|
||||
### 5. [2026-02-25] (scheduler, daily, store, insight)
|
||||
### 5. [2026-02-27] (scheduler, daily, retrieve)
|
||||
|
||||
### 1. [2026-02-25] (torch, scheduler, host-mode)
|
||||
When running `npm run --prefix torch scheduler:daily`, the scheduler resolves config from `torch/torch-config.json` (cwd-scoped), not the repo-root `torch-config.json`.
|
||||
|
||||
### 2. [2026-02-25] (torch, scheduler, handoff)
|
||||
A non-inter…
|
||||
Memory retrieval seed for daily :: scheduler memory retrieval
|
||||
@@ -68,7 +68,7 @@
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772047328158,
|
||||
"last_seen": 1772132692957,
|
||||
"last_seen": 1772150684017,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
@@ -119,7 +119,7 @@
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772049603683,
|
||||
"last_seen": 1772132692957,
|
||||
"last_seen": 1772150684017,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
@@ -170,7 +170,7 @@
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772050579374,
|
||||
"last_seen": 1772132692957,
|
||||
"last_seen": 1772150684017,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
@@ -272,7 +272,7 @@
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772073865813,
|
||||
"last_seen": 1772132692957,
|
||||
"last_seen": 1772150684017,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
@@ -405,5 +405,82 @@
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"a5ab848b-e3de-48dd-acf9-2830ae43ae4b",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "a5ab848b-e3de-48dd-acf9-2830ae43ae4b",
|
||||
"agent_id": "scheduler-memory-daily",
|
||||
"session_id": "session-mm44rf4p",
|
||||
"type": "batch_window",
|
||||
"content": "Memory retrieval seed for daily :: scheduler memory retrieval",
|
||||
"summary": "Memory retrieval seed for daily :: scheduler memory retrieval",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"retrieve"
|
||||
],
|
||||
"importance": 0.4,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772150683993,
|
||||
"last_seen": 1772150684017,
|
||||
"source": "scheduler-retrieve",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"8c5456f9-f837-458c-accc-59323a075d2d",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "8c5456f9-f837-458c-accc-59323a075d2d",
|
||||
"agent_id": "scheduler-memory-daily",
|
||||
"session_id": "session-mm44wkva",
|
||||
"type": "batch_window",
|
||||
"content": "# Memory Update — codex — 2026-02-26\n\n## Key findings\n- Full test suite now passes: `766 passed, 11 skipped`.\n- `DisplayService` had diverged from `seedpass.core.manager` interactive helpers, causing test monkeypatches to miss and resulting in flaky behavior.\n\n## Bugs fixed\n- Fixed TOTP retrieve/edit regression where `test_edit_totp_period_from_retrieve` could fail in-suite because TOTP screen consumed input via unpatched `display_service.timed_input`.\n- Fixed suite hang at `test_show_seed_entry_details` caused by `display_service.confirm_action` bypassing patched `manager.confirm_action`, leading to infinite prompt loop on empty input.\n\n## Patterns / reusable knowledge\n- In this codebase, interactive helpers should be called through `seedpass.core.manager` symbols (`confirm_action`, `timed_input`, `copy_to_clipboard`) to keep behavior and tests consistent.\n\n## Follow-up (warnings cleanup)\n- Added pytest `markers` registration for `network` under `[tool.pytest.ini_options]` to remove `PytestUnknownMarkWarning`.\n- Added narrow pytest warning filters for known third-party GUI deprecation noise (`Pack.padding*`).\n- For `imghdr` deprecation triggered during `test_imghdr_stub` import, added a local `warnings.filterwarnings(...)` at top of that test module to suppress import-time warning deterministically.\n- Verified final suite status: `766 passed, 11 skipped`, no warnings.\n\n## UI update (landing favicon)\n- Added a new `landing/favicon.svg` with a lock/keyhole glyph in SeedPass terminal-green colors.\n- Wired favicon metadata into both `landing/index.html` and `landing/docs.html` (`rel=\"icon\"`, `rel=\"alternate icon\"`, and `theme-color`) so tab/icon branding is consistent across the landing site.\n- Landing theme accent system was centralized in `landing/style.css` CSS variables; changing `--accent-primary/secondary` propagated icon color updates (Font Awesome `<i>` styles) across both home and docs pages.\n- `landing/docs.css` had a few hardcoded blue RGBA backgrounds for hover/active/table headers that needed manual conversion to green to fully complete a palette swap.",
|
||||
"summary": "# Memory Update — codex — 2026-02-26\n\n## Key findings\n- Full test suite now passes: `766 passed, 11 skipped`.\n- `DisplayService` had diverged from `seedpass.core.manager` interactive helpers, causing test monkeypatches to miss and resulting in flaky behavior.\n\n## Bugs fixed\n- Fi…",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"store",
|
||||
"insight"
|
||||
],
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772150924711,
|
||||
"last_seen": 1772150924711,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
],
|
||||
[
|
||||
"4d31cd8f-2477-4e7e-bedb-a202e6c977e2",
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "4d31cd8f-2477-4e7e-bedb-a202e6c977e2",
|
||||
"agent_id": "scheduler-memory-daily",
|
||||
"session_id": "session-mm4505ym",
|
||||
"type": "batch_window",
|
||||
"content": "# Memory Update — style-agent — 2026-02-27\n\n## Key findings\n- Codebase formatting was generally consistent, but `black` identified and reformatted 5 files.\n- JS/TS formatting and linting checks passed without issues.\n- `pytest` suite (766 tests) passed, confirming no regressions from formatting changes.\n\n## Work performed\n- Ran `black .` to enforce Python code style.\n- Reformatted:\n - `src/seedpass/core/display_service.py`\n - `src/seedpass/core/manager.py`\n - `src/seedpass/core/password_generation.py`\n - `src/tests/test_stats_manager.py`\n - `test_atomic_write_perms.py`\n- Verified repository integrity with `npm run --prefix torch lint`, `npm run --prefix torch lint:inline-styles`, and `pytest`.\n\n## Patterns / reusable knowledge\n- The `style-agent` should strictly follow the `black` formatter configuration and not attempt manual style fixes unless necessary.\n- Pre-commit checks must include `pytest` to ensure formatting tools didn't inadvertently break logic (e.g., string concatenation issues).",
|
||||
"summary": "# Memory Update — style-agent — 2026-02-27\n\n## Key findings\n- Codebase formatting was generally consistent, but `black` identified and reformatted 5 files.\n- JS/TS formatting and linting checks passed without issues.\n- `pytest` suite (766 tests) passed, confirming no regressions…",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"daily",
|
||||
"store",
|
||||
"insight"
|
||||
],
|
||||
"importance": 0.8,
|
||||
"embedding_id": null,
|
||||
"created_at": 1772151092015,
|
||||
"last_seen": 1772151092015,
|
||||
"source": "agent-output",
|
||||
"ttl_days": null,
|
||||
"merged_into": null,
|
||||
"pinned": false
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "retrieve",
|
||||
"runId": "session-mm44rf4p",
|
||||
"servicePath": "src/services/memory/index.js#getRelevantMemories",
|
||||
"inputs": {
|
||||
"agentId": "scheduler-memory-daily",
|
||||
"promptPath": "",
|
||||
"promptIntent": "scheduler memory retrieval",
|
||||
"query": "scheduler | daily | agent | scheduler-memory-daily | intent | scheduler memory retrieval",
|
||||
"events": 1
|
||||
},
|
||||
"outputs": {
|
||||
"ingestedCount": 1,
|
||||
"retrievedCount": 5
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_RETRIEVED
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "store",
|
||||
"runId": "session-mm44wkva",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "scheduler-memory-daily",
|
||||
"promptPath": "",
|
||||
"promptIntent": "scheduler memory store",
|
||||
"events": 1,
|
||||
"sourceFile": "memory-update.md"
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"# Memory Update — codex — 2026-02-26\n\n## Key findings\n- Full test suite now passes: `766 passed, 11 skipped`.\n- `DisplayService` had diverged from `seedpass.core.manager` interactive helpers, causing test monkeypatches to miss and resulting in flaky behavior.\n\n## Bugs fixed\n- Fi…"
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"cadence": "daily",
|
||||
"operation": "store",
|
||||
"runId": "session-mm4505ym",
|
||||
"servicePath": "src/services/memory/index.js#ingestEvents",
|
||||
"inputs": {
|
||||
"agentId": "scheduler-memory-daily",
|
||||
"promptPath": "",
|
||||
"promptIntent": "scheduler memory store",
|
||||
"events": 1,
|
||||
"sourceFile": "memory-update.md"
|
||||
},
|
||||
"outputs": {
|
||||
"storedCount": 1,
|
||||
"summaries": [
|
||||
"# Memory Update — style-agent — 2026-02-27\n\n## Key findings\n- Codebase formatting was generally consistent, but `black` identified and reformatted 5 files.\n- JS/TS formatting and linting checks passed without issues.\n- `pytest` suite (766 tests) passed, confirming no regressions…"
|
||||
]
|
||||
},
|
||||
"status": "ok"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
MEMORY_STORED
|
||||
+15
-19
@@ -1,24 +1,20 @@
|
||||
# Memory Update — codex — 2026-02-26
|
||||
# Memory Update — style-agent — 2026-02-27
|
||||
|
||||
## Key findings
|
||||
- Full test suite now passes: `766 passed, 11 skipped`.
|
||||
- `DisplayService` had diverged from `seedpass.core.manager` interactive helpers, causing test monkeypatches to miss and resulting in flaky behavior.
|
||||
- Codebase formatting was generally consistent, but `black` identified and reformatted 5 files.
|
||||
- JS/TS formatting and linting checks passed without issues.
|
||||
- `pytest` suite (766 tests) passed, confirming no regressions from formatting changes.
|
||||
|
||||
## Bugs fixed
|
||||
- Fixed TOTP retrieve/edit regression where `test_edit_totp_period_from_retrieve` could fail in-suite because TOTP screen consumed input via unpatched `display_service.timed_input`.
|
||||
- Fixed suite hang at `test_show_seed_entry_details` caused by `display_service.confirm_action` bypassing patched `manager.confirm_action`, leading to infinite prompt loop on empty input.
|
||||
## Work performed
|
||||
- Ran `black .` to enforce Python code style.
|
||||
- Reformatted:
|
||||
- `src/seedpass/core/display_service.py`
|
||||
- `src/seedpass/core/manager.py`
|
||||
- `src/seedpass/core/password_generation.py`
|
||||
- `src/tests/test_stats_manager.py`
|
||||
- `test_atomic_write_perms.py`
|
||||
- Verified repository integrity with `npm run --prefix torch lint`, `npm run --prefix torch lint:inline-styles`, and `pytest`.
|
||||
|
||||
## Patterns / reusable knowledge
|
||||
- In this codebase, interactive helpers should be called through `seedpass.core.manager` symbols (`confirm_action`, `timed_input`, `copy_to_clipboard`) to keep behavior and tests consistent.
|
||||
|
||||
## Follow-up (warnings cleanup)
|
||||
- Added pytest `markers` registration for `network` under `[tool.pytest.ini_options]` to remove `PytestUnknownMarkWarning`.
|
||||
- Added narrow pytest warning filters for known third-party GUI deprecation noise (`Pack.padding*`).
|
||||
- For `imghdr` deprecation triggered during `test_imghdr_stub` import, added a local `warnings.filterwarnings(...)` at top of that test module to suppress import-time warning deterministically.
|
||||
- Verified final suite status: `766 passed, 11 skipped`, no warnings.
|
||||
|
||||
## UI update (landing favicon)
|
||||
- Added a new `landing/favicon.svg` with a lock/keyhole glyph in SeedPass terminal-green colors.
|
||||
- Wired favicon metadata into both `landing/index.html` and `landing/docs.html` (`rel="icon"`, `rel="alternate icon"`, and `theme-color`) so tab/icon branding is consistent across the landing site.
|
||||
- Landing theme accent system was centralized in `landing/style.css` CSS variables; changing `--accent-primary/secondary` propagated icon color updates (Font Awesome `<i>` styles) across both home and docs pages.
|
||||
- `landing/docs.css` had a few hardcoded blue RGBA backgrounds for hover/active/table headers that needed manual conversion to green to fully complete a palette swap.
|
||||
- The `style-agent` should strictly follow the `black` formatter configuration and not attempt manual style fixes unless necessary.
|
||||
- Pre-commit checks must include `pytest` to ensure formatting tools didn't inadvertently break logic (e.g., string concatenation issues).
|
||||
@@ -81,7 +81,9 @@ class DisplayService:
|
||||
print(colored(f"Retrieving 2FA code for '{label}'.", "cyan"))
|
||||
print(colored("Press Enter to return to the menu.", "cyan"))
|
||||
try:
|
||||
key = self.manager.KEY_TOTP_DET or getattr(self.manager, "parent_seed", None)
|
||||
key = self.manager.KEY_TOTP_DET or getattr(
|
||||
self.manager, "parent_seed", None
|
||||
)
|
||||
secret = self.manager.entry_manager.get_totp_secret(index, key)
|
||||
while True:
|
||||
code = TotpManager.current_code_from_secret(secret)
|
||||
@@ -297,9 +299,7 @@ class DisplayService:
|
||||
if tags:
|
||||
print(colored(f"Tags: {', '.join(tags)}", "cyan"))
|
||||
print(
|
||||
colored(
|
||||
f"Archived Status: {'Archived' if archived else 'Active'}", "cyan"
|
||||
)
|
||||
colored(f"Archived Status: {'Archived' if archived else 'Active'}", "cyan")
|
||||
)
|
||||
if self.manager.secret_mode_enabled:
|
||||
if self._copy_to_clipboard(value):
|
||||
@@ -353,9 +353,7 @@ class DisplayService:
|
||||
if tags:
|
||||
print(colored(f"Tags: {', '.join(tags)}", "cyan"))
|
||||
print(
|
||||
colored(
|
||||
f"Archived Status: {'Archived' if archived else 'Active'}", "cyan"
|
||||
)
|
||||
colored(f"Archived Status: {'Archived' if archived else 'Active'}", "cyan")
|
||||
)
|
||||
action = (
|
||||
input(
|
||||
|
||||
@@ -2908,7 +2908,7 @@ class PasswordManager:
|
||||
self.menu_handler.run_menu(
|
||||
"Edit Entry",
|
||||
get_options,
|
||||
prompt="Select option or press Enter to go back: "
|
||||
prompt="Select option or press Enter to go back: ",
|
||||
)
|
||||
|
||||
def _entry_qr_menu(self, index: int, entry: dict) -> None:
|
||||
@@ -2942,14 +2942,18 @@ class PasswordManager:
|
||||
current_entry = refreshed
|
||||
|
||||
def show_public_key():
|
||||
npub, _ = self.entry_manager.get_nostr_key_pair(index, self.parent_seed)
|
||||
npub, _ = self.entry_manager.get_nostr_key_pair(
|
||||
index, self.parent_seed
|
||||
)
|
||||
print(colored(f"npub: {npub}", "cyan"))
|
||||
TotpManager.print_qr_code(f"nostr:{npub}")
|
||||
pause()
|
||||
refresh_entry()
|
||||
|
||||
def show_private_key():
|
||||
_, nsec = self.entry_manager.get_nostr_key_pair(index, self.parent_seed)
|
||||
_, nsec = self.entry_manager.get_nostr_key_pair(
|
||||
index, self.parent_seed
|
||||
)
|
||||
print(color_text(f"nsec: {nsec}", "deterministic"))
|
||||
TotpManager.print_qr_code(nsec)
|
||||
pause()
|
||||
@@ -2964,7 +2968,7 @@ class PasswordManager:
|
||||
self.menu_handler.run_menu(
|
||||
"QR Codes",
|
||||
get_options,
|
||||
prompt="Select option or press Enter to return: "
|
||||
prompt="Select option or press Enter to return: ",
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
@@ -291,7 +291,12 @@ class PasswordGenerator:
|
||||
raise
|
||||
|
||||
def _count_char_types(
|
||||
self, password_chars: list[str], uppercase: str, lowercase: str, digits: str, special: str
|
||||
self,
|
||||
password_chars: list[str],
|
||||
uppercase: str,
|
||||
lowercase: str,
|
||||
digits: str,
|
||||
special: str,
|
||||
) -> tuple[int, int, int, int]:
|
||||
"""Count the occurrences of each character type in the password."""
|
||||
upper = sum(1 for c in password_chars if c in uppercase)
|
||||
@@ -441,7 +446,9 @@ class PasswordGenerator:
|
||||
password_chars = list(password)
|
||||
|
||||
# Count initial character types
|
||||
counts = self._count_char_types(password_chars, uppercase, lowercase, digits, special)
|
||||
counts = self._count_char_types(
|
||||
password_chars, uppercase, lowercase, digits, special
|
||||
)
|
||||
logger.debug(
|
||||
f"Current character counts - Upper: {counts[0]}, Lower: {counts[1]}, Digits: {counts[2]}, Special: {counts[3]}"
|
||||
)
|
||||
@@ -474,7 +481,9 @@ class PasswordGenerator:
|
||||
)
|
||||
|
||||
# Final counts after modifications
|
||||
final_counts = self._count_char_types(password_chars, uppercase, lowercase, digits, special)
|
||||
final_counts = self._count_char_types(
|
||||
password_chars, uppercase, lowercase, digits, special
|
||||
)
|
||||
logger.debug(
|
||||
f"Final character counts - Upper: {final_counts[0]}, Lower: {final_counts[1]}, Digits: {final_counts[2]}, Special: {final_counts[3]}"
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ from unittest.mock import Mock
|
||||
import pytest
|
||||
from seedpass.core.stats_manager import StatsManager
|
||||
|
||||
|
||||
def test_stats_manager_reset():
|
||||
"""Test that StatsManager.reset correctly resets the displayed flag."""
|
||||
stats_manager = StatsManager()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
@@ -9,6 +8,7 @@ from atomic_write import atomic_write
|
||||
import os
|
||||
import stat
|
||||
|
||||
|
||||
def test_atomic_write_permissions():
|
||||
test_file = Path("test_permissions.txt")
|
||||
if test_file.exists():
|
||||
@@ -30,5 +30,6 @@ def test_atomic_write_permissions():
|
||||
|
||||
test_file.unlink()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_atomic_write_permissions()
|
||||
Whitespace-only changes.
Reference in new issue
Block a user