-
Notifications
You must be signed in to change notification settings - Fork 58
Update issue assistant workflow with rate limits and state management #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Dima Birenbaum <[email protected]>
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 <[email protected]>
There was a problem hiding this 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
* Initial plan * Fix validation logic to properly check only new content Co-authored-by: DimaBir <[email protected]> * Use explicit string conversion for validation output Co-authored-by: DimaBir <[email protected]> * Make should_respond output explicitly return string Co-authored-by: DimaBir <[email protected]> * Use ternary operator and improve validation log message Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
* Initial plan * Add upper bound validation for AI response length Co-authored-by: DimaBir <[email protected]> * Refactor response length validation to use named constants Co-authored-by: DimaBir <[email protected]> * Optimize response validation and improve comment clarity Co-authored-by: DimaBir <[email protected]> * Improve consistency in validation messages and comment clarity Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
…#147) * Initial plan * Add visible warning when label addition fails during escalation Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
* Initial plan * Fix rate limit interaction: increase per-user limit to 12 and unify max responses check Co-authored-by: DimaBir <[email protected]> * Fix maxBotResponses check to handle undefined correctly Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
* Initial plan * Fix conversation history duplication in AI prompt Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
* Initial plan * Mark latest message explicitly in conversation history Co-authored-by: DimaBir <[email protected]> --------- Signed-off-by: Dima Birenbaum <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]> Co-authored-by: Dima Birenbaum <[email protected]>
There was a problem hiding this 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 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 <[email protected]> Signed-off-by: Dima Birenbaum <[email protected]>
|
@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 <[email protected]> * Add clarifying comment for system prompt formatting logic Co-authored-by: DimaBir <[email protected]> * Add clarifying comments about state determination logic and terminal state handling Co-authored-by: DimaBir <[email protected]> * Simplify state logic and add documentation to sanitization function Co-authored-by: DimaBir <[email protected]> * Improve documentation for sanitization function and state logic Co-authored-by: DimaBir <[email protected]> * Simplify and clarify state determination logic Co-authored-by: DimaBir <[email protected]> * Improve sanitization function with explicit null handling and line ending normalization Co-authored-by: DimaBir <[email protected]> * Add defensive initialization and clarify terminal state handling Co-authored-by: DimaBir <[email protected]> * Remove redundant else branch in state determination logic Co-authored-by: DimaBir <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DimaBir <[email protected]>
No description provided.