Skip to content

Comments

Ant Farm room poller (v0.2 experimental)#3

Open
ThinkOffApp wants to merge 2 commits intomainfrom
antfarm-poller-v0.2
Open

Ant Farm room poller (v0.2 experimental)#3
ThinkOffApp wants to merge 2 commits intomainfrom
antfarm-poller-v0.2

Conversation

@ThinkOffApp
Copy link
Owner

Summary

  • Ant Farm room API poller for IDE Agent Kit
  • Polls joined rooms, normalizes to antfarm.message.created events
  • Appends to shared JSONL queue (same format as webhook events)
  • Experimental v0.2 feature, separate from v0.1 core

New surface

  • New source kind: antfarm
  • New event kind: antfarm.message.created
  • Requires Ant Farm API key in config

Petrus Pennanen and others added 2 commits February 21, 2026 21:21
Polls joined rooms via Ant Farm API, normalizes messages to
antfarm.message.created events, appends to shared JSONL queue.
Tracks seen IDs to avoid duplicates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34bd93fd03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const normalized = {
trace_id: randomUUID(),
event_id: body.delivery || randomUUID(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use GitHub delivery UUID for event_id

event_id is populated from body.delivery, but GitHub sends the stable delivery identifier in the X-GitHub-Delivery header, so this path almost always falls back to a random UUID. When GitHub retries the same webhook delivery, the queue entry gets a different event_id, which breaks idempotent deduplication for downstream consumers that rely on event_id as the inbound idempotency key.

Useful? React with 👍 / 👎.

return new Promise((resolve, reject) => {
const req = https.request({
hostname: 'antfarm.world',
path: `/api/v1/rooms/${room}/messages?limit=20`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Paginate Ant Farm polling beyond fixed 20-message window

The poller always requests messages?limit=20 and does not paginate or otherwise backfill older unseen messages, so if a room gets more than 20 messages between polling intervals (or while the poller is down), the older unseen messages fall out of the window and are never enqueued. This causes silent event loss in busy rooms.

Useful? React with 👍 / 👎.

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.

1 participant