Removed the obsolete bess-os-algo-forecast-as project (Project::AsForecast) from mando-cli per Andras’s decision. Working tree, uncommitted (pending push). The load-bearing lesson: deleting an enum variant used as a persisted-state map key silently wiped saved state until fixed.
What was removed
Compiler-driven removal — deleted the variant, then followed every build error:
Project::AsForecastenum variant- Its slug + aliases
- Its config default YAML
- Builtin profiles
mocked-algos/full/fast-dev— now 4 services each (was 5) - e2e fixtures + docs truth pass: README (now five repos / two algos), skill table, datadog guide
The lesson
Deleting an enum variant = audit every persisted format keyed by it before shipping
Project::AsForecastwas used as a key in the persistedHashMap<Project, _>inside.bessstate.json. The derived map deserialization fails on a stale"AsForecast"key, and theunwrap_or_defaultfallback then silently wipes the entireprojectsmap — every override and toggle — which the nextsave()dutifully persists. Silent data loss, no error surfaced.
How it was caught: the first implementer casually removed the e2e fixture’s AsForecast state entry “so it would deserialize.” That dodge was the tell — the real bug was that a real user’s on-disk state would break the same way.
Fix
Per-key tolerant map deserialization (filter_known_projects) that mirrors save()’s key format:
- Keys are PascalCase variant names (what
save()writes), so resolve viaProject::deserializeon aStrDeserializer— explicitly NOTfrom_alias(lowercase slugs), which would have silently dropped every non-Mando entry. warn!per dropped/unknown key so loss is visible.- Red-green tested with a mixed-keys state file.
- e2e fixture entry restored as a live regression guard (not deleted).
Also verified
- User
.runprofiles/*.yamlnaming the dead slug fail cleanly:validateerrors “not a known project”; compose warn-skips. - Leftover
bess-os-algo-forecast-as/directories in existing workspaces are ignored gracefully.
Gate
- Reviewer approved all areas.
- 403 lib + 8 integration tests, clippy 0.