P-041a: GC-Reset Bug fix — Stufe 1 (Plugin-seitig)
TEIL 1: _GC_TIMEOUT_S variable gemacht
- Statt harter 30.0-Konstante: Env-Variable PRESENCE_GC_TIMEOUT_S mit Default 1800.0s (30 Min)
- os.getenv('PRESENCE_GC_TIMEOUT_S', '1800') -> float in __init__
- GC_TIMEOUT_DEFAULT_S = 1800.0 als Klassenkonstante dokumentiert
TEIL 2: Progress-Refresh bei Core-Aktivitaet
- refresh_chat_profile_timestamp() in PresenceEngine hinzugefuegt
- Setzt self._counter_timestamps['chat_profile'] = time.time() unter transition_lock
- Im adapter.py send(): bei jeder ausgehenden Nachricht mit '⏳' wird der Timestamp refreshed
- Optional-additiv: wenn Refresh nicht feuert, greift 1800s-Cap als Notbremse
TEIL 3: Doku
- GC-Block-Kommentar in _drift_correction() auf P-041a erweitert
- install.sh: PRESENCE_GC_TIMEOUT_S env-Variable dokumentiert (Default 1800s)
Pitfalls: P-039, P-041, P-041a
This commit is contained in:
@@ -7111,6 +7111,22 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
)
|
||||
return await self._send_split(real_room_id, content)
|
||||
|
||||
# ── P-041a: Progress-Refresh für PresenceEngine GC ─────────
|
||||
# Bei '⏳ Working'-Meldungen den chat_profile-Timestamp refreshen,
|
||||
# damit der GC-Reset nicht während aktiver Lang-Turns greift.
|
||||
# Der Refresh ist optional-additiv — wenn das Core-Format sich
|
||||
# ändert, greift trotzdem der 1800s-Cap als Notbremse.
|
||||
if content and '⏳' in content:
|
||||
_has_presence = (
|
||||
hasattr(self, '_presence_engine')
|
||||
and self._presence_engine is not None
|
||||
)
|
||||
if _has_presence:
|
||||
try:
|
||||
self._presence_engine.refresh_chat_profile_timestamp()
|
||||
except Exception:
|
||||
pass # Graceful degradation — GC-Cap greift als Fallback
|
||||
|
||||
success = await self._post_message_with_retry(real_room_id, content, attachments=attachments)
|
||||
if success:
|
||||
# If this message has buttons, mark the room so the next user
|
||||
|
||||
Reference in New Issue
Block a user