Conversation
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>
There was a problem hiding this comment.
💡 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(), |
There was a problem hiding this comment.
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`, |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
New surface