Hermes plugin: retains still queued when Hermes exits are dropped after 10s

Aperta
#6,915 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with hindsight-integrations/hermes/__init__.py, especially shutdown() and its writer.join(timeout=10.0) call. Compare the drain behavior with the coding-agents integration linked as issue #6559, and check how queued retains are created and sent. Done means completed turns are not silently lost at exit; verify with the rapid sync_turn() then shutdown() scenario described in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

integration:hermes

What happens

When Hermes exits, the Hindsight plugin's shutdown() waits at most 10 seconds for queued retains (hindsight-integrations/hermes/__init__.py, writer.join(timeout=10.0)). Anything still queued after that is dropped: there is no on-disk queue, so the next start doesn't resend it. In practice the last turn(s) of a session can be lost.

How to see it

Seen while testing #6913 against a real local server with retain_async: false: three sync_turn() calls in quick succession, then shutdown(). Each retain took ~5–10 s (real LLM extraction), and only the first two turns reached the bank. With a 20 s pause between turns all three arrived.

It is most likely with retain_async: false, a slow or briefly unreachable server, or retain_every_n_turns > 1 flushing a batch at exit. With the default async retain the server answers fast, so the window is smaller but still there when the server is slow or retrying.

What should happen

A turn the user saw completed is not silently lost at exit. Options: give the drain a longer, configurable budget; log loudly how many retains were dropped; or spool unsent jobs to disk and send them on the next initialize() (the coding-agents integration does a version of this, see #6559).

Lingua principale
Python
Stelle
45.2k
Fork
5.9k
Merge medio
6h 18m
PR unite (30g)
354

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vectorize-io/hindsight

Tutte le issue di vectorize-io/hindsight

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.