Skip to content

fix(logging): add exc_info=True to critical error log sites #725

Closed

Description

@Sinity

Problem

Five logger.error() / logger.warning() calls stringify the exception via %s without exc_info=True, permanently losing the traceback:

File Line Message
pipeline/services/acquisition.py 103 "Failed to scan source"
pipeline/services/acquisition_persistence.py 31 "Failed to store raw conversation"
pipeline/services/ingest_batch.py 1292 "Session product refresh failed (non-fatal): %s"
cli/query.py 291 "Vector search setup failed: %s"
pipeline/services/rendering.py 157 "Failed to render conversation ... %s"

The first two are in the ingestion pipeline where failures are hard to reproduce — losing the stack trace makes root cause analysis nearly impossible.

Additionally, operations/archive.py:518-519 catches Exception and logs at DEBUG level only. In production (default INFO), the failure is invisible and last_sync silently becomes None.

Acceptance criteria

  • All five sites pass exc_info=True to the log call.
  • operations/archive.py:518 promoted to at least logger.warning.
  • Verify tracebacks appear in log output on failure.

Found by

2026-05-03 error handling audit (wave 4 subagent analysis)

Activity

  1. Sinity commented on May 3, 2026

    @Sinity
    OwnerAuthor

    Scope absorbed into #737 (daemon observability gaps). The missing exc_info=True on log calls is part of the observability hardening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions