Docker: idempotency-aware retry; Observer independent fetch degradation
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- elixir
- Área
- backend, distributed-systems
Línea de trabajo
Lee los puntos de entrada citados de reconciler, janitor y Events.Tap en las líneas indicadas y, a continuación, sigue los flujos existentes de corrección, gestión de release e inicialización de Tap. Valida cada caso de aceptación: un respawn permanece activo, una función de release que lanza una excepción no hace que la app entre en un bucle de reinicios y el orden de los eventos se conserva tras reiniciar Tap.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Three coordination-layer hardening gaps.
Reconciler clobbers fresh state with a stale snapshot (TOCTOU). lib/loopyard/agent/reconciler.ex:128,188 — do_reconcile captures {id, summary} from ETS, checks Registry, then applies corrections after the full scan. If an agent respawns between check_entry and apply_correction, apply_correction does :ets.insert(:chat_agents, {id, %{stale_summary | status: :crashed}}) — overwriting the new agent's fresh summary with a stale one marked :crashed. The UI shows a live agent as crashed until its next status publish. This is precisely the crash-then-respawn window the reconciler targets.
Janitor doesn't catch :throw. lib/loopyard/resources/janitor.ex:356 — run_release/4 has rescue + catch :exit, _ but no :throw clause (contrast Saga.safe_run). A throwing release_fn crashes the Janitor mid-release_for_owner (remaining resources skipped), and on restart rehydrate_from_ets re-runs the same release_fn inside init/1 → throws again → restart loop → root supervisor's restart budget exhausted → whole app shuts down from one bad closure.
Events.Tap seq resets on restart. lib/loopyard/events/tap.ex:117 — :events_tap is StateKeeper-owned and survives a Tap restart, but state.seq restarts at 0. Post-restart events get keys 1,2,3… which overwrite the oldest surviving records and sort as the oldest in recent/0 → /system/events shows fresh broadcasts at the bottom and destroys prior tape. Seed seq from :ets.last(@table) in init/1.
Fix
- Re-check
agent_alive?(id)and re-read the ETS row insideapply_correctionbefore inserting. - Add
:throw, value ->clauses torun_release/4mirroring the:exithandling. - Seed
Events.Tapseqfrom the surviving table ininit/1.
Acceptance
- A respawn during reconcile does not mark the live agent crashed.
- A throwing release_fn is contained and does not restart-loop the app.
/system/eventsordering survives a Tap restart.
- Lenguaje dominante
- Elixir
- Estrellas
- 85
- Forks
- 11
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 loopyard/loopyard
-
tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
epic reliability
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
ux
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
epic feature ux
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
ux
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Todos los issues de loopyard/loopyard
Issues similares
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
intellij-elixir/intellij-elixir#4782 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
hexlet-codebattle/codebattle#2376 ·
-
level 2 wocs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
phravins/QuantumBilling#51 ·
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtimePosiblemente ocupada @Goldziher la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
carverauto/serviceradar#6898 ·
Los mantenedores suelen responder en 1 día