Saving the player's state can panic past the Result it returns #53

Open
opened 2026-08-15 18:59:59 +00:00 by rosa · 0 comments
Owner

Saving the player's state takes the parent of the path it was given without
checking there is one, and treats a failure to serialize as unreachable — both
inside a function that already returns a Result and has a caller ready to
handle one. Either can bring the process down at the point a player's progress
is being written, which is the worst moment for it.

This is the same defect as the one fixed in the config's own save, and the same
fix. It was left out of that work because state is not hard to test today — it
takes a path already — so fixing it there would have been a change riding along
rather than one serving the goal.

Blocked by

  • None — can start immediately.
Saving the player's state takes the parent of the path it was given without checking there is one, and treats a failure to serialize as unreachable — both inside a function that already returns a `Result` and has a caller ready to handle one. Either can bring the process down at the point a player's progress is being written, which is the worst moment for it. This is the same defect as the one fixed in the config's own save, and the same fix. It was left out of that work because state is not hard to test today — it takes a path already — so fixing it there would have been a change riding along rather than one serving the goal. ## Blocked by - None — can start immediately.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rosa/casino#53
No description provided.