Repository navigation
fix(voyage): keep embedding batch waits within timeout - #111673
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 5:45 PM ET / 21:45 UTC. ClawSweeper reviewWhat this changesThe PR carries one deadline through Voyage embedding-batch polling, clamps the final poll sleep, and aborts a status request when the configured wait budget expires. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain The source-proven timeout defect remains on current Priority: P2 Review scores
Verification
How this fits togetherThe Voyage provider plugin submits remote embedding batches, then polls their status before downloading output vectors into OpenClaw's memory pipeline. This change sits in that polling loop and determines when a pending remote batch stops waiting or makes its next status request. flowchart LR
A[Embedding requests] --> B[Voyage batch submission]
B --> C[Initial batch status]
C --> D[Deadline-aware polling loop]
D --> E{Time remains?}
E -->|Yes| F[Bounded sleep or status request]
F --> D
E -->|No| G[Timeout returned to memory pipeline]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +25, Tests +58. Total +83 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single-deadline repair, add a redacted after-fix transcript from a real Voyage batch using a deliberately short wait budget that shows the status request ends at the deadline, then refresh the exact-head merge result and required checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: on current Is this the best way to solve the issue? Yes for the code direction: a deadline shared by the sleep and guarded status request is the narrowest owner-boundary repair, and the shared HTTP wrapper already propagates abort signals. The remaining gap is real-provider proof rather than a competing implementation design. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 99f9c433be67. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
d49560a to
847bc74
Compare
|
Maintainer verification on exact rebased head
No production fallback, dependency, config, or unrelated changes. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users waiting for Voyage embedding batches could exceed the configured total timeout when the next poll delay or status request was longer than the remaining budget.
Why This Change Was Made
The Voyage waiter now carries one deadline through poll sleeps and status requests, using its existing injected clock/sleep seam and an abort signal for the request. Risk note: an incorrect boundary could stop a still-valid batch early, so the tests cover both the remaining-time clamp and the exact deadline before another status request.
User Impact
Voyage remote embedding batches now stop within their configured wait budget instead of overshooting by another polling or request interval.
Evidence
I drove the real exported
runVoyageEmbeddingBatches()from the branch. The only replacements were its existing upload/status transport and clock/sleep dependency seams. The same harness against the pre-fix source registered a 1000 ms sleep with only 500 ms remaining; the fixed source registers 500 ms:The regression test also advances through the final bounded sleep and verifies that no status request is sent after the deadline.
AI-assisted: Codex helped implement and review the change; the behavior proof and validation above were run manually.
Maintainer real-transport verification (rebased head
847bc74a7ceb256bd83e3c73518c1e39b494b0b4)Ran the actual Voyage embedding owner and shared SSRF-guarded HTTP implementation against a real authenticated localhost provider: multipart file upload → batch creation → pending status HTTP socket → deadline abort; no transport, clock, sleep, or HTTP response was mocked. Every request carried an isolated synthetic bearer credential.
Focused provider and shared-boundary proof:
node scripts/run-vitest.mjs extensions/voyage/embedding-batch.test.ts packages/memory-host-sdk/src/host/batch-runner.test.ts packages/memory-host-sdk/src/host/remote-http.test.ts— 21 tests passed. Fresh Codex Sol xhigh structured review: clean (0.98). Exact-head hosted CI 30719607364: success; Workflow Sanity 30719607356: success.Official provider contract: https://docs.voyageai.com/docs/batch-inference . Detailed reproducible maintainer evidence: #111673 (comment) . Original contributor author/email/July 20 author date and original patch identity are preserved.