Skip to content

Fix error handling and missing await in ingest pipeline#14

Merged
riccjohn merged 1 commit into
mainfrom
fix/ingest-error-handling
Mar 10, 2026
Merged

Fix error handling and missing await in ingest pipeline#14
riccjohn merged 1 commit into
mainfrom
fix/ingest-error-handling

Conversation

@riccjohn
Copy link
Copy Markdown
Owner

Summary

  • Wrap ora spinner in try/catch so it calls .fail() with the error message instead of hanging on load errors
  • await storeChunks(...) — previously unawaited, so insert errors were silently dropped and the pipeline appeared to succeed
  • Move 🧂 Enriched chunks with metadata log to after loadSpinner.succeed() to avoid corrupting the spinner output
  • Wrap embedChunks progress bar in try/finally so bar.stop() always runs even if embedMany throws

Test plan

  • Run bun run ingest against the vault and verify the spinner, progress bar, and success logs display cleanly
  • Temporarily break a Supabase env var and confirm the spinner shows a failure message rather than hanging

🤖 Generated with Claude Code

- Wrap ora spinner in try/catch so it calls .fail() on load errors
- Await storeChunks so insert errors surface instead of being silently dropped
- Move 🧂 console.log after spinner completes to avoid corrupting terminal output
- Wrap embedChunks progress bar in try/finally so bar.stop() always runs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grimoire-oracle-web Ready Ready Preview, Comment Mar 10, 2026 4:49pm

@riccjohn riccjohn merged commit a28f61f into main Mar 10, 2026
3 checks passed
@riccjohn riccjohn deleted the fix/ingest-error-handling branch March 10, 2026 18:26
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