Repository navigation
fix(memory): split embedding batches rejected for an input array item cap - #139541
vincentkoc merged 4 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 13, 2026, 2:41 PM ET / 18:41 UTC (Revision 6). ClawSweeper reviewWhat this changesMemory Core recognizes explicit input-array count limits and uses its existing batch splitter to recover, with coverage for ordered vectors and terminal validation errors. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused repair: current main and v2026.9.4 do not recognize the reported rejection. No actionable patch defect was found, but the revised candidate still lacks the runtime validation explicitly marked pending in its body. Priority: P2 Review scores
Verification
How this fits togetherMemory Core converts memory and session chunks into vectors for semantic search. Its embedding owner groups provider requests and decides whether failures should retry, split, or stop indexing. flowchart TD
A[Memory and session chunks] --> B[Byte-budgeted batches]
B --> C[Embedding HTTP client]
C --> D{Provider response}
D -->|Explicit item cap| E[Ordered batch splitter]
E --> C
D -->|Success| F[Vectors for indexing]
D -->|Terminal error| G[Indexing failure]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +204. Total +206 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one precise recovery classifier that splits explicit item-count failures while preserving vector order and terminal handling for unrelated errors. Do we have a high-confidence way to reproduce the issue? Yes, from source: more than 64 short chunks can fit the byte budget, and current main rethrows the reported HTTP 400 because its classifier misses the wording. No runtime reproduction was executed in this read-only review. Is this the best way to solve the issue? Yes. Extending the established classifier is a narrow repair that avoids new provider settings, global caps, or competing batching logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f9de0362f7a9. 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 (5 earlier review cycles)
|
… cap Zhipu embedding-3 rejects more than 64 items per request with HTTP 400 code 1214 "input array max 64". The splittable-error matcher only knew two phrasings that put the word "embeddings" before the limit, so the batch retry rethrew instead of halving and the vector index never built. Add the input-array phrasing as a third alternative that still requires an explicit number, and name each provider phrasing above the matcher.
…g transport Drive Memory Core's real batching owner through the real OpenAI-compatible embedding client against a loopback server that rejects more than 64 items with Zhipu's 1214 body: the oversized request is halved into two served requests, vectors return in input order, and a generic 400 without a numeric bound is not split.
0274942 to
0da3937
Compare
|
Rebased onto current |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* commit '28887b564210326174413d0d8ade72b38268d5f3': (1827 commits) fix(qa): bind coverage IDs to producer assertions (#144000) fix(linux): explain FreeBSD desktop setup prerequisites (#147211) fix(memory): split embedding batches rejected for an input array item cap (#139541) test: isolate timing metadata persistence from inherited settings (#147112) refactor(status): retire test-only helper publication (#147071) improve: reduce workspace agent lookup work for large fleets (#147144) refactor(macos): share connect credential selection (#144214) fix(plugins): restore Slack onboarding after core updates (#147109) refactor: share ANSI compatibility matching (#146998) fix(test): settle Models catalog before picker open (#147215) test(ui): reuse panel tab drag fixture (#147250) fix(install): use system Node for FreeBSD CLI setup (#147204) fix(cli): explain MCP probes with no enabled servers (#147216) docs: require UI screenshots in chat and PR (#147263) docs(skills): clarify remote gog OAuth setup for Gateway hosts (#145945) test: replace idle account catalog waits with synchronization (#147228) feat(qa): preserve maturity decision context (#147219) feat(macos): clarify agent activity in native chat (#147197) fix(runtime): complete Bun compatibility follow-ups (#147085) fix(ui): release closed chat panes after queued updates (#147240) ...
* commit 'ac59d5e09eb468dc23cf95e447608b57e71b52af': (176 commits) improve(gateway): avoid redundant startup preflight work (#147285) test(macos): observe readiness cancellation and deadline ownership (#145056) fix(ci): route QA Profile Evidence to its run-status owner test (#147293) fix(install): preserve runtime links when Node validation fails (#147221) test(auto-reply): reuse memory session fixtures (#147262) fix: hide subagent sessions from Activity (#147253) ci: record resources for slow runtime test commands (#147254) fix(update): recognize FreeBSD boot identities in triage leases (#147243) refactor(active-memory): share closing tag line scan (#147031) fix: resume Settings autosave after Reload Config (#147136) fix(cli): keep conversation context after cancellation (#147139) fix(channels): make system-agent approval cards actionable (#147152) refactor: retain shared database handles until their last worker closes (#147246) refactor(slack): share workspace-qualified target resolution (#147024) refactor(msteams): remove duplicate quoted-table test (#147270) fix(qa): bind coverage IDs to producer assertions (#144000) fix(linux): explain FreeBSD desktop setup prerequisites (#147211) fix(memory): split embedding batches rejected for an input array item cap (#139541) test: isolate timing metadata persistence from inherited settings (#147112) refactor(status): retire test-only helper publication (#147071) ...
… cap (openclaw#139541) * fix(memory): split embedding batches rejected for an input array item cap Zhipu embedding-3 rejects more than 64 items per request with HTTP 400 code 1214 "input array max 64". The splittable-error matcher only knew two phrasings that put the word "embeddings" before the limit, so the batch retry rethrew instead of halving and the vector index never built. Add the input-array phrasing as a third alternative that still requires an explicit number, and name each provider phrasing above the matcher. * test(memory): prove input-array batch recovery over the real embedding transport Drive Memory Core's real batching owner through the real OpenAI-compatible embedding client against a loopback server that rejects more than 64 items with Zhipu's 1214 body: the oversized request is halved into two served requests, vectors return in input order, and a generic 400 without a numeric bound is not split. * style(memory): format embedding integration import --------- Co-authored-by: Vincent Koc <[email protected]>
Fixes #139040
What Problem This Solves
Memory indexing stops when an embedding provider rejects an oversized request
with
input array max 64, instead of splitting it into smaller batches.User Impact
Oversized requests can recover through the existing batch-splitting path while
per-item validation errors and token limits remain terminal. Vector ordering and
existing provider retry behavior are preserved. No configuration, schema,
persistent-storage or dependency change is required.
Why This Change Was Made
The reported item-count rejection needs its own precise classification. The new
alternative requires a complete integer and message boundary; generic error code
1214, item/token limits, token suffixes and fractional counts do not qualify.Existing Ark, Qianfan, DashScope and transport alternatives remain unchanged.
The contributor's work and both commits are preserved. The maintainer integration
updates the existing transport harness for current Memory Core candidate and
generation APIs, narrows the matcher, and extends the existing test tables.
Original implementation and HTTP-boundary coverage by @ylcn91.
Evidence
Current candidate:
21e1e78f9a2f1c9a0ddb5beaf6d7ab91b0ddcaca, integrating201f11afefdb19a9c75e9d3542bf7425c80df7a7without rewriting contributor ancestry.Independent source review found no actionable P0-P2 issues; diff checks passed.
Isolated AWS proof on this exact candidate passed:
https://crabbox.openclaw.ai/portal/runs/run_7f17ed57d156
7 passing controls, with 18 tests deliberately unselected. Four terminal HTTP
cases made eight requests instead of one; ten retry cases called twice instead
of once, including the numbered-element token-limit wording.
[100, 50, 50], ordered vectors and one-request terminal errors.had zero failures or skips.
types, lint, dead-export and applicable boundary guards. Candidate hashes were
unchanged, all process trees joined and no evidence was omitted.
Exact-head CI completed green:
https://github.com/openclaw/openclaw/actions/runs/34775024167
Merged through native squash admission as
0afc02335308892d7efa3ccf7d981e912c6dd238.The earlier
3e0078f860ce960389dac2ffdfe4580c44e9bc79attempt stopped at formattingbefore runtime tests; this head adds only canonical import wrapping to that
reviewed integration. No contributor code, tests or configuration ran locally.
The HTTP server is synthetic and reproduces the reported rejection. This is not
a live Zhipu endpoint test, and no provider credentials are used. The issue's
separate scan-eligibility observation remains outside this repair.