Skip to content

Fix validation logic to properly gate bot responses#145

Merged
DimaBir merged 5 commits into
dimabir/github_bot_respond_wikifrom
copilot/sub-pr-144
Feb 11, 2026
Merged

Fix validation logic to properly gate bot responses#145
DimaBir merged 5 commits into
dimabir/github_bot_respond_wikifrom
copilot/sub-pr-144

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

The validation step was running security checks but its output wasn't gating bot responses. The job's should_respond output only checked conversation state, allowing the bot to respond to content that failed validation (injection attempts, rate limits, etc.).

Changes:

  • Combined validation with state checks: Job output now requires both conversation-state.should_respond AND validation.validation_passed to be true
  • Renamed validation output: Changed from should_respond to validation_passed to clarify it's a validation result, not a final decision
  • Documented validation scope: Added comments explaining validation applies only to new content (comment body for comment events, issue body for issue events), not historical conversation

Behavior:

# Before: validation results ignored
outputs:
  should_respond: ${{ steps.conversation-state.outputs.should_respond }}

# After: both checks required
outputs:
  should_respond: ${{ (steps.conversation-state.outputs.should_respond == 'true' && steps.validation.outputs.validation_passed == 'true') ? 'true' : 'false' }}

This ensures the bot won't respond if new content fails security validation, while allowing clean comments on issues that had problematic bodies (and vice versa).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 11, 2026 07:10
Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow for issue assistant based on feedback Fix validation logic to properly gate bot responses Feb 11, 2026
Copilot AI requested a review from DimaBir February 11, 2026 07:16
@DimaBir DimaBir marked this pull request as ready for review February 11, 2026 07:16
@DimaBir DimaBir merged commit a26ec85 into dimabir/github_bot_respond_wiki Feb 11, 2026
1 check passed
@DimaBir DimaBir deleted the copilot/sub-pr-144 branch February 11, 2026 07:17
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.

2 participants