CCExtractor / CCExtractor/sample-platform
[BUG] Completed and canceled progress states are not treated as terminal
- Lingua principale
- Python
- Stelle
- 30
- Fork
- 85
- Merge medio
- 6g 21h
- PR unite (30g)
- 12
Descrizione
## Description
`progress_type_request` does not correctly reject progress updates after a test has reached `completed` or `canceled`.
`TestStatus.progress_step()` returns an integer progress index, but the returned integer was compared directly against `TestStatus.completed` and `TestStatus.canceled` enum symbols.
As a result, terminal states could be incorrectly treated as active progress states.
## Expected behavior
If the latest progress status is `completed` or `canceled`, a subsequent progress update should be rejected and the progress trail should remain unchanged.
## Actual behavior
The terminal-state guard was bypassed, allowing additional progress entries after `completed` or `canceled`.
## Reproduction
Regression tests demonstrate that:
- completed -> completed was accepted
- canceled -> completed was accepted
## Fix
Compare the stored `TestStatus` enum directly against the terminal enum values, while retaining `progress_step()` for numeric progress ordering.
## Tests
Regression tests cover both `completed` and `canceled` terminal states.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da progress_type_request e verifica come vengono confrontati TestStatus.progress_step() e i valori TestStatus memorizzati. Esegui i test di regressione menzionati nell’issue e considera completato il lavoro quando gli aggiornamenti successivi sia a stati completati sia annullati vengono rifiutati, mentre il percorso di avanzamento rimane invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 88/100