mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-25 00:36:22 +02:00
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.
|
||
|---|---|---|
| .. | ||
| vestige-core | ||
| vestige-mcp | ||