UAT: SessionRepository.update() does not persist name field — session name changes lost on update #5859

Open
opened 2026-04-09 11:00:59 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Session Management — Session Persistence
Severity: Backlog (depends on #5843 being implemented first)

What Was Tested

Code-level analysis of src/cleveragents/infrastructure/database/repositories.pySessionRepository.update().

Expected Behavior

When a session's name field is updated and SessionRepository.update() is called, the new name should be persisted to the database.

Actual Behavior (from code)

In src/cleveragents/infrastructure/database/repositories.py, lines 4199–4213, the update() method does NOT update the name column:

row.actor_name = session.actor_name  # type: ignore[assignment]
row.namespace = session.namespace  # type: ignore[assignment]
row.linked_plan_ids_json = _json.dumps(  # type: ignore[assignment]
    session.linked_plan_ids
)
token_usage_str = _json.dumps(...)
row.token_usage_json = token_usage_str  # type: ignore[assignment]
row.metadata_json = _json.dumps(session.metadata)  # type: ignore[assignment]
row.updated_at = session.updated_at.isoformat()  # type: ignore[assignment]

The name field is missing from the update. If a session's name is changed after creation, the change will be lost on the next update() call.

Code Location

  • src/cleveragents/infrastructure/database/repositories.py, lines 4172–4226 (SessionRepository.update())

Impact

Session names cannot be updated after creation. Any code that sets session.name and calls update() will silently lose the name change.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** Session Management — Session Persistence **Severity:** Backlog (depends on #5843 being implemented first) ## What Was Tested Code-level analysis of `src/cleveragents/infrastructure/database/repositories.py` — `SessionRepository.update()`. ## Expected Behavior When a session's `name` field is updated and `SessionRepository.update()` is called, the new name should be persisted to the database. ## Actual Behavior (from code) In `src/cleveragents/infrastructure/database/repositories.py`, lines 4199–4213, the `update()` method does NOT update the `name` column: ```python row.actor_name = session.actor_name # type: ignore[assignment] row.namespace = session.namespace # type: ignore[assignment] row.linked_plan_ids_json = _json.dumps( # type: ignore[assignment] session.linked_plan_ids ) token_usage_str = _json.dumps(...) row.token_usage_json = token_usage_str # type: ignore[assignment] row.metadata_json = _json.dumps(session.metadata) # type: ignore[assignment] row.updated_at = session.updated_at.isoformat() # type: ignore[assignment] ``` The `name` field is missing from the update. If a session's name is changed after creation, the change will be lost on the next `update()` call. ## Code Location - `src/cleveragents/infrastructure/database/repositories.py`, lines 4172–4226 (`SessionRepository.update()`) ## Impact Session names cannot be updated after creation. Any code that sets `session.name` and calls `update()` will silently lose the name change. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 11:37:13 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5859
No description provided.