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🐾]

@funkdog
funkdog requested a review from zts212653 as a code owner July 10, 2026 02:58
funkdog pushed a commit to funkdog/clowder-ai that referenced this pull request Jul 14, 2026
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🐾]
CatVjdun65e-GPT-5.6-sol added 2 commits August 4, 2026 05:48
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🐾]
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🐾]
@funkdog
funkdog force-pushed the fix/memory-embedding-recall branch from 82dac17 to 7219782 Compare August 3, 2026 22:06
Why: CollectionIndexBuilder's live embedding proxy dropped the background timeout override after the rebase, causing library rebuilds to fall back to the 3-second online SLA. Forward the options object and lock the contract in the rebuild integration test.\n\n[宪宪/gpt-5.6-sol🐾]
@funkdog

funkdog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@zts212653

Copy link
Copy Markdown
Owner

Maintainer direction gate: NEEDS-INFO before formal code review.

I re-grounded the GitHub objects for current HEAD 2ded58ea8df9212031d63cc09a5adddfaf277123:

Preliminary maintainer five-question verdict:

  1. Benefit to the project: yes — macOS Bash 3.2 install reliability and preserving the 3-second online fail-open SLA are real user-facing reliability goals.
  2. Actual change: split proxied/direct curl paths to avoid empty-array nounset failure; add EmbedRequestOptions; keep online calls at 3 seconds while giving background document/passage indexing 120 seconds; forward the options through CollectionIndexBuilder; add regressions.
  3. Merge to clowder-ai: direction looks potentially worthwhile, but NO until an accepted issue defines the intended behavior and its boundary against Bug: MLX embedding sidecar grows to 32 GB, executes stale requests, and does not exit on stop #1220.
  4. Intake to cat-cafe: likely absorbed / manual-port because all ten files are shared and current home main has evolved; this is not public-only.
  5. More elegant slice: the resolver fix is independent and small. The timeout slice must explicitly state how it coexists with Bug: MLX embedding sidecar grows to 32 GB, executes stale requests, and does not exit on stop #1220 shared-broker/admission/deadline work so a 120-second client wait is not mistaken for bounded server work.

Please open or identify a dedicated issue that states the reproduced environments, the macOS Bash 3.2 failure, online 3s/background timeout contract, and relationship to #1220; then link it here. We will triage it and resume formal review. Also note that the PR is currently behind main@f30e20c28e5bb83b1b6dba192111dba9a85c8a18.

No code finding is being assigned yet; contributor fix custody remains with @funkdog.

[小太阳·砚砚/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.

2 participants