Skip to content

fix: improve dump failure reporting and logging#45

Merged
deadman96385 merged 3 commits intoAndroidDumps:masterfrom
deadman96385:master
Apr 4, 2026
Merged

fix: improve dump failure reporting and logging#45
deadman96385 merged 3 commits intoAndroidDumps:masterfrom
deadman96385:master

Conversation

@deadman96385
Copy link
Copy Markdown
Contributor

@deadman96385 deadman96385 commented Apr 3, 2026

  • report the failed step from error_context instead of stale progress state
  • record the previous successful step from progress history
  • attach a failure log with progress history and sanitized traceback data
  • queue document delivery through the message queue for retry handling
  • redact URL credentials and query params in failure logs
  • tolerate malformed progress percentages when building log output
  • follow-up commit ae07974 removes emoji usage from Telegram messages so user-facing output is plain text
  • follow-up commit 4b5f525 carries PR extract_and_push.sh: Extract recovery.img #42 recovery.img extraction into the rewrite for recovery ramdisk/device-tree parity

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves failure reporting for firmware dump jobs by sourcing the failed step from error_context, capturing the last successful step from progress history, and attaching a sanitized failure log as a queued document for retryable delivery via the message queue.

Changes:

  • Add a new queued DOCUMENT message type and a send_document() API to deliver failure logs through the Redis-backed message queue.
  • Build and attach a plain-text failure log including progress history and sanitized traceback data, and improve “failed at” step selection using error_context.
  • Redact URL credentials and query parameters for logged URLs, and tolerate malformed progress percentage values when generating the log output.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

File Description
dumpyarabot/message_queue.py Adds document-queue support (MessageType.DOCUMENT), expands QueuedMessage schema, and processes queued document deliveries.
dumpyarabot/arq_jobs.py Builds/sends failure logs, improves failure step selection, and adds URL sanitization for log output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dumpyarabot/arq_jobs.py
Comment thread dumpyarabot/arq_jobs.py
Comment thread dumpyarabot/message_queue.py
Comment thread dumpyarabot/message_queue.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dumpyarabot/arq_jobs.py Outdated
Comment thread dumpyarabot/message_queue.py
Comment thread dumpyarabot/mockup_handlers.py
Comment thread dumpyarabot/handlers.py
Comment thread dumpyarabot/message_formatting.py
@akhilnarang
Copy link
Copy Markdown
Contributor

Issues Found

Critical (P0/P1)

  • [P1] Return sanitized URLs directly to prevent infinite recursion (/home/akhil/dumpbot/dumpyarabot/arq_jobs.py:82-83)
    • Calling _sanitize_text on sanitized re-enters _sanitize_traceback, whose URL regex matches the same http://... string and calls _sanitize_url_for_log again. Any failed dump with a normal firmware URL will therefore hit RecursionError while building the new failure log, and tracebacks/messages that include URLs can also mask the original exception with this recursion failure.

@deadman96385 deadman96385 force-pushed the master branch 2 times, most recently from 60fe25a to c70d603 Compare April 4, 2026 14:17
- report the failed step from error_context instead of stale progress state
- record the previous successful step from progress history
- attach a failure log with progress history and sanitized traceback data
- queue document delivery through the message queue for retry handling
- redact URL credentials and query params in failure logs
- tolerate malformed progress percentages when building log output
- add recovery.img to boot image processing in the Python extractor
- unpack recovery ramdisks in the rewrite-native path
- extract recovery device trees for parity with other boot image handlers
@deadman96385 deadman96385 merged commit 3003f93 into AndroidDumps:master Apr 4, 2026
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.

3 participants