Release v0.51.276 — Release IR (stage-p3e — preserve manually-named session titles #3542) (#3682)
Some checks failed
Release & Docker / release (push) Has been cancelled
Some checks failed
Release & Docker / release (push) Has been cancelled
* feat(sessions): skip adaptive auto-rename for manually-named sessions (#3542, #3230) Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> * docs(changelog): v0.51.276 — Release IR (stage-p3e) * fix(sessions): clear manual_title lock on /api/session/clear (#3542) Codex regression-gate follow-up: the clear endpoint reset the title to Untitled directly, stranding manual_title=True so the reused session never auto-named again. Route the reset through apply_session_title_rename (which clears the lock for auto-labels) + add a behavioral and a static-guard test. --------- Co-authored-by: nesquena-hermes <[email protected]> Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
@@ -572,6 +572,7 @@ class Session:
|
||||
truncation_watermark=None,
|
||||
gateway_routing=None, gateway_routing_history=None,
|
||||
llm_title_generated: bool=False,
|
||||
manual_title: bool=False,
|
||||
parent_session_id: str=None,
|
||||
worktree_path=None,
|
||||
worktree_branch=None,
|
||||
@@ -620,6 +621,7 @@ class Session:
|
||||
self.gateway_routing = gateway_routing if isinstance(gateway_routing, dict) else None
|
||||
self.gateway_routing_history = gateway_routing_history if isinstance(gateway_routing_history, list) else []
|
||||
self.llm_title_generated = bool(llm_title_generated)
|
||||
self.manual_title = bool(manual_title)
|
||||
self.parent_session_id = parent_session_id
|
||||
self.worktree_path = str(Path(worktree_path).expanduser().resolve()) if worktree_path else None
|
||||
self.worktree_branch = str(worktree_branch) if worktree_branch else None
|
||||
@@ -684,7 +686,7 @@ class Session:
|
||||
'compression_anchor_details', 'context_engine_state',
|
||||
'context_length', 'threshold_tokens', 'last_prompt_tokens',
|
||||
'truncation_watermark',
|
||||
'gateway_routing', 'gateway_routing_history', 'llm_title_generated',
|
||||
'gateway_routing', 'gateway_routing_history', 'llm_title_generated', 'manual_title',
|
||||
'parent_session_id',
|
||||
'worktree_path', 'worktree_branch', 'worktree_repo_root', 'worktree_created_at',
|
||||
'is_cli_session', 'source_tag', 'raw_source', 'session_source', 'source_label', 'read_only',
|
||||
@@ -890,6 +892,7 @@ class Session:
|
||||
'last_prompt_tokens': self.last_prompt_tokens,
|
||||
'gateway_routing': self.gateway_routing,
|
||||
'gateway_routing_history': self.gateway_routing_history,
|
||||
'manual_title': self.manual_title,
|
||||
# Only emit 'parent_session_id' when set (the /branch fork link, #1342).
|
||||
# Sessions without a fork must not leak None — see test_session_lineage_metadata_api.
|
||||
**({'parent_session_id': self.parent_session_id} if self.parent_session_id else {}),
|
||||
|
||||
Reference in New Issue
Block a user