[chat] builtin_actions.py uses raw SQLite while project uses SQLAlchemy ORM #732
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#732
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
src/builtin_actions.pyuses rawsqlite3connections and SQL strings in multiple places:sqlite3.connect(SCHEDULED_DB)with rawSELECT message_id FROM email_boundariesINSERT OR REPLACE INTO email_boundariesviac.execute()SELECT from_address, last_built_at FROM sender_signaturesThe project uses SQLAlchemy ORM throughout (
core/database.pydefines all models). TheSCHEDULED_DBis a separate SQLite database, but even so, using raw SQL when the project has an ORM pattern is a violation.AGENTS.md violations
Suggested fix
email_boundariesandsender_signaturestablesSessionLocal()pattern for database accessSCHEDULED_DBmust remain separate, at minimum use parameterized queries consistently and wrap in a repository pattern