fix(callcenter): with_jsonl_audit return type io::Result → Result<Self, AuditError> (unblocks jsonl feature)#410
Conversation
…f, 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)
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesError type alignment for JSONL audit
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…return-type fix(callcenter): with_jsonl_audit return type io::Result → Result<Self, AuditError> (unblocks jsonl feature)
Summary
UnifiedBridge::with_jsonl_audit(behind thejsonlfeature) is declared-> std::io::Result<Self>but its body opens the sink viaJsonlAuditSink::new(...)?, which returnsResult<_, AuditError>.AuditErrorhas noimpl Into<std::io::Error>, so the?fails to convert — the function does not compile whenever a consumer enables thejsonlfeature (E0277:? couldn't convert the error to std::io::Error).This makes the
jsonlfeature currently unusable by any downstream consumer.Fix
Return
Result<Self, crate::audit_sink::AuditError>— the honest type the body already produces, consistent with the sibling builderswith_audit_chain/flush/checkpoint(allResult<_, AuditError>). The?now works without conversion. One-line change.Not a breaking change: grep finds no code callers (only a doc-comment reference in
audit_sink/mod.rs).Provenance
Surfaced by AdaWorldAPI/MedCare-rs#154 (
medcare_unified_bridge_audited), which enableslance-graph-callcenter/jsonland hit the broken build. Per the consumer's CLAUDE.md commitment #5 (no silent upstream patches), filed here as a proper PR rather than carried as a local patch.Test plan
cargo check -p lance-graph-callcenter --features jsonl— clean (was E0277)Generated by Claude Code
Generated by Claude Code
Summary by CodeRabbit