Commit Graph

2764 Commits

Author SHA1 Message Date
dave ebdcf18134 feat(424): rate-limit traffic-light dots and hard-block alerts
- Add HardBlock variant to WatcherEvent (story_id, agent_name, reset_time)
- In pty.rs, distinguish allowed_warning (throttle) from hard blocks;
  emit RateLimitWarning for throttles, HardBlock for actual 429s
- Add `throttled: bool` field to StoryAgent / AgentInfo
- Pool spawns a background listener that sets throttled=true on
  RateLimitWarning or HardBlock events and fires AgentStateChanged
- Status command shows traffic-light dots: ○ idle, ● running, ◑ throttled, ✗ blocked
- Read blocked flag from story front matter for the ✗ dot
- Notifications: RateLimitWarning silenced (too noisy); HardBlock sends
  urgent chat notification with optional reset time
- Tests added for traffic_light_dot, read_story_blocked, status output,
  and all notification paths
2026-03-28 11:33:01 +00:00
dave d83f2ae4c1 storkit: done 424_story_rate_limit_traffic_light_status_and_hard_block_alerts 2026-03-28 11:27:19 +00:00
dave f6c0d35f11 storkit: create 427_story_server_side_text_normalization_for_chat_message_line_breaks 2026-03-28 11:21:11 +00:00
dave facbf51f05 storkit: create 426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master 2026-03-28 11:18:36 +00:00
dave 847ebc292f storkit: create 424_story_rate_limit_traffic_light_status_and_hard_block_alerts 2026-03-28 11:11:32 +00:00
Timmy 065ca2bd8f Bump version to 0.6.1 2026-03-28 11:07:06 +00:00
dave 34988855bc storkit: create 428_refactor_split_pool_pipeline_rs_into_submodules 2026-03-28 11:00:26 +00:00
dave 7fc788baea docs: rewrite README for 0.6.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:56:36 +00:00
dave 40575924b5 chore: bump version to 0.6.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:50:59 +00:00
dave 4f56fa6cbe storkit: done 427_story_server_side_text_normalization_for_chat_message_line_breaks 2026-03-28 10:41:46 +00:00
dave 52513b55ff storkit: merge 427_story_server_side_text_normalization_for_chat_message_line_breaks 2026-03-28 10:41:43 +00:00
dave 1ae2fa9b9b storkit: create 427_story_server_side_text_normalization_for_chat_message_line_breaks 2026-03-28 10:28:23 +00:00
dave 6077f74dbd storkit: accept 09_story_remove_scroll_bars 2026-03-28 10:12:53 +00:00
dave 8ab2e19e98 fix(423): handle RateLimitHardBlock in ws.rs match
The new WatcherEvent::RateLimitHardBlock variant added in the feature
commit was not covered in the ws.rs From<WatcherEvent> match, causing
a compile error. Add the missing arm returning None (same as
RateLimitWarning — handled by chat notifications only, not WebSocket).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 10:11:44 +00:00
dave b44f3a33e3 feat(423): auto-schedule timer on rate limit to resume after reset
- pty.rs: detect rate_limit_event hard blocks, parse reset_at, emit
  WatcherEvent::RateLimitHardBlock with story_id, agent_name, reset_at
- watcher.rs: add RateLimitHardBlock variant to WatcherEvent enum
- timer.rs: add TimerStore::upsert (add-or-update-to-later) and
  spawn_rate_limit_auto_scheduler (listens for RateLimitHardBlock,
  upserts timer for the blocked story)
- notifications.rs: handle RateLimitHardBlock events with a debounced
  chat notification including the scheduled resume time;
  add format_rate_limit_hard_block_notification helper
- matrix/mod.rs: subscribe second watcher_rx for auto-scheduler,
  pass it to run_bot
- matrix/bot/run.rs: wire spawn_rate_limit_auto_scheduler into bot startup

Tests cover: AC1 (hard block detection in pty), AC2 (auto-scheduler
adds timer), AC3 (upsert deduplication), AC5 (chat notification sent),
AC6 (worktree preserved — timer fires start_agent on existing worktree)
2026-03-28 10:11:08 +00:00
dave 57407aed51 storkit: create 426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master 2026-03-28 10:09:41 +00:00
dave a29677b3c7 storkit: create 426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master 2026-03-28 10:06:17 +00:00
dave 95df450fca storkit: create 426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master 2026-03-28 10:05:58 +00:00
dave 6c6bc35785 feat: add unblock command and MCP tool to reset blocked stories
- Add `unblock` bot command (chat + web UI slash command) that clears the
  `blocked` flag and resets `retry_count` to 0 in story front matter
- Works across all pipeline stages (1_backlog through 6_archived)
- Returns confirmation with story name and ID, or clear error if story
  is not found or not blocked
- Expose `unblock_story` MCP tool for programmatic use by agents
- Make `chat::commands::unblock` module pub(crate) so story_tools can
  call `unblock_by_number`
- Add 8 unit tests covering registration, validation, core logic, and
  edge cases (not-found, not-blocked, any stage, story ID in response)
- Update MCP tools list test: 49 → 50 tools
2026-03-28 10:05:51 +00:00
dave 7652bbba9c storkit: done 423_story_auto_schedule_timer_on_rate_limit_to_resume_after_reset 2026-03-28 09:50:07 +00:00
dave efd89a26ac config: increase max_retries from 2 to 3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 09:41:25 +00:00
dave 71d4746009 storkit: done 425_story_chat_notification_when_a_story_blocks_with_reason 2026-03-28 09:38:50 +00:00
dave 98b5475160 storkit: merge 425_story_chat_notification_when_a_story_blocks_with_reason 2026-03-28 09:38:47 +00:00
dave 740f1b5e6e storkit: create 425_story_chat_notification_when_a_story_blocks_with_reason 2026-03-28 09:25:19 +00:00
dave c0bab1e671 storkit: create 425_story_chat_notification_when_a_story_blocks_with_reason 2026-03-28 09:23:45 +00:00
dave 306810e4d5 storkit: done 419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying 2026-03-28 09:11:29 +00:00
dave 1193b7ac9a storkit: merge 419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying 2026-03-28 09:11:26 +00:00
dave 05db012aaf storkit: done 422_story_unblock_command_to_reset_blocked_stories 2026-03-28 09:08:02 +00:00
dave bc3c852509 storkit: create 424_story_rate_limit_traffic_light_status_and_hard_block_alerts 2026-03-28 09:07:16 +00:00
dave 04051282da storkit: create 424_story_rate_limit_traffic_light_status_and_hard_block_alerts 2026-03-28 09:06:26 +00:00
dave 081b33a8a6 storkit: done 421_story_timer_command_for_deferred_agent_start 2026-03-28 09:02:23 +00:00
dave cf5424f9a6 storkit: merge 421_story_timer_command_for_deferred_agent_start 2026-03-28 09:02:20 +00:00
dave 1ec9aaab8a storkit: done 420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command 2026-03-28 08:59:03 +00:00
dave d6f82393f5 storkit: merge 420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command 2026-03-28 08:58:57 +00:00
dave f4ce0e017b storkit: create 423_story_auto_schedule_timer_on_rate_limit_to_resume_after_reset 2026-03-28 08:49:23 +00:00
dave c0ea5f0cb8 storkit: done 418_refactor_split_pool_auto_assign_rs_into_submodules 2026-03-28 08:48:05 +00:00
dave d375c4b1d3 storkit: merge 418_refactor_split_pool_auto_assign_rs_into_submodules 2026-03-28 08:48:02 +00:00
dave 4ea4be1462 storkit: create 422_story_unblock_command_to_reset_blocked_stories 2026-03-28 08:44:31 +00:00
dave bc1c1cd2c9 storkit: create 421_story_timer_command_for_deferred_agent_start 2026-03-28 08:35:41 +00:00
dave c1e4c40f31 storkit: create 421_story_timer_command_for_deferred_agent_start 2026-03-28 08:35:02 +00:00
dave 203e8f22be storkit: done 417_refactor_split_matrix_bot_rs_into_focused_modules 2026-03-28 08:30:04 +00:00
dave 665c036a56 storkit: merge 417_refactor_split_matrix_bot_rs_into_focused_modules 2026-03-28 08:30:01 +00:00
dave 73304f08ac storkit: create 420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command 2026-03-28 08:17:32 +00:00
dave fe9fc69f96 storkit: create 420_story_loc_for_a_specified_file_bot_command_and_web_ui_slash_command 2026-03-28 08:17:05 +00:00
dave 3b0542cd41 storkit: create 419_bug_matrix_bot_crashes_on_transient_network_error_instead_of_retrying 2026-03-28 08:10:38 +00:00
dave 102919e0b3 storkit: accept 415_refactor_split_agents_pool_mod_rs_into_submodules 2026-03-27 19:53:40 +00:00
dave d63aa0a3c2 storkit: accept 416_refactor_split_io_fs_rs_into_submodules 2026-03-27 19:49:39 +00:00
dave 7f7db57933 storkit: accept 414_story_loc_command_filters_out_known_huge_files 2026-03-27 19:14:37 +00:00
dave 043791194f storkit: accept 413_refactor_split_slack_rs_into_focused_modules 2026-03-27 18:59:36 +00:00
dave 710f839c65 storkit: accept 409_refactor_split_whatsapp_rs_into_focused_modules 2026-03-27 18:38:35 +00:00