Release v0.51.343 — Release LG (Phase-1 batch: #3883 + #3878 + #3880) (#3891)
Some checks failed
Release & Docker / release (push) Has been cancelled
Some checks failed
Release & Docker / release (push) Has been cancelled
Phase-1 low-risk batch, each rebased onto fresh master + gated fresh: - #3883 (@rodboev, #3740): sidebar refreshes a stale message_count:0 index row from its sidecar when user_message_count>0 + sidecar mtime newer than index, self-healing the interrupted-stream stale-count case beyond compression lineage. - #3878 (@rodboev, #3833): manual workspace refresh clears the dir cache and re-fetches expanded descendants so background-written files become visible. - #3880 (@koshikai): translate the 11 remaining English strings in the ja locale. greptile flags evaluated: #3878 P1 relative-path + P2 stale-comment already fixed in PR head; #3883 P2 missing-snapshot-test already covered by the PR's own test_all_sessions_refreshes_stale_zero_count_snapshot_row_from_sidecar, P2 double-stat is a bounded cheap micro-opt (FOLD); #3880 'needs screenshots' rejected (in-place translation of existing keys, no UI shape change). Co-authored-by: nesquena-hermes <[email protected]> Co-authored-by: rodboev <rodboev@users.noreply.github.com> Co-authored-by: koshikai <koshikai@users.noreply.github.com>
This commit is contained in:
@@ -2654,6 +2654,14 @@ def _strip_sidebar_internal_flags(sessions: list[dict]) -> None:
|
||||
session.pop('_show_pre_compression_snapshot', None)
|
||||
|
||||
|
||||
def _looks_like_stale_zero_message_row(session: dict) -> bool:
|
||||
"""Return True for indexed rows that likely need sidecar metadata repair."""
|
||||
return bool(
|
||||
int(session.get('message_count') or 0) == 0
|
||||
and int(session.get('user_message_count') or 0) > 0
|
||||
)
|
||||
|
||||
|
||||
def _row_may_need_sidecar_metadata_refresh(
|
||||
session: dict,
|
||||
*,
|
||||
@@ -2693,7 +2701,19 @@ def _row_may_need_sidecar_metadata_refresh(
|
||||
or session.get('_lineage_root_id')
|
||||
or session.get('_compression_segment_count')
|
||||
)
|
||||
return bool(lineage_shaped and sid and _sidecar_mtime_after_index_timestamp(session))
|
||||
needs_mtime_check = lineage_shaped or (
|
||||
sid and _looks_like_stale_zero_message_row(session)
|
||||
)
|
||||
if needs_mtime_check and _sidecar_mtime_after_index_timestamp(session):
|
||||
return True
|
||||
return False
|
||||
if (
|
||||
sid
|
||||
and _looks_like_stale_zero_message_row(session)
|
||||
and str(session.get('session_source') or '').strip().lower() != 'fork'
|
||||
and _sidecar_mtime_after_index_timestamp(session)
|
||||
):
|
||||
return True
|
||||
if session.get('message_count') is None or session.get('last_message_at') is None:
|
||||
return True
|
||||
return bool(sid and stale_snapshot_ids and sid in stale_snapshot_ids)
|
||||
|
||||
Reference in New Issue
Block a user