Development record
A drain state written by a newer abcd is refused as a file that does not parse, with a remedy that throws the drain away. readDrain (internal/core/implement/loop/drain.go) decodes the drain state strictly and refuses any schema_version other than its own, so a newer abcd's drain state (a later drain schema, or a field a newer build adds to a stored route) reads as "does not parse as the drain's state" with the remedy "restore it or remove it", which deletes the drain record of the newer run. The run state already refuses a newer writer's file before any strict decode, naming it a newer abcd's and saying not to remove it (decodeState); the drain state has no such check.
A drain state written by a newer abcd is refused as a file that does not parse, with a remedy that throws the drain away. readDrain (internal/core/implement/loop/drain.go) decodes the drain state strictly and refuses any schema_version other than its own, so a newer abcd's drain state (a later drain schema, or a field a newer build adds to a stored route) reads as "does not parse as the drain's state" with the remedy "restore it or remove it", which deletes the drain record of the newer run. The run state already refuses a newer writer's file before any strict decode, naming it a newer abcd's and saying not to remove it (decodeState); the drain state has no such check.
Frontmatter
| id | iss-2610230223231843 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610230223231843-a-drain-state-a-newer-abcd-wrote-is.md
open on GitHub ↗ · commit history ↗