From 3b0542cd4161a8a4754b6e4950e837b1f30f279b Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 08:10:38 +0000 Subject: [PATCH] storkit: create 419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying --- ...sient_network_error_instead_of_retrying.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md diff --git a/.storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md b/.storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md new file mode 100644 index 00000000..9a5deb41 --- /dev/null +++ b/.storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md @@ -0,0 +1,29 @@ +--- +name: "Matrix bot crashes on transient network error instead of retrying" +--- + +# Bug 419: Matrix bot crashes on transient network error instead of retrying + +## Description + +The Matrix bot treats a transient sync error as fatal and stops entirely. A single failed HTTP request to the homeserver kills the bot, requiring a full server rebuild to recover. + +## How to Reproduce + +1. Run storkit with Matrix bot enabled\n2. Homeserver becomes temporarily unreachable (network blip, DNS hiccup, server restart)\n3. Bot hits sync error and crashes + +## Actual Result + +Bot logs "Fatal error: Matrix sync error: error sending request for url (...)" and stops responding. No retry, no recovery. + +## Expected Result + +Bot logs a warning, backs off with exponential delay, and retries the sync. Only crash on unrecoverable errors (invalid credentials, banned, etc). + +## Acceptance Criteria + +- [ ] Transient network errors (connection refused, timeout, DNS failure) trigger a retry with exponential backoff +- [ ] Bot logs a warning on each failed retry attempt +- [ ] Bot resumes normal operation once the homeserver is reachable again +- [ ] Unrecoverable errors (401, 403) still cause a clean shutdown with a clear error message +- [ ] Bot sends a notification after recovering from a network outage