Skip to content

fix(indexing): fail incomplete content indexing - #92

Merged
llbbl merged 1 commit into
mainfrom
fix/75-indexing-exit-status
Aug 24, 2026
Merged

fix(indexing): fail incomplete content indexing#92
llbbl merged 1 commit into
mainfrom
fix/75-indexing-exit-status

Conversation

@llbbl

@llbbl llbbl commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Closes #75

Summary

  • Extract testable indexing orchestration out of the CLI entrypoint.
  • Return exit code 0 only when indexing completes without failures.
  • Keep progress logging and the final indexing summary intact while making partial and thrown failures stop downstream build work.

Changes

Indexing

  • scripts/index-content-runner.ts: Adds a focused indexing runner that returns 0 for full success and 1 for partial results or thrown indexing errors.
  • scripts/index-content.ts: Uses the runner and assigns process.exitCode so CI's existing index-before-build ordering stops before build when indexing is incomplete.

Tests

  • scripts/index-content-runner.test.ts: Covers successful indexing, partial failures, and thrown indexing errors while preserving progress and summary logging.

Validation

  • pnpm format
  • pnpm lint
  • pnpm exec tsc --noEmit
  • pnpm test:coverage --run (165 tests; 94.48% overall line coverage)
  • pnpm db:init:local
  • pnpm index:local (3/3 documents)
  • env TURSO_DB_URL=file:local.db TURSO_AUTH_TOKEN=local pnpm build

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.33%. Comparing base (73e8f84) to head (c0f7095).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #92   +/-   ##
=======================================
  Coverage   89.33%   89.33%           
=======================================
  Files          12       12           
  Lines         300      300           
  Branches       71       71           
=======================================
  Hits          268      268           
  Misses         16       16           
  Partials       16       16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@llbbl
llbbl merged commit 7696229 into main Aug 24, 2026
6 checks passed
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.

fix(indexing): fail when content indexing is incomplete

1 participant