Skip to content

fix(engine): index failures must be visible in the activity log - #8

Closed
NestorCanales wants to merge 1 commit into
mainfrom
fix/index-error-visibility
Closed

fix(engine): index failures must be visible in the activity log#8
NestorCanales wants to merge 1 commit into
mainfrom
fix/index-error-visibility

Conversation

@NestorCanales

Copy link
Copy Markdown
Collaborator

Bug

When a file fails to index (extract/chunk/embed/store error), the error went only to process stderr — invisible in the GUI. The Log page reads the activity_log table, which got nothing; the Dashboard progress counter even advanced past the failed file. Users believe everything indexed when it didn't.

Found during the Phase 5 Windows field test: an embedding bug (fixed separately, see the fix/local-embed-token-budget branch) silently dropped 79 of 105 files in a real vault — zero user-visible signal; diagnosing required manually capturing stderr.

Fix

OnDelete already logged failures via logActivity(path, "error", ...) — the four indexing sites (AddDirectory loop, initialScan loop, OnCreate, OnModify) now do the same. stderr logging unchanged (still useful for dev).

Verification

  • New regression test: failing embedder → AddDirectory / OnCreate / OnModify each produce an activity_log error entry — fails on the previous code, passes now.
  • Full suite + vet green.

Independent of the epic PR stack — based on main, mergeable anytime (like #5).

🤖 Generated with Claude Code

IndexFile errors during AddDirectory, initialScan, OnCreate and OnModify
were logged only to the process stderr — invisible in the GUI, whose Log
page reads the activity_log table. A user whose files failed to index got
no signal at all: the Dashboard counted the file as processed and the Log
showed nothing. Found during the Phase 5 Windows field test, where an
embedding bug silently dropped 79 of 105 real-vault files (only tiny
single-chunk files survived) and diagnosis required capturing stderr by
hand. OnDelete already logged its failures via logActivity(path, "error",
...); the four indexing sites now do the same.

Regression test: failing embedder → AddDirectory / OnCreate / OnModify
each must produce an activity_log "error" entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NestorCanales

Copy link
Copy Markdown
Collaborator Author

Consolidated into #2 (single reviewable branch per Bo's review-workflow preference) — all commits from this PR are now in feat/local-embeddings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant