vestige/crates
Sam Valladares 45190ff74d fix(export): replace unreachable!() with defensive Err on unknown format
The export format match at the write-out site was `_ => unreachable!()`,
supposedly safe because the early-return gate at the top of the function
rejects anything that isn't "json" or "jsonl". That gate works today,
but `unreachable!()` converts any future gate-vs-match drift (case
sensitivity bug, refactor, new format branch added above but not below)
into a user-visible panic through the MCP dispatcher instead of a clean
error response.

Replace with a typed `Err(format!("unsupported export format: {:?}",
other))` so the defence lives at both layers. Same runtime behaviour
for every valid input; strictly safer for any invalid input that would
have slipped through a future refactor.
2026-04-19 20:23:52 -05:00
..
vestige-core test(v2.0.7): cover the new behaviors the branch was shipping blind 2026-04-19 17:02:36 -05:00
vestige-mcp fix(export): replace unreachable!() with defensive Err on unknown format 2026-04-19 20:23:52 -05:00