fix(dm): Fix auto-retry not triggering and increase retry limits

- Fix JSON parsing: msg command outputs multi-line pretty-printed JSON
  (indent=4), but parser tried line-by-line. Now tries full-text parse
  first, then line-by-line, then regex fallback.
- Change retry limits: 5 direct + 3 flood attempts (was 3 total)
- Separate max_attempts (direct) and max_flood parameters
- Add debug logging when ack extraction fails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-02-24 21:39:58 +01:00
parent c37a7d3b23
commit c0f93029cd
3 changed files with 94 additions and 58 deletions
+3 -3
View File
@@ -461,15 +461,15 @@ def get_auto_retry_config() -> Tuple[bool, Dict]:
return False, {}
def set_auto_retry_config(enabled=None, max_attempts=None, flood_after=None) -> Tuple[bool, Dict]:
def set_auto_retry_config(enabled=None, max_attempts=None, max_flood=None) -> Tuple[bool, Dict]:
"""Update auto-retry configuration on bridge."""
payload = {}
if enabled is not None:
payload['enabled'] = enabled
if max_attempts is not None:
payload['max_attempts'] = max_attempts
if flood_after is not None:
payload['flood_after'] = flood_after
if max_flood is not None:
payload['max_flood'] = max_flood
try:
response = requests.post(