Skip to content

Commit f023dfc

Browse files
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

File tree

crates/lance-graph-callcenter/src/unified_bridge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<B: NamespaceBridge> UnifiedBridge<B> {
312312
super_domain: SuperDomain,
313313
salt: u64,
314314
base_path: impl Into<std::path::PathBuf>,
315-
) -> std::io::Result<Self> {
315+
) -> Result<Self, crate::audit_sink::AuditError> {
316316
let sink = Arc::new(crate::audit_sink::JsonlAuditSink::new(base_path.into())?);
317317
Ok(self.with_audit_chain(super_domain, salt, sink))
318318
}

0 commit comments

Comments
 (0)