Cleanup: Automated data retention system
@Prajna1999 đang làm issue này rồi.
Từ ngày 4/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem?
We need a system to automatically clean up query and response data in the LLM calls table after a specified retention period. Without this, the database may become cluttered and inefficient.
Describe the solution you'd like
- Implement a cron job to purge query/response data after a configurable retention window (default 1 week).
- Handle one-time backlog separately from regular cron operations.
- Write a cleanup strategy document detailing cron design, batching, and backlog handling.
- Conduct a staging load test by duplicating ~20k LLM call rows ~5x in the
copy_devdatabase to measure cleanup time. Do not use production data. - Ensure S3 cleanup is managed separately and not included in the DB cron/migration code.
Original issue
Context
query + response data in the LLM calls table will be cleaned up via a cron job after a configurable retention window (starting with 1 week).
A step-by-step cleanup strategy doc is to be written (cron design, batching, one-time backlog handling).
Scope / Acceptance criteria
- Cron job to purge query/response data in the LLM calls table after a configurable retention window (default 1 week).
- Handle one-time backlog separately from steady-state cron.
- Write cleanup strategy doc (cron design, batching, backlog).
- Staging load test: reuse the empty
copy_devdatabase, duplicate staging's ~20k LLM call rows ~5x to reach ~1 lakh, and measure cleanup time. Do NOT pull prod data. - Keep S3 cleanup separate — do not bundle S3 deletion into the DB cron/migration code.
Notes
- Guardrails input/output data is retained separately (anonymized, tagged as product enhancement) and is NOT part of this cleanup.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 10
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ProjectTech4DevAI/kaapi-backend
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ProjectTech4DevAI/kaapi-backend#269 · 1 bình luận ·
-
ProjectTech4DevAI/kaapi-backend#1184 · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
ProjectTech4DevAI/kaapi-backend#1182 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
ProjectTech4DevAI/kaapi-backend#1181 ·
Tất cả issue của ProjectTech4DevAI/kaapi-backend
Issue tương tự
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
bancolombia/sentinel#23 ·
-
test md Đang mởCI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100