fabro/lib
luxamior c67ef194a9 Explain schema mismatches as a version skew
`map_api_error_structured` had no arm for progenitor's
`InvalidResponsePayload`, so it fell through to the `other` branch and was
rendered by progenitor's own Display:

    Error::InvalidResponsePayload(b, e) => write!(f, "Invalid Response Payload ({:?}): {}", b, e)

That `{:?}` dumps the entire body. Running a 0.254 CLI against a 0.333
server turned `fabro inspect` into 30KB of escaped JSON with no statement
of the cause, and `fabro events` did the same. `fabro version` and
`fabro doctor` both report the mismatch correctly; the commands that
actually fail did not.

Give the variant its own arm. The message now leads with the schema
mismatch, names the CLI version, and points at `fabro version` to compare
with the server followed by `fabro upgrade`. It mentions `--prerelease`
because the plain upgrade path only considers stable releases, so a server
on a nightly leaves the CLI reporting it is already current. The body is
kept as a 200-character preview, enough to recognize the payload without
scrolling the remediation away.

`classify_api_error` delegates to `map_api_error_structured`, so it picks
this up too.

Verified with cargo check, cargo test (9 passed, including the 7 that
already existed), and cargo clippy --all-targets -- -D warnings, all on
stable 1.98.0 in Docker. The pinned nightly-2026-04-14 fmt and clippy runs
that CI uses have not been run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HMb7GgUkEkk8CWc6MPpy2w
2026-08-23 18:18:14 +09:00
..
apps Merge origin/main into feat/venice-search-provider 2026-08-21 21:04:28 -04:00
components Merge pull request #782 from fabro-sh/prompt-value-budget 2026-08-21 23:48:49 -04:00
foundation Explain schema mismatches as a version skew 2026-08-23 18:18:14 +09:00
packages/fabro-api-client refactor(search): select backend from available credentials 2026-08-21 20:09:52 -04:00