From f023dfcda7cdfaa35bfcec9da0ba4361b9f3b98f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 27 May 2026 13:12:58 +0000 Subject: [PATCH] =?UTF-8?q?fix(callcenter):=20with=5Fjsonl=5Faudit=20retur?= =?UTF-8?q?n=20type=20io::Result=20=E2=86=92=20Result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `UnifiedBridge::with_jsonl_audit` (behind the `jsonl` feature) was declared `-> std::io::Result` but its body opens the sink via `JsonlAuditSink::new(base_path.into())?`, which returns `Result<_, crate::audit_sink::AuditError>`. `AuditError` has no `impl Into`, 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` — 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) --- crates/lance-graph-callcenter/src/unified_bridge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lance-graph-callcenter/src/unified_bridge.rs b/crates/lance-graph-callcenter/src/unified_bridge.rs index 8d9e63dd..7af52a41 100644 --- a/crates/lance-graph-callcenter/src/unified_bridge.rs +++ b/crates/lance-graph-callcenter/src/unified_bridge.rs @@ -312,7 +312,7 @@ impl UnifiedBridge { super_domain: SuperDomain, salt: u64, base_path: impl Into, - ) -> std::io::Result { + ) -> Result { let sink = Arc::new(crate::audit_sink::JsonlAuditSink::new(base_path.into())?); Ok(self.with_audit_chain(super_domain, salt, sink)) }