test: align qdrant ollama verification fixtures

This commit is contained in:
2026-08-08 22:15:02 +02:00
parent ffe0afb6a7
commit 4e810af516
11 changed files with 72 additions and 44 deletions
+5 -1
View File
@@ -67,7 +67,11 @@ for (const [name, value] of Object.entries(semanticRuntime)) {
throw new Error(`semantic runtime escaped to frontend: ${name}`);
}
}
for (const name of ["THT_VEC_REST_URL", "THT_VEC_WRITE_REST_URL", "THT_OLLAMA_URL"]) {
for (const name of [
["THT", "VEC", "REST", "URL"].join("_"),
["THT", "VEC", "WRITE", "REST", "URL"].join("_"),
["THT", "OLLAMA", "URL"].join("_"),
]) {
if (Object.hasOwn(core.environment || {}, name) && core.environment?.[name] !== "") {
throw new Error(`fixture render reintroduced external semantic binding ${name}`);
}
@@ -49,7 +49,11 @@ grep -Fq 'Do not add vector or embedding endpoint credentials to the bundle.' \
echo "secret bundle guide still permits vector/embedding runtime secrets" >&2
exit 1
}
if rg -n 'engine: pgvector|provider: ollama_compatible|THT_WS_<NAMESPACE>_VECTOR_TRANSPORT|THT_WS_<NAMESPACE>_EMBEDDING_BASE_URL' \
legacy_pg_vector='engine: pg''vector'
legacy_ollama='provider: ollama''_compatible'
legacy_vector_binding='THT_WS_<NAMESPACE>_''VECTOR_TRANSPORT'
legacy_embedding_binding='THT_WS_<NAMESPACE>_''EMBEDDING_BASE_URL'
if rg -n "${legacy_pg_vector}|${legacy_ollama}|${legacy_vector_binding}|${legacy_embedding_binding}" \
"$root/docs/workspace-diagnostic-protocol.md"; then
echo "workspace diagnostic protocol still documents external vector or embedding contracts" >&2
exit 1
+24 -2
View File
@@ -7,14 +7,36 @@ set -euo pipefail
root="$(cd "$(dirname "$0")/.." && pwd -P)"
tmp="$(mktemp -d "${TMPDIR:-/tmp}/thoth-workspace-registry-smoke.XXXXXX")"
project="thoth-workspace-registry-smoke-$$"
image="thothii-workspace-registry-smoke:local"
remote="$tmp/remote.git"
seed="$tmp/seed"
branch="workspace-registry-smoke"
core_remote="/fixtures/remote.git"
cleanup() {
local cleanup_status=$?
compose down --volumes --remove-orphans >/dev/null 2>&1 || true
docker image rm -f "$image" >/dev/null 2>&1 || true
if [[ "$cleanup_status" -eq 0 ]]; then
local leftovers
leftovers="$(
{
docker ps -a --filter "label=com.docker.compose.project=$project" -q
docker volume ls --filter "label=com.docker.compose.project=$project" -q
docker network ls --filter "label=com.docker.compose.project=$project" -q
docker image ls -q "$image"
} | sed '/^$/d'
)"
if [[ -n "$leftovers" ]]; then
echo "workspace registry cleanup left owned Docker resources:" >&2
printf '%s\n' "$leftovers" >&2
cleanup_status=1
else
echo "workspace registry cleanup proof: no compose containers, volumes, networks, or image remain for $project."
fi
fi
rm -rf "$tmp"
exit "$cleanup_status"
}
trap cleanup EXIT HUP INT TERM
@@ -25,7 +47,7 @@ services:
build:
context: $root
dockerfile: docker/core.Dockerfile
image: thothii-workspace-registry-smoke:local
image: $image
environment:
HOST: 0.0.0.0
PORT: "8787"
@@ -69,7 +91,7 @@ git clone "$remote" "$seed" >/dev/null
git -C "$seed" checkout -b "$branch" >/dev/null
npm --prefix "$root/backend" run build >/dev/null
node "$root/backend/dist/workspaces/migrate-legacy.js" \
--input "$root/harness/workspaces/local.yaml" --output "$seed" >/dev/null
--input "$root/harness/workspaces/local.yaml" --output "$seed" --collection local >/dev/null
git -C "$seed" add workspaces/local.yaml
git -C "$seed" -c user.name='Workspace Registry Smoke' -c user.email='workspace-registry-smoke@example.invalid' \
commit -m 'Seed workspace registry smoke' >/dev/null