Skip to content

test: use inference-testing fakes and add e2e retry, base64, live suites - #11

Merged
TheGreatAxios merged 2 commits into
cl-9052-embedding-replace-copied-transport-and-modelrequesterrorfrom
cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with
Sep 27, 2026
Merged

TheGreatAxios merged 2 commits into
cl-9052-embedding-replace-copied-transport-and-modelrequesterrorfrom
cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Stacked on refactor!: replace ModelRequestError with EmbeddingRequestError #10.
  • Units in src/embed.test.ts use setupHarness from @intx/inference-testing; hand-rolled fakes and extractRetryAfterMs units are deleted.
  • tests/retry.test.ts: 429 retried after Retry-After (seconds, past and future HTTP-date, custom extractor) on the harness clock; 401 rejects with EmbeddingRequestError (credential_failure) without retry; timeout.
  • tests/base64.test.ts: base64 and float agree within float32 tolerance over a real HTTP stub.
  • live/embeddings.test.ts (bun run test:live, not in test or CI): 3 texts against a real /v1/embeddings; asserts count, width equals probeEmbedDims, and order; skips unless EMBEDDING_E2E_BASE_URL is set and the server lists the model.
  • CI runs bun run test (src + tests).

Verification

Closes CL-9107
Closes CL-9132
Closes CL-9114
Closes CL-9116
Closes CL-9137

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Independent review of the stack found: bad base64 replies escaped as a raw DOMException or silently truncated vectors; non-integer indices were accepted; duplicate-index and non-JSON-200 coverage was lost; the live suite failed instead of skipping when the model was absent. All fixed in this stack (strict base64 decode, number.integer index, restored harness tests, model-aware skip).

Remaining notes: peer range >=0.4.0 follows sibling convention. Each commit typechecks, tests, and builds standalone.

@TheGreatAxios
TheGreatAxios force-pushed the cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with branch 2 times, most recently from 1d88a30 to 968e955 Compare September 25, 2026 13:58
@TheGreatAxios
TheGreatAxios force-pushed the cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with branch 2 times, most recently from cb7e9ae to bc30dc3 Compare September 25, 2026 15:14
@TheGreatAxios
TheGreatAxios force-pushed the cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with branch from bc30dc3 to 7f8a442 Compare September 25, 2026 17:05
@TheGreatAxios
TheGreatAxios force-pushed the cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with branch 3 times, most recently from 8e6bb1f to aae2e94 Compare September 25, 2026 23:49
@TheGreatAxios TheGreatAxios changed the title Tests on @intx/inference-testing with e2e retry, base64, and live suites Test on inference-testing fakes with e2e retry, base64 and live suites Sep 25, 2026
Units shrink to index placement, short reply, and base64 decode, driven
by @intx/inference-testing instead of hand-rolled fetch/scheduler fakes.
tests/ adds a 429-then-200 retry on the harness clock and a 401 that
does not retry, plus a base64-vs-float check over a real HTTP stub.
live/ adds a /v1/embeddings round trip, run by bun run test:live, that
skips unless EMBEDDING_E2E_BASE_URL is set.

Also closes CL-9132, CL-9114, CL-9116, CL-9137.
@TheGreatAxios
TheGreatAxios force-pushed the cl-9107-embedding-replace-hand-rolled-fetchscheduler-fakes-with branch from aae2e94 to 1787a0a Compare September 26, 2026 01:29
@TheGreatAxios TheGreatAxios changed the title Test on inference-testing fakes with e2e retry, base64 and live suites test: use inference-testing fakes and add e2e retry, base64, live suites Sep 26, 2026
@TheGreatAxios
TheGreatAxios added this pull request to stack #15 September 26, 2026 01:58
@TheGreatAxios
TheGreatAxios merged commit 9eb66c4 into main Sep 27, 2026
1 check 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.

1 participant