Reference in New Issue
Block a user
Delete Branch "perplexity/Timmy-time-dashboard:fix/code-quality-778-776-782"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Three small code-quality fixes in one PR. All changes are backward-compatible — default values match the previous hardcoded ones.
Fixes #776 — Extract hardcoded
PRAGMA busy_timeout=5000to configdb_busy_timeout_ms: int = 5000toSettingsinsrc/config.pyPRAGMA busy_timeout=5000in:src/timmy/memory_system.py(2 locations:get_connection()andSemanticMemory)src/timmy/memory/unified.py(1 location:get_connection())DB_BUSY_TIMEOUT_MSenv varFixes #778 — Remove bare
passafter logged exceptionssrc/timmy/tools.pyline 450: Removed redundantpassafterlogger.warning()inconsult_grok()src/timmy/tools.pyline 464: Removed redundantpassafterlogger.warning()in Lightning invoice blocksrc/timmy/tools.pyline 943: Replaced barepassin_merge_catalog()withlogger.debug()so missing optional catalogs are visible in debug logs instead of silently swallowedFixes #782 — Extract hardcoded sats limit in
consult_grok()grok_sats_hard_cap: int = 100toSettingsinsrc/config.py100inmin(settings.grok_max_sats_per_query, 100)withsettings.grok_sats_hard_cap_INVOICE_MEMO_MAX_LEN = 50constant forquery[:50]truncationFiles Changed
src/config.pydb_busy_timeout_ms,grok_sats_hard_capsrc/timmy/memory_system.pysrc/timmy/memory/unified.pysrc/timmy/tools.pyTesting
All default values match the previously hardcoded ones, so no behavior change without explicit config.