Make simulation block submission idempotent
This commit is contained in:
@@ -15,6 +15,11 @@ func _run() -> void:
|
||||
service.simulation = {"id": "active", "state": "between_blocks", "currentBlock": 2, "totalBlocks": 12, "createdUtc": "2026-07-16T22:04:00Z"}
|
||||
service.history = [{"id": "completed", "state": "completed", "currentBlock": 11, "totalBlocks": 12, "createdUtc": "2026-07-15T20:35:00Z", "predictedScore": 236, "rangeLow": 221, "rangeHigh": 248, "passProbability": 0.82}]
|
||||
service.history_next_cursor = "next-page"
|
||||
_assert(service._is_stale_submit_failure("submit"), "a submit failure after reaching between-block state should be ignored")
|
||||
service.simulation["state"] = "completed"
|
||||
_assert(service._is_stale_submit_failure("submit"), "a submit failure after completion should be ignored")
|
||||
_assert(not service._is_stale_submit_failure("save"), "non-submit failures should still be surfaced")
|
||||
service.simulation["state"] = "between_blocks"
|
||||
var host := Control.new()
|
||||
host.size = Vector2(1400, 800)
|
||||
root.add_child(host)
|
||||
|
||||
Reference in New Issue
Block a user