✨ feat(kebab-cli): error_classify dispatcher + wire helpers (fb-27)

`error_classify::classify` maps anyhow::Error → ErrorV1 wire record by
downcasting to known typed errors (LlmError + ConfigInvalid + NotIndexed
re-exported from kebab_app::error_signal, plus std::io::Error chain).
Generic fallback emits `code: "generic"` with the chain in `details` when
verbose.

wire.rs adds wire_schema (idempotent re-tag, mirrors wire_doctor pattern
since SchemaV1 carries its own schema_version field) and wire_error_v1
(simple tag_object). Tests pin both wrappers + 7 classify code paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-05-07 12:11:54 +09:00
parent 3e33daaa9b
commit c91228e7d5
5 changed files with 263 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ kebab-eval = { path = "../kebab-eval" }
# launches it.
kebab-tui = { path = "../kebab-tui" }
anyhow = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
clap = { version = "4", features = ["derive"] }
# p9-fb-02: ingest progress UI.
@@ -43,3 +44,6 @@ ctrlc = "3"
[dev-dependencies]
tempfile = { workspace = true }
# llm_unreachable_classifies_to_model_unreachable test needs a real
# reqwest::Error (private constructor) — built from a connect-refused call.
reqwest = { version = "0.12", default-features = false, features = ["blocking", "rustls-tls"] }