chore: moving diverged states from error to completed #3021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
web.monitorwould error when a simulation diverges. Previously we did not want this to happen because a diverged simulation still contains results if the user e.g. wants to examine where the divergence happens, etc.Moving the diverge(d) statuses to completed state restores previous behavior. The user still sees a warning when the SimulationData is loaded.
Greptile Overview
Greptile Summary
Moved
divergeanddivergedstates from ERROR_STATES to COMPLETED_STATES to restore previous behavior whereweb.monitordoesn't error on diverged simulations.diverge/divergedas 0% instead of COMPLETED_PERCENT (100%), creating inconsistency with their new classification as completed statesConfidence Score: 3/5
Important Files Changed
File Analysis
divergeanddivergedfrom ERROR_STATES to COMPLETED_STATES, but STATE_PROGRESS_PERCENTAGE still shows them as 0% instead of 100%Sequence Diagram
sequenceDiagram participant User participant web.monitor participant get_status participant states User->>web.monitor: monitor(task_id) web.monitor->>get_status: get_status(task_id) get_status->>states: check status in END_STATES alt Status is "diverged" (BEFORE this PR) states-->>get_status: status in ERROR_STATES get_status-->>web.monitor: raise WebError web.monitor-->>User: Error thrown else Status is "diverged" (AFTER this PR) states-->>get_status: status in COMPLETED_STATES get_status-->>web.monitor: status = "diverged" web.monitor-->>User: Complete successfully Note over User: User can load SimulationData<br/>and see warning about divergence end