From 1ec9aaab8a4c2b4627ac11848c8d23aa3ffb2f1a Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 08:59:03 +0000 Subject: [PATCH] storkit: done 420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command --- ...sient_network_error_instead_of_retrying.md | 29 ------------------- ...le_bot_command_and_web_ui_slash_command.md | 23 +++++++++++++++ 2 files changed, 23 insertions(+), 29 deletions(-) delete mode 100644 .storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md create mode 100644 .storkit/work/5_done/420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command.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 deleted file mode 100644 index 9a5deb41..00000000 --- a/.storkit/work/1_backlog/419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -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 diff --git a/.storkit/work/5_done/420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command.md b/.storkit/work/5_done/420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command.md new file mode 100644 index 00000000..9424cb8b --- /dev/null +++ b/.storkit/work/5_done/420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command.md @@ -0,0 +1,23 @@ +--- +name: "loc for a specified file — bot command and web UI slash command" +--- + +# Story 420: loc for a specified file — bot command and web UI slash command + +## User Story + +As a developer, I want to send `loc ` to the bot or use it as a slash command in the web UI to see the line count for a specific file, so I can quickly check how large a file is without leaving my workflow. + +## Acceptance Criteria + +- [ ] loc returns the line count for the specified file +- [ ] Relative paths are resolved against the project root +- [ ] If the file does not exist, returns a clear error +- [ ] Works from all transports (Matrix, WhatsApp, Slack) +- [ ] Works as a slash command in the web UI +- [ ] loc with no argument retains existing behavior (top files by line count) +- [ ] Exposed as an MCP tool so agents can query file line counts programmatically + +## Out of Scope + +- TBD