Skip to content

fix: recover persisted live sessions and sync deleted topics#129

Open
huypl53 wants to merge 1 commit into
alexei-led:mainfrom
huypl53:fix/recover-live-session-and-sync-topic
Open

fix: recover persisted live sessions and sync deleted topics#129
huypl53 wants to merge 1 commit into
alexei-led:mainfrom
huypl53:fix/recover-live-session-and-sync-topic

Conversation

@huypl53

@huypl53 huypl53 commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • recover live windows from persisted window identity when session_map.json is empty or missing entries
  • let /sync use CCGRAM_GROUP_ID as a fallback when probing, closing, renaming, or recreating deleted forum topics
  • add focused tests for persisted session-map recovery and bound-group fallback behavior

Test Plan

  • uv run --extra dev pytest -q tests/ccgram/test_session_monitor.py tests/ccgram/test_sync_command.py
  • uv run ruff check src/ccgram/session_monitor.py src/ccgram/handlers/sync_command.py tests/ccgram/test_session_monitor.py tests/ccgram/test_sync_command.py

Context

This fixes a real recovery failure where a live tmux window stayed running after restart but could not be re-adopted because the monitor only trusted session_map.json. It also fixes /sync flows for deleted Telegram topics when the binding survives but the persisted per-thread group chat ID is gone and only CCGRAM_GROUP_ID remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant