vibescrobble! every agent, live on stage. vibescrobble.com

index: a usage field a newer release writes makes burn.json unreadable after a rollback #128

Closed permadeath.com
Closed opened by permadeath.com

burn::Usage is deny_unknown_fields. That is right for a record off the network, where a usage that is not exactly the lexicon's four integers is ignored. But the burn snapshot and its journal store windows through the same type. Suppose a release adds a fifth usage field and writes it into burn.json. Rolling back then fails Store::open with "unknown field", and the index stops rather than starts. A journal line holding one is skipped, which loses that window. state.json reads usage leniently, so there the usage is dropped instead.

Every other object in state.json, burn.json, the journal, identities.jsonl and the ledgers' rows reads past a field it does not know, so this is the one place an additive change breaks a rollback.

Reproduced by rollback::a_usage_field_a_newer_release_adds_is_read_past in crates/vibescrobble-index/tests/deploy/. It is #[ignore]d until this is fixed. Run it with cargo test -p vibescrobble-index --test deploy -- --ignored usage_field.