Repository navigation
FIX: allow automatic follow-ups for negative-ID chatbot users - #188
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified, and validation passed.
Review effort: Lite
Findings: None
What changed in this PR
Fixes automatic topic follow-ups for configured chatbot users with negative IDs.
Changes:
- Includes the configured bot ID in prior-participant lookup.
- Adds regression coverage and safeguards.
- Bumps the plugin version to 3.1.6.
| File | Summary |
|---|---|
spec/lib/post/topic_auto_reply_spec.rb |
Adds negative-ID bot regression tests. |
plugin.rb |
Bumps the patch version. |
lib/discourse_chatbot/post/post_evaluation.rb |
Recognizes configured negative-ID bots. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic topic follow-ups fail when the configured chatbot has a negative user ID. For example, a human following a summary posted by bot user
-4receives no reply because the previous-participant query excludes every non-positive user ID and reportsprior_user_was_bot=false.Include the configured bot ID alongside positive user IDs in that lookup. Other system accounts remain excluded, and the existing reply limit and single-human-participant rules still apply. Bumps the patch version to 3.1.6.
Regression coverage reproduces a negative-ID bot starting a topic, an intervening system post, and an unmentioned human follow-up. It also checks that disabling automatic replies or adding another human still prevents a reply, and that an unrelated negative-ID account does not count as chatbot participation.
Validation: the new regression failed before the fix. Full backend suite: 292 examples, 0 failures. Targeted lint and git diff --check passed.