Skip to content

Bound GitHub reaction polls to 30 days - #335

Open
joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/102-reaction-poll-age
Open

joei4cm wants to merge 1 commit into
CopilotKit:mainfrom
joei4cm:fix/102-reaction-poll-age

Conversation

@joei4cm

@joei4cm joei4cm commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #102

Summary

  • Bounds GITHUB_REACTION_POLL to AI-generated GitHub issue messages created within the last 30 days.
  • Adds an exported GITHUB_REACTION_POLL_MAX_AGE_DAYS constant and computes the cutoff using exact 24-hour multiples, so local time zones and DST changes cannot shift the window.
  • Documents the accepted tradeoff: reactions after the window are missed. The cutoff is based on the Message.createdAt row time rather than the time the comment actually posted, so a delayed post retry can also fall outside the window.

Testing

  • vitest run queue/src — 16 files / 568 tests passed
  • Added a clock-frozen regression for the 30-day query cutoff (red before the fix, green after)
  • tsc --project queue/tsconfig.json --noEmit
  • eslint queue/src — 0 errors
  • prettier --check on changed files
  • git diff --check

🤖 Generated with Claude Code

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

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

GITHUB_REACTION_POLL: bound the poll by message age

1 participant