Release v0.51.264 — Release IF (stage-r14) (#3636)
Some checks failed
Release & Docker / release (push) Has been cancelled

## Release v0.51.264 — Release IF (stage-r14)

Un-held sibling pair (#3585 + #3586) — both addressed the findings from the earlier hold; re-reviewed fresh.

### Fixed
| Issue/PR | Author | Fix |
|----------|--------|-----|
| #3585 | @rodboev | Cron sessions no longer flood the CLI sidebar window (restored the `("cron","webui")` exclusion in `_load_cli_sessions_uncached`). |
| #3586 | @rodboev | Messaging sessions keep their source label after a refresh **and open + send correctly** — `is_cli_session_row()` classifies them non-CLI, and the sidebar open/import path now uses `_isMessagingSession()` so a reclassified Discord/Telegram/Slack row is imported on open (no transient stub → no `/api/chat/start` 404). |

### Un-hold note
These were held earlier today because the `is_cli_session_row()` reclassification (#3586) created a CORE open-path regression — opening a reclassified messaging session 404'd on the next send. The author pushed a fix adding the `_isMessagingSession()` import gate at all open/lineage/refresh paths (+ regression test `test_issue3603_external_session_import_gate.py`), and Codex confirmed both that AND the secondary webui-recovery concern (cron-only exclusion now keeps `source='webui'` sidecar-less recovery rows) are resolved.

### Gate
- Full pytest suite: **7729 passed, 0 failed**
- ESLint: CLEAN · ruff: CLEAN · browser-smoke: CLEAN
- Codex (regression): **SAFE TO SHIP** — open→import→send path verified (messaging rows go through `/api/session/import_cli` before `/api/chat/start`); `is_cli_session_row` classification correct; the pair composes in `_load_cli_sessions_uncached`.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
This commit is contained in:
nesquena-hermes
2026-06-05 00:11:48 -07:00
committed by GitHub
parent 52261ebdaf
commit 4cf40a317a
7 changed files with 503 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ from api.workspace import get_last_workspace
from api.usage import prompt_cache_hit_percent
from api.agent_sessions import (
_is_continuation_session,
is_cli_session_row,
read_importable_agent_session_rows,
read_session_lineage_metadata,
)
@@ -3490,7 +3491,7 @@ def _load_cli_sessions_uncached(hermes_home: Path, db_path: Path, _cli_profile)
db_path,
limit=CLI_VISIBLE_SESSION_LIMIT,
log=logger,
exclude_sources=None,
exclude_sources=("cron",),
):
sid = row['id']
raw_ts = row['last_activity'] or row['started_at']
@@ -3561,7 +3562,7 @@ def _load_cli_sessions_uncached(hermes_home: Path, db_path: Path, _cli_profile)
'_lineage_root_id': row.get('_lineage_root_id'),
'_lineage_tip_id': row.get('_lineage_tip_id'),
'_compression_segment_count': row.get('_compression_segment_count'),
'is_cli_session': True,
'is_cli_session': is_cli_session_row(row),
})
# --- Second pass: fetch cron sessions that may have been squeezed out
@@ -3645,7 +3646,7 @@ def _load_cli_sessions_uncached(hermes_home: Path, db_path: Path, _cli_profile)
'_lineage_root_id': row.get('_lineage_root_id'),
'_lineage_tip_id': row.get('_lineage_tip_id'),
'_compression_segment_count': row.get('_compression_segment_count'),
'is_cli_session': True,
'is_cli_session': is_cli_session_row(row),
})
existing_sids.add(sid)
except Exception: