Skip to content

memory ingestion: classify localhost model connect-refused as expected network-unreachable (stop Sentry flood) #4735

Description

@oxoxDev

Source

Sentry: TAURI-RUST-12K (project tauri-rust)
Events: 3071 · Users affected: 24 · Last seen: 2026-07-09 · Release: 0.58.7

Symptom

error sending request for url (http://localhost:1234/v1/chat/completions) — underlying tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061).

A user's local model server (LM Studio, localhost:1234) is not running. The memory-tree graph extraction path calls it, the connect is refused, and the error floods Sentry. No real user impact.

Root cause

The "network-unreachable" classifier (src/core/observability.rs::is_network_unreachable_message) already exists and IS applied on agent paths via report_error_or_expected (agent/harness/session/runtime.rs, inference/provider/reliable.rs) — those demote the identical error to a breadcrumb. But the memory-ingestion path reports with raw report_error() (src/openhuman/memory/ingestion/queue.rs), bypassing the classifier → 3071 unfiltered events.

Data-path check

No data loss: the source document is durably persisted before extraction (memory_store/client.rs::upsert_document), the failure is recorded in mem_tree_jobs (status='failed'), and a manual "Retry failed" lever exists (memory_tree_retry_failed RPC). Quieting the noise drops nothing.

Fix direction

Swap report_error(...)report_error_or_expected(...) at the memory-ingestion failure site so it goes through the existing network-unreachable classifier, matching the agent paths. One-line change + test.

Flagged follow-up (not owed here): auto-requeue failed extractions after the outage passes + a "N failed, retry" UI badge for discoverability.

S3.5 bucket

genuinely unpreventable — external local server down, zero local lever. Applying the existing classifier at a sibling call site; the identical error is already demoted on agent paths.

Reproduces on

upstream/main (still raw report_error).

Bug shape

Unhandled-but-expected network error — missing classifier at one call site.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions