fix(archivist): stop losing long document filings to a timeout - #68
Merged
Conversation
Archiving a long email or scan ran past the 180s handler budget and the 120s per-call LLM budget, killing work that was still making progress. Now 8 minutes and 5 minutes. Failures are also visible where they happened: a cross on the message and the reason in its thread, instead of a loose reply in the room timeline. Reacting with the retry emoji on that message runs it again.
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.
Archiving a long email or scan ran past two budgets that were set for a
chat bot, not a document pipeline: the 180s handler timeout and the 120s
per-call LLM timeout. A 30K-token prefill on a local model gets cancelled
mid-flight by the latter, so the work was thrown away while it was still
making progress. Now 8 minutes and 5 minutes.
The failure was also invisible.
_send_errorreplied toevent.event_id,which for a reaction-triggered archive is the reaction event, so the notice
landed loose in the room timeline instead of the thread and nothing marked
the card. It now anchors on the message the user acted on: a cross next to
the eyes the handler already left, and the reason as a threaded reply.
Reacting with the retry emoji on that message runs the work again, covering
uploads as well as source cards. Re-adding the paperclip already worked for
cards; uploads had no retry at all.