Repository navigation
Description
Discovered by
silent-failure-audit agent (swarm 2026-04-26). Full report: .agent/scratch/swarm-2026-04-26/silent-failure-audit.md. Synthesized in .agent/scratch/swarm-2026-04-26/SYNTHESIS.md.
Problem
Four sites in production code swallow exceptions in ways that risk data corruption or silent wrong-answer behavior. The codebase has zero bare except: clauses (a strength), but these four except Exception: blocks each hide failure modes that combine with the archive's content-hash idempotency to make the bug sticky: once a record is misclassified, subsequent re-imports won't retry.
Site 1 — polylogue/sources/dispatch.py:144-149
Stream-decoding swallows every exception during provider detection and demotes the record to fallback_provider with no log. Combined with content-hash idempotency, this creates sticky misclassifications that subsequent ingests will not retry. A user export that one-shot fails to detect (transient I/O blip, malformed UTF-8, partial download) is permanently mislabeled.
Site 2 — polylogue/pipeline/run_execution.py:317-324
FTS-trigger restoration is wrapped in except Exception: pass with a comment claiming "index rebuild handles FTS." In practice if restoration fails, search returns stale results until a manual full rebuild — and the stale state is invisible to polylogue check/polylogue doctor.
Site 3 — polylogue/pipeline/services/ingest_worker.py:401-408
A JSONL sample crash quietly returns None, which the caller treats as "not stream-shaped" and reroutes through a different parser. This breaks content-hash stability: the same input produces different IDs depending on whether the sample probe happened to hit a malformed line. A subtle source of "duplicate conversation" reports.
Site 4 — polylogue/storage/backends/schema_bootstrap.py:602-611
with suppress(Exception) around vec0 DDL hides corruption of the vector table. The vector store may be partially-initialized but the bootstrap reports success, so semantic search returns silently empty results.
Target
For each site, replace silent pass / return None with one of:
- Explicit
logger.exception(...)and surface inRunResult/ReadinessReport— operator sees degraded state. - Re-raise as a typed exception when the failure is non-recoverable.
- Return a typed
Failed | Skipped | Succeededvalue when the caller needs to distinguish.
The clean three-tier exception pattern in polylogue/sources/source_acquisition.py and polylogue/sources/source_parsing.py is the canonical model — both modules surfaced as exemplars in the audit.
Acceptance criteria
- Each of the four sites has explicit logging (at minimum) plus surfacing in the relevant operational report.
- Site 3 fix preserves content-hash stability: failed-sample paths must produce the same ID as successful-sample paths, or refuse the input loudly.
- Tests cover each site's failure mode (mock the underlying I/O / DDL / decode path to fail; assert observable behavior).
polylogue check(ordoctor) surfaces FTS-trigger drift and vec0-table partial state.- No new
except Exception: passpatterns introduced. Lint candidate: a future grep-based check.
Pattern follow-up
The 4 sites cluster at stage boundaries (acquire→parse, parse→materialize, materialize→index). The pipeline-stage-independence audit (separate report) identifies the meta-pattern: no runtime contract validation between stages. The companion issue for that systemic fix is filed separately as feat(pipeline): runtime stage contract validation.
Related
- Pipeline runtime contract validation (companion fix): file alongside this.
- feat(proof): add product-surface obligation families #421 — proof obligations for these failure modes could be added.
- chore: track post-renewal consolidation and architectural cohesion #401 — post-renewal consolidation umbrella.
Activity
fix(pipeline): four critical silent-failure sites (#453)
fix(pipeline): four critical silent-failure sites (#453)