From b20272c08482d693037bdb2a875318313b93b514 Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 8 Sep 2026 00:12:14 -0700 Subject: [PATCH] bound Supermemory retrieval smoke runtime --- servers/unraid/supermemory-poc/smoke.sh | 48 +++++++++---------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/servers/unraid/supermemory-poc/smoke.sh b/servers/unraid/supermemory-poc/smoke.sh index 239fa28..d59a8b3 100644 --- a/servers/unraid/supermemory-poc/smoke.sh +++ b/servers/unraid/supermemory-poc/smoke.sh @@ -65,40 +65,24 @@ else fi fi -found=false -for _ in $(seq 1 90); do - curl --fail --silent --show-error --max-time 60 \ - -H "$auth_header" \ - -H 'Content-Type: application/json' \ - --data "{\"q\":\"海棠计划下一步是什么?\",\"containerTag\":\"$container_tag\",\"searchMode\":\"hybrid\",\"limit\":5}" \ - "$base_url/v4/search" >/tmp/search-v4.json || fail 41 search-v4-request - if grep -q '核对原始报告' /tmp/search-v4.json && grep -q 'poc-smoke' /tmp/search-v4.json; then - found=true - break - fi +existing_marker=$(grep -o 'supermemory-poc-google-embedding-2-[0-9]*' /tmp/documents.json | head -n 1) +[ -n "$existing_marker" ] || fail 36 document-marker-missing - curl --fail --silent --show-error --max-time 60 \ - -H "$auth_header" \ - -H 'Content-Type: application/json' \ - --data "{\"q\":\"海棠计划下一步是什么?\",\"containerTags\":[\"$container_tag\"],\"searchMode\":\"hybrid\",\"limit\":5}" \ - "$base_url/v4/search" >/tmp/search-v4-tags.json || fail 42 search-v4-tags-request - if grep -q '核对原始报告' /tmp/search-v4-tags.json && grep -q 'poc-smoke' /tmp/search-v4-tags.json; then - found=true - break - fi +curl --fail --silent --show-error --max-time 15 \ + -H "$auth_header" \ + -H 'Content-Type: application/json' \ + --data "{\"q\":\"$existing_marker\",\"containerTag\":\"$container_tag\",\"searchMode\":\"hybrid\",\"limit\":5}" \ + "$base_url/v4/search" >/tmp/search-exact.json || fail 41 search-exact-request +grep -q "$existing_marker" /tmp/search-exact.json || fail 44 search-exact-no-hit +grep -q 'poc-smoke' /tmp/search-exact.json || fail 45 search-exact-metadata-missing - curl --fail --silent --show-error --max-time 60 \ - -H "$auth_header" \ - -H 'Content-Type: application/json' \ - --data "{\"q\":\"海棠计划下一步是什么?\",\"containerTag\":\"$container_tag\"}" \ - "$base_url/v3/search" >/tmp/search-v3.json || fail 43 search-v3-request - if grep -q '核对原始报告' /tmp/search-v3.json && grep -q 'poc-smoke' /tmp/search-v3.json; then - found=true - break - fi - sleep 2 -done -[ "$found" = true ] || fail 44 search-no-traceable-hit +curl --fail --silent --show-error --max-time 15 \ + -H "$auth_header" \ + -H 'Content-Type: application/json' \ + --data "{\"q\":\"海棠计划下一步是什么?\",\"containerTag\":\"$container_tag\",\"searchMode\":\"hybrid\",\"limit\":5}" \ + "$base_url/v4/search" >/tmp/search-semantic.json || fail 42 search-semantic-request +grep -q '核对原始报告' /tmp/search-semantic.json || fail 46 search-semantic-no-hit +grep -q 'poc-smoke' /tmp/search-semantic.json || fail 47 search-semantic-metadata-missing curl --fail --silent --show-error --max-time 60 \ -H "$auth_header" \