fix(persistence): address new Copilot review comments

- feedback.py: validate thread_id/run_id before deleting feedback
- jsonl.py: add path traversal protection with ID validation
- run_repo.py: parse `before` to datetime for PostgreSQL compat
- thread_meta_repo.py: fix pagination when metadata filter is active
- database_config.py: use resolve_path for sqlite_dir consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
rayhpeng
2026-04-06 21:46:54 +08:00
parent 0ecc2f954c
commit 5ead75d289
5 changed files with 46 additions and 9 deletions
@@ -65,12 +65,18 @@ class DatabaseConfig(BaseModel):
@property
def checkpointer_sqlite_path(self) -> str:
"""SQLite file path for the LangGraph checkpointer."""
return os.path.join(self.sqlite_dir, "checkpoints.db")
from deerflow.config.paths import resolve_path
resolved_dir = str(resolve_path(self.sqlite_dir))
return os.path.join(resolved_dir, "checkpoints.db")
@property
def app_sqlite_path(self) -> str:
"""SQLite file path for application ORM data."""
return os.path.join(self.sqlite_dir, "app.db")
from deerflow.config.paths import resolve_path
resolved_dir = str(resolve_path(self.sqlite_dir))
return os.path.join(resolved_dir, "app.db")
@property
def app_sqlalchemy_url(self) -> str: