Skip to content

test(semantic): ignore HEAD probes in retry mock - #760

Draft
justrach wants to merge 3 commits into
release/0.2.5856from
fix/semantic-retry-fixture-timeout
Draft

justrach wants to merge 3 commits into
release/0.2.5856from
fix/semantic-retry-fixture-timeout

Conversation

@justrach

@justrach justrach commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Draft — exact-head CI pending. The retry fixture's loopback probe failure is fixed and verified locally, but do not merge before the new head's CI and publication preflight are reviewed.

What changed

The retry-only mock ignores up to eight complete HEAD / HTTP/1.1 probes without advancing its scripted HTTP 429 → 503 → 200 responses. The test injects one such probe and asserts it was ignored. The original two-second fixture deadline is restored. No production retry, timeout, transport, retrieval, or ranking code changes.

Why

The intermittent EmbeddingTimeout was not caused by a short deadline. A failing run showed the mock's third accepted request was a 61-byte HEAD / HTTP/1.1, not the third embedding POST. The three-connection mock exited on MissingContentLength; the real POST was left waiting for a response. Extending the deadline to 15 seconds and isolating I/O runtimes both failed because neither prevented an unrelated connection from consuming a scripted response. The mock now skips only the observed root-path HEAD probe, with a finite skip bound; malformed embedding POSTs still fail. The deterministic injected probe exercises that dispatch path.

This test-only fix is separate from the watcher and installer PRs. It does not alter hosted Jina or the 4× ANN candidate pool.

Verification — exact head d2cc4b5ac98e8bac2c060c328667bc225465cca3

  • Local: the targeted retry test passed 1/1 on each of five fresh-cache seeds (11–15), with the injected HEAD / probe and original two-second deadline.
  • Local: zig build --cache-dir .graff/verify/retry-head-probe-full-cache test --summary all — 33/33 steps succeeded; 1,621 tests passed and 13 skipped in this workspace.
  • Local: git diff --check — clean before commit.
  • Remote: exact-head CI pending. Earlier CI passed on the superseded 80771cd head and is not acceptance evidence for this commit.

This PR does not create a version, tag, signed artifact, or deployment. Release publication remains blocked separately by the PR-size preflight gate, live hosted embedding HTTP 530 responses, and macOS signing credentials.

justrach and others added 3 commits September 26, 2026 17:09
The retry fixture's two-second localhost deadline can expire while a busy test runner schedules its server thread, obscuring the intended 429/503-to-success assertion. Use the normal request deadline for this fixture only; the separate stalled-provider test continues to cover deadline cancellation.

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
Keep the test-only timeout self-contained at fifteen seconds, so its intent is visible without resolving a production constant. The retry assertion and production behavior are unchanged.

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
A loopback HEAD / probe can consume one of the three scripted mock connections, leaving the real embedding POST unanswered until its deadline. Ignore only that bodyless probe without advancing the 429/503/200 sequence, inject it in the test, and restore the original fixture deadline. Production retry behavior is unchanged.

Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
@justrach justrach changed the title test: stabilize semantic retry fixture under load test(semantic): ignore HEAD probes in retry mock Sep 26, 2026
@justrach justrach mentioned this pull request Sep 27, 2026
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