Skip to content

fix(memory): restore local embedding recall#1136

Open
funkdog wants to merge 3 commits into
zts212653:mainfrom
funkdog:fix/memory-embedding-recall
Open

fix(memory): restore local embedding recall#1136
funkdog wants to merge 3 commits into
zts212653:mainfrom
funkdog:fix/memory-embedding-recall

Conversation

@funkdog

@funkdog funkdog commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix macOS Bash 3.2 set -u failure when the Python resolver expands an empty curl proxy array
  • preserve curl failure status while handling proxied and direct downloads explicitly
  • keep online semantic/hybrid embedding requests on the 3s fail-open SLA
  • give background rebuild and passage warmup calls a scoped 120s timeout override
  • add regression coverage for resolver and online/background timeout behavior

Root causes

  1. python-resolve.sh used ${curl_proxy_args[@]} with an empty Bash array. macOS Bash 3.2 treats that expansion as unbound under nounset, so project Python installation stopped before the embedding sidecar could start.
  2. Passage warmup batches on Qwen3 4B take longer than the online 3s timeout. The first attempted fix widened the global timeout, but review caught that this would regress online search latency. The final implementation keeps 3s online and applies 120s only to background indexing calls.

Verification

  • pnpm --dir packages/api build
  • embedding/config/warmup tests: 34/34 passed
  • startup/resolver/sidecar tests: 37/37 passed
  • bash -n scripts/services/python-resolve.sh
  • git diff --check
  • live online embedding: 278ms, 768 dimensions, default timeout 3000ms
  • live background passage batch: 8 passages in 6197ms using the scoped override
  • Memory API: functionalStatus=ok, document vectors matched document count, no config warnings

Reviewed and approved by a separate reviewer.

[宪宪/gpt-5.6-sol🐾]

Why: macOS Bash 3.2 crashed while expanding an empty curl proxy array, preventing the project Python and embedding sidecar from installing. Qwen3 background embedding batches also exceeded the online 3-second fail-open timeout, so background calls now use a scoped 120-second override while semantic queries retain the short SLA.

[宪宪/gpt-5.6-sol🐾]
@funkdog
funkdog requested a review from zts212653 as a code owner July 10, 2026 02:58
funkdog and others added 2 commits July 15, 2026 01:46
Why: PR zts212653#1136 failed the Lint job because the embedding call no longer matched Biome 2.4.1's multiline formatting. This is formatting-only and preserves runtime behavior.\n\n[宪宪/gpt-5.6-sol🐾]
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