Summary
The embedding service has a well-implemented exponential backoff retry strategy (L13500-L13530 in dist/index.mjs) that never executes because MAX_RETRIES is hardcoded to 0.
Root Cause
L13405 in dist/index.mjs:
The retry loop at L13500:
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++)
With MAX_RETRIES=0, the loop runs exactly once (attempt=0), meaning the retry body is dead code. Transient errors (network jitter, 429 rate limits, temporary DNS failures) cause immediate embedding failure.
Impact
Failed embeddings contribute directly to the JSONL/SQLite drift described in #156. When embedding fails, the record is written to JSONL but may not get a proper vector in SQLite, making it unsearchable.
Suggested Fix
1-line change. The backoff logic (L13526-L13530) is already correctly implemented with jitter and exponential delay.
Summary
The embedding service has a well-implemented exponential backoff retry strategy (L13500-L13530 in dist/index.mjs) that never executes because MAX_RETRIES is hardcoded to 0.
Root Cause
L13405 in dist/index.mjs:
The retry loop at L13500:
With MAX_RETRIES=0, the loop runs exactly once (attempt=0), meaning the retry body is dead code. Transient errors (network jitter, 429 rate limits, temporary DNS failures) cause immediate embedding failure.
Impact
Failed embeddings contribute directly to the JSONL/SQLite drift described in #156. When embedding fails, the record is written to JSONL but may not get a proper vector in SQLite, making it unsearchable.
Suggested Fix
1-line change. The backoff logic (L13526-L13530) is already correctly implemented with jitter and exponential delay.