Skip to content

FIX: allow automatic follow-ups for negative-ID chatbot users - #188

Merged
merefield merged 1 commit into
mainfrom
fix/negative-id-bot-followups
Sep 29, 2026
Merged

merefield merged 1 commit into
mainfrom
fix/negative-id-bot-followups

Conversation

@merefield

Copy link
Copy Markdown
Owner

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 -4 receives no reply because the previous-participant query excludes every non-positive user ID and reports prior_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.

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 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.

@merefield
merefield merged commit 4de89b1 into main Sep 29, 2026
6 checks passed
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