evolve plugin: keep unsent turns, and a learning call in progress, across a config reload
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- ai-infra-agents
Línea de trabajo
Start from the review thread on PR #2028 and docs/evolve-plugin.md ("What is learned from"). Then read the evolve plugin's Shutdown, process_trajectory and its recorder/batch-send path to see where unsent turns, retry slots and batch sequence live, plus the reloader's drainWindow handling. Option 2 is the smallest first slice; done means a reload neither drops unsent turns nor cancels an in-flight learning call, with tests for both and the doc updated.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #2028, from review.
Problem
A config reload replaces the evolve plugin's instance. The reloader swaps in new pipelines and stops the old ones once their requests drain (at most drainWindow, 10 minutes). Stopping the old instance calls Shutdown, which:
- drops every session's unsent turns. These are the turns recorded since the session's last batch was sent, which can be up to
idle_after_seconds(15 minutes) of work per session. - cancels a learning call in progress.
process_trajectoryruns evolve's LLM before it answers, so this can throw away minutes of work. Evolve may or may not have committed the batch.
A change to any plugin's config triggers a reload, agentop's plugin toggles included, so this happens far more often than a restart.
Since #2028 the new instance no longer sends a session's history again: it starts at each session's next prompt, with the session's task as context. So nothing is learned twice, but the turns that were waiting at the reload are never learned.
Options
- Hand the sessions over within the process. The old instance passes its recorders (unsent turns, retry slots, batch sequence) to the new one: for example, through a package-level registry keyed by the plugin's endpoint and namespaces. The new instance adopts a session's recorder the first time it sees that session. The old instance keeps recording while it drains, so the handover has to happen at
Shutdown, or the two instances must share the recorders. - Let a learning call in progress finish.
Shutdownstops the ticker but lets a call in progress finish within its context, instead of cancelling it. - Persist unsent turns in Cortex's plugin state store (
plugin-state.json). That covers restarts too, and would need a size bound.
Option 2 is small and independent of the others. 1 or 3 is the larger part.
Done when
- After a reload, turns recorded by the old instance and not yet sent are sent exactly once, by one of the two instances, under batch ids evolve hasn't seen.
- A reload doesn't cancel a learning call in progress, within a stated bound.
- Tests cover both, and
docs/evolve-plugin.md("What is learned from") describes the result.
Assisted-By: Claude (Anthropic AI) [email protected]
- Lenguaje dominante
- Go
- Estrellas
- 31
- Forks
- 49
- Merge medio
- 9 h 43 min
- PR fusionados (30 d)
- 367
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rossoctl/cortex
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
contextguru plugin: set keepalive.Record.Identity; context-guru v0.7.11 removes Record.AgentAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug laptop
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de rossoctl/cortex
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behindPosiblemente ocupada @arshil42 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Packaging: support mise-en-placeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
ether/etherpad-go#571 ·
Los mantenedores suelen responder en 1 día
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)Abiertocost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
sisaku-security/sisakulint#860 · 2 comentarios ·