Repository navigation
fix(xchat): run conversation discovery on its own cadence - #280
Closed
salch-cred wants to merge 1 commit into
Closed
salch-cred wants to merge 1 commit into
salch-cred wants to merge 1 commit into
Conversation
The poll loop spent one conversation-list read per cycle. The list endpoint is billed per call against a separate 1,000/day budget, so at the default 30 s interval the budget empties in about 8 hours and inbound dies for the rest of the window. Discovery now runs at startup and then at most every max(600 s, 20 poll cycles); between discoveries every known conversation is polled directly (an idle events page returns no resources). New conversations are picked up on the next discovery pass instead of within one poll cycle - the trade the budget imposes. Refs NousResearch#228.
This was referenced Nov 19, 2026
Closed
teknium1
added a commit
that referenced
this pull request
Nov 19, 2026
…inned sets pinned Salvage follow-up on #280 + #227. With discovery on its own cadence every known conversation gets an events read each cycle, so a long-lived account with many (persisted) conversations would trade the list budget for the events one (10,000/24h): the cycle now stretches past XCHAT_POLL_INTERVAL once the reads would exceed 9,000/day (one conversation at the 10 s default is unchanged). Persisted conversation ids no longer widen an explicitly pinned XCHAT_CONVERSATION_IDS set. README describes the new inbound cadence. (cherry picked from commit a6cdeb5)
Contributor
|
Thank you @salch-cred! Your commit is carried in #437 with your authorship, combined with the sibling X Chat pacing fix, and it landed via #446 (tip f99d3fd). Closing in favour of that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From #228's budget math: the poll loop spent one conversation-list read per cycle. The list endpoint is billed per call against a separate 1,000/day budget (events: 10,000), so at the default 30 s interval the list budget empties in ~8 hours — after which inbound dies for the rest of the window even though events would still answer.
Discovery now runs at startup and then at most every
max(600s, 20 poll cycles); between discoveries every known conversation is polled directly (an idle events page returns no resources, so that stays cheap). New conversations are picked up on the next discovery pass instead of within one poll cycle — the trade the budget imposes, and the same direction as the persisted-ids/degrade work in #277.Refs #228.