Update issue assistant workflow with rate limits and state management#144
Conversation
Signed-off-by: Dima Birenbaum <dvlasenko86@gmail.com>
Due to missing permissions to allow Bot create PR, this was moved to issue-assistant workflow to pull wiki on new Issue. Wiki a pretty light weight so it is ok. Signed-off-by: Dima Birenbaum <dvlasenko86@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR transforms the issue assistant workflow from a simple single-response bot into a stateful conversational assistant with multi-turn dialogue capabilities. The changes introduce conversation state tracking, enhanced rate limiting, and outcome-based response handling, while removing the wiki cache refresh workflow.
Changes:
- Implements conversation state machine with states (initial, gathering, final_attempt, resolved, escalated) and terminal state enforcement
- Adds multi-turn conversation support with full history tracking and context-aware prompting
- Introduces new rate limits: 4 responses per issue (MAX_BOT_RESPONSES), 2-minute cooldown between responses, and increases per-user limit from 5 to 10 per hour
- Removes the refresh-wiki-cache.yml workflow, relying solely on runtime wiki cloning
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
| .github/workflows/refresh-wiki-cache.yml | Deleted - removes automated wiki cache refresh, forcing runtime wiki cloning for each bot response |
| .github/workflows/issue-assistant.yml | Major overhaul adding conversation state management, history tracking, multi-response support, outcome-based labeling, and enhanced safety checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
* Initial plan * Fix validation logic to properly check only new content Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Use explicit string conversion for validation output Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Make should_respond output explicitly return string Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Use ternary operator and improve validation log message Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
* Initial plan * Add upper bound validation for AI response length Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Refactor response length validation to use named constants Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Optimize response validation and improve comment clarity Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Improve consistency in validation messages and comment clarity Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
…#147) * Initial plan * Add visible warning when label addition fails during escalation Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
* Initial plan * Fix rate limit interaction: increase per-user limit to 12 and unify max responses check Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Fix maxBotResponses check to handle undefined correctly Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
* Initial plan * Fix conversation history duplication in AI prompt Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
* Initial plan * Mark latest message explicitly in conversation history Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Signed-off-by: Dima Birenbaum <dvlasenko86@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> Co-authored-by: Dima Birenbaum <dvlasenko86@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
…tate management (#151) * Initial plan * Address review feedback: sanitization, state management, and validation improvements Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Add clarifying comment for system prompt formatting logic Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Add clarifying comments about state determination logic and terminal state handling Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Simplify state logic and add documentation to sanitization function Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Improve documentation for sanitization function and state logic Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Simplify and clarify state determination logic Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Improve sanitization function with explicit null handling and line ending normalization Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Add defensive initialization and clarify terminal state handling Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> * Remove redundant else branch in state determination logic Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
No description provided.