Structure kernel terminate stage with event delivery guarantee
- Lingua principale
- Python
- Stelle
- 670
- Fork
- 183
- Merge medio
- 21h 49m
- PR unite (30g)
- 404
Descrizione
Refactor the termination phase (stop_container, cleanup_scratch, release_resources) into a TerminateStageHandler under agent/stage/. RETURNS A RESPONSE ONLY - no event emission. Local phase transitions: -> TERMINATING, TERMINATING -> TERMINATED. Teardown must be idempotent and leave no orphan container.
The Agent does NOT emit a CANCELLED transition - CANCELLED/reschedule belongs to sokovan session scheduling.
Do NOT emit KernelTerminating/TerminatedAnycastEvent from the handler - transitions are reported by the transition-event layer (BA-6851).
Success Criteria:
- [ ] Termination runs through TerminateStageHandler
- [ ] Handler returns a response only (no event emission)
- [ ] No orphan container remains on termination failure (retry or fallback cleanup)
- [ ] pants test passes for affected packages
JIRA Issue: BA-6079
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in agent/stage/ e individua il flusso di terminazione esistente con stop_container, cleanup_scratch e release_resources. Traccia le transizioni locali TERMINATING e TERMINATED e il livello degli eventi di transizione indicato come BA-6851. Il lavoro è completo quando la terminazione passa attraverso TerminateStageHandler, restituisce solo una risposta, è idempotente, non lascia alcun container orfano dopo un errore e i test pants del pacchetto interessato hanno esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, python
- Ambito
- backend, distributed-systems
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100