-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Labels
track:maintenancemaintenance trackmaintenance track
Description
Background
How the autopilot currently handles scores of solutions is quite awkward. It takes a /solve response from a driver and turns it into a domain type. This struct has an optional score field which is set to None at construction. Later when the autopilot runs the winner selection logic it sets the value to Some(score). From that point onward the field is fully initialized and later read by the autopilot to ultimately store it in the DB.
This 2 phase initialization process is error prone since someone could try to read the value before it's initialized.
Ideally the code would be updates to make this value non-optional by already scoring the solution at construction of the domain type.
Metadata
Metadata
Assignees
Labels
track:maintenancemaintenance trackmaintenance track