[UI-REWRITE] Add retention and cleanup for A2A task and event rows
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start by reading a2a_service.py, config.py, db.py, and metrics_cleanup_service.py to understand task and event storage, retention settings, and the existing cleanup job. Trace how scheduled jobs are registered and how terminal tasks are identified. Add retention cleanup that respects the zero setting and logs deleted counts; verify old terminal tasks and their events are removed while in-window tasks and events remain.
Written by the indexing model from the issue text.
Description
Summary
a2a_tasks and a2a_task_events grow without limit. Every agent invocation upserts a task row, and each task event adds another (a2a_service.py). The task row holds the agent reply verbatim in payload and latest_message. config.py declares no retention setting for either table, and no job deletes old rows. Other row stores already have one, such as metrics_retention_days with metrics_cleanup_service.py, and observability_trace_retention_days.
Deleting a task does not delete its events. a2a_task_events.task_id is a plain string column, not a foreign key to a2a_tasks, so only an agent delete cascades (db.py).
Proposed changes
- Add a retention setting in days for task rows and event rows.
- Delete rows past the window on a scheduled job, following metrics_cleanup_service.py.
- Delete the events of a deleted task in the same pass, since no cascade covers them.
- Treat zero as disabled.
- Log how many rows each pass deleted.
Acceptance criteria
- The job deletes a terminal task older than the window, together with its events.
- A task inside the window stays, together with its events.
- A setting of zero deletes nothing.
- Each pass logs the deleted row counts.
- No orphan event rows remain for a deleted task.
Not included
- Deleting a non-terminal task, which can still wait on the caller.
- Export or archive before deletion.
- Retention for push notification config rows.
Related issues: #7026, #7788, #7790, #5936
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 91
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IBM/mcp-context-forge
-
[Bug]: LLM proxy reports finish_reason "stop" for native Ollama responses truncated by max_tokensPossibly taken @saisriram-dev claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
IBM/mcp-context-forge#7771 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
IBM/mcp-context-forge#7762 ·
Maintainers usually reply within 2 days
-
chore kaizen ui-rewrite
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
IBM/mcp-context-forge#7681 ·
Maintainers usually reply within 2 days
-
bug triage ui-rewrite
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
IBM/mcp-context-forge#7671 ·
Maintainers usually reply within 2 days
-
[API][UI-REWRITE]: Expose whether query parameter authentication is enabled on FeatureFlagsPossibly taken @ningyixi claimed this 7 days ago. Open1.1-Phase-1 a2a api enhancement SHOULD ui-rewrite
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/mcp-context-forge#7670 ·
Maintainers usually reply within 2 days
All issues in IBM/mcp-context-forge
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
future-agi/future-agi#5908 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eclipse-score/coverage_tool#101 ·
Maintainers usually reply within 2 days
-
Placeholder export disables HTML image input for picture descriptionPossibly taken @cloudiful claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docling-project/docling-serve#817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
Parse truncated verbose GC logs up to the first XML errorPossibly taken A pull request linked to this issue is open or already merged. Openbug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day