Skip to content

Update issue assistant workflow with rate limits and state management#144

Merged
DimaBir merged 15 commits into
mainfrom
dimabir/github_bot_respond_wiki
Feb 11, 2026
Merged

Update issue assistant workflow with rate limits and state management#144
DimaBir merged 15 commits into
mainfrom
dimabir/github_bot_respond_wiki

Conversation

@DimaBir

@DimaBir DimaBir commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Dima Birenbaum <dvlasenko86@gmail.com>
@DimaBir DimaBir self-assigned this Feb 11, 2026
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>

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml
Comment thread .github/workflows/issue-assistant.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

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.

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #145, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #146, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #147, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dima Birenbaum <dima@birenbaum.co>

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #148, to work on those changes. Once the pull request is ready, I'll request review from you.

DimaBir and others added 2 commits February 11, 2026 09:08
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>

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #149, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dima Birenbaum <dima@birenbaum.co>

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #150, to work on those changes. Once the pull request is ready, I'll request review from you.

DimaBir and others added 6 commits February 11, 2026 09:09
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>

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/workflows/issue-assistant.yml Outdated
Comment thread .github/issue-assistant/src/security.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dima Birenbaum <dima@birenbaum.co>
@DimaBir

DimaBir commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@DimaBir I've opened a new pull request, #151, to work on those changes. Once the pull request is ready, I'll request review from you.

…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>
@DimaBir DimaBir merged commit 0f42aae into main Feb 11, 2026
11 of 12 checks passed
@DimaBir DimaBir deleted the dimabir/github_bot_respond_wiki branch February 11, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants