Skip to content

Indexing failures are swallowed with no file path or error detail #5

Description

@aasis21

Bug

In cmd_index, per-file parsing failures are caught and counted but no detail is recorded:

except (MemoryError, json.JSONDecodeError, OSError, ValueError):
    failed += 1
except Exception:
    failed += 1

When files_failed > 0, there is no way to know which file failed or why. This makes indexing problems effectively undebuggable in production (the scheduled task runs hidden).

Suggested fix

Capture the offending file path and exception message — e.g. log to stderr, and/or store the first N failures in the index_runs.error column (or a new index_failures table).

Affected

  • engram.pycmd_index

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions