Skip to content

review: thumbs-sweep reaction seeding (opt-in) and self-reaction filtering#223

Merged
jwbron merged 2 commits into
mainfrom
review-thumbs-seeding
Jul 9, 2026
Merged

review: thumbs-sweep reaction seeding (opt-in) and self-reaction filtering#223
jwbron merged 2 commits into
mainfrom
review-thumbs-seeding

Conversation

@jwbron

@jwbron jwbron commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Two additions to workflows/review/lib/thumbs-sweep.ts, ahead of scheduling the sweep on webapp and frontend:

  1. Opt-in reaction seeding (seedReactions: true in the sweep config): each sweep seeds one 👍 and one 👎, from the bot itself, on any reviewer comment that lacks them, so readers see the feedback buttons instead of having to open the reaction picker. Idempotent: only missing seeds are added (the bot's existing reactions are checked per comment).
  2. Self-reaction filtering: all feedback counting now excludes reactions whose reactor is botLogin. Without this, the seeded 👎 would make every comment count as downvoted and the sweep would follow-up-spam every thread. A reaction with no attributed login is conservatively treated as a real user's.

The port gains an optional addReactions(grain, commentId, contents) method; enabling seeding without implementing it fails loudly at sweep start. 9 new tests cover seeding, idempotency, the off-by-default path, self-filtering, real-user reactions alongside seeds, and config validation. Existing behavior is unchanged when seedReactions is absent.

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 014d94b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
review Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot khan-actions-bot requested a review from a team July 9, 2026 00:43
@jwbron jwbron requested a review from jeresig July 9, 2026 04:28
@jwbron jwbron self-assigned this Jul 9, 2026
@jwbron jwbron merged commit 2cdee74 into main Jul 9, 2026
3 checks passed
jwbron added a commit that referenced this pull request Jul 9, 2026
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