Commit f023dfc
committed
fix(callcenter): with_jsonl_audit return type io::Result → Result<Self, AuditError>
`UnifiedBridge::with_jsonl_audit` (behind the `jsonl` feature) was declared
`-> std::io::Result<Self>` but its body opens the sink via
`JsonlAuditSink::new(base_path.into())?`, which returns
`Result<_, crate::audit_sink::AuditError>`. `AuditError` has no
`impl Into<std::io::Error>`, so the `?` fails to convert — the function
does not compile whenever a consumer enables the `jsonl` feature.
This means the `jsonl` feature is currently unusable: any crate that turns
it on forces `lance-graph-callcenter` to compile `with_jsonl_audit`, which
errors with E0277 (`?couldn't convert the error to std::io::Error`).
Fix: return `Result<Self, crate::audit_sink::AuditError>` — the honest
type the body already produces, and consistent with the sibling builders
`with_audit_chain` / `flush` / `checkpoint` which all return
`Result<_, AuditError>`. The `?` now works without conversion.
No callers exist (grep: only a doc-comment reference in audit_sink/mod.rs),
so this is not a breaking change for any existing code.
Surfaced by AdaWorldAPI/MedCare-rs#154 (medcare_unified_bridge_audited),
which enables `lance-graph-callcenter/jsonl` and hit the broken build.
Per the consumer's commitment #5 (no silent upstream patches), the fix is
filed here as a proper lance-graph PR rather than carried as a local patch.
Verification: `cargo check -p lance-graph-callcenter --features jsonl` — clean.
Generated by [Claude Code](https://claude.ai/code)1 parent c5ed483 commit f023dfc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
0 commit comments