Commit graph

3 commits

Author SHA1 Message Date
zm2231
9954f6fdfd fix: timeout detection, always-on dim validation, test hardening
- Fix timeout detection: AbortSignal.timeout() throws TimeoutError, not
  AbortError. Timeouts are no longer retried (30s fail, not 93s).
- Validate embedding dimensions in both httpEmbed and httpEmbedQuery
  against config.dimensions or the 384d schema default. When DIMS is
  unset, the error says 'Set GITNEXUS_EMBEDDING_DIMS=N' to guide users.
- Centralize test env var cleanup in afterEach via savedEnv snapshot.
- Test mocks use 384d vectors matching schema default.
- 4 new tests: timeout not retried, network retry success, query path
  dim mismatch, unset-dims hint. 23 total, all pass.
2026-03-22 20:21:08 -04:00
zm2231
9baef90ae2 fix: edge case guards, dim mismatch hard-throw, UX label
- Guard against empty endpoint response in httpEmbedQuery (Bug 1)
- Validate response item count matches batch size in httpEmbed (Bug 2)
- Dimension mismatch now hard-throws instead of warn-and-continue (Bug 3)
- Progress bar shows Connecting to embedding endpoint in HTTP mode (UX gap)
- Added 3 tests: empty response, truncated batch, dim mismatch throw
- All 19 HTTP embedder tests pass
2026-03-20 22:27:27 -04:00
zm2231
7dcafb647b fix: address review feedback — timeout, retry, guards, tests
- Add AbortSignal.timeout(30s) on all fetch calls
- Add retry with backoff for 429/5xx (core: 2 retries, MCP: 1 retry)
- Guard initEmbedder() and getEmbedder() to throw in HTTP mode
- Discard cached embeddings on dimension mismatch during incremental re-index
- Add MCP embedQuery retry for transient failures
- Add 16 unit tests covering both core and MCP HTTP paths
- Fix README: concise, accurate env var docs
2026-03-20 01:32:49 -04:00