5.5 KiB
5.5 KiB
Task 7 report — mandatory Qdrant and Ollama Compose services
Date: 2026-08-08
Status: completed
Summary:
- Added mandatory private
qdrant,embedding, andembedding-model-initservices to the base Compose stack. - Pinned Qdrant
v1.18.2and Ollama0.32.0by immutable multi-arch digest. - Persisted Qdrant storage in
qdrant-dataand Ollama model cache inembedding-models. - Wired
coreto fixed internal semantic endpoints:THT_INTERNAL_QDRANT_URL=http://qdrant:6333THT_INTERNAL_EMBEDDING_URL=http://embedding:11434THT_INTERNAL_EMBEDDING_MODEL=qwen3-embedding:0.6bTHT_INTERNAL_EMBEDDING_DIMENSIONS=1024
- Removed external vector / embedding endpoint requirements from the local and server env examples.
- Added an idempotent Ollama model bootstrap script that:
- waits up to a bounded deadline for
/api/tags - skips
ollama pullwhen the model is already cached - pulls
qwen3-embedding:0.6bonly when needed - verifies the model appears in
/api/tagsafter pull
- waits up to a bounded deadline for
- Added optional GPU override file
deploy/compose.embedding-gpu.yaml; base Compose remains CPU-only. - Updated
scripts/run-stack.shso the GPU override is included only whenTHOTH_ENABLE_EMBEDDING_GPU=1.
Verification:
- RED confirmed before implementation:
./scripts/test-default-compose.shfailed on missing required services../scripts/test-unified-compose.shfailed on missing required services../scripts/test-internal-semantic-compose.shfailed because the GPU override file did not exist.
- GREEN after implementation:
./scripts/test-default-compose.sh./scripts/test-unified-compose.sh./scripts/test-internal-semantic-compose.shgit diff --check
- Additional shell verification:
scripts/run-stack.sh --waitincludes only base + local Compose files by default.THOTH_ENABLE_EMBEDDING_GPU=1 scripts/run-stack.sh --waitaddsdeploy/compose.embedding-gpu.yaml.
Resolved image digests:
qdrant/qdrant:v1.18.2@sha256:75eab8c4ba42096724fdcfde8b4de0b5713d529dde32f285a1f86fdcb2c9e50collama/ollama:0.32.0@sha256:57f573b47f1f71ebb445789f279fe3e596a8beab182f7cf486db9205bad87c5a
Self-review:
- The first bootstrap-script draft depended on tools not guaranteed inside the Ollama image. This was corrected after image inspection; the final script uses only confirmed image tools (
bash,ollama,grep) plus raw HTTP over/dev/tcp. - The server overlay intentionally replaces most named core volumes with bind mounts, so the unified contract was tightened to require named semantic-cache volumes there while preserving the local/base named-volume checks.
Concerns:
- The model bootstrap waits for Ollama readiness and verifies cache state, but the first real cold-start will still take time to download
qwen3-embedding:0.6b. - The GPU override requests generic Docker GPU capability only; actual GPU availability remains host/runtime dependent and intentionally stays opt-in.
Fix round 1 / 5 — 2026-08-08
Rulings applied:
- Kept the Task 1 boundary intact: schema-v3 remains the only operational workspace descriptor shape.
- Did not restore any external semantic fallback for schema-v2 live sessions.
- Treated
PROJECT_STATE.mdas stale documentation for this point, not runtime truth.
Focused schema-v2 evidence:
- Re-ran the existing targeted registry test:
cd backend && npx vitest run test/workspace-registry.test.ts -t "lists a schema v2 descriptor as migration_required and refuses to acquire it"
- Result: pass.
- Evidence from that test:
- schema-v2 descriptors list as
migration_required acquireSessionRevision("psd-clinical")rejects withcode: "workspace_invalid"
- schema-v2 descriptors list as
- Conclusion: schema-v2 acquisition remains blocked; no external semantic fallback was reintroduced.
Contract consistency fixes:
- Updated
harness/tests/test_local_compose_contract.pyto assert the mandatory internal semantic stack, fixed internal core semantic env, private-service topology, persistent volumes, and Ollama health/dependency contract. - Updated shell Compose contracts to require:
- Ollama healthcheck on
embedding embedding-model-initdependency onembedding: service_healthy
- Ollama healthcheck on
- Updated
scripts/unified-deployment-smoke.shrendered-contract helper to expect the mandatory internal semantic topology and internal semantic env names, and to reject retired external semantic bindings. - Updated
scripts/test-task13-runtime-fixtures.shto exercisetask13_assert_rendered_contractfor both local and server fixture renders.
Fix round 1 verification:
- RED before implementation:
cd harness && .venv/bin/pytest tests/test_local_compose_contract.py -qfailed becauseembeddinghad no healthcheck../scripts/test-default-compose.shfailed becauseembeddinghad no healthcheck../scripts/test-unified-compose.shfailed becauseembeddinghad no healthcheck../scripts/test-task13-runtime-fixtures.sh localfailed becauseunified-deployment-smoke.shstill expectedcore,frontend.
- GREEN after implementation:
./scripts/test-default-compose.sh./scripts/test-unified-compose.sh./scripts/test-internal-semantic-compose.shcd harness && .venv/bin/pytest tests/test_local_compose_contract.py -q./scripts/test-task13-runtime-fixtures.sh local./scripts/test-task13-runtime-fixtures.sh servercd backend && npx vitest run test/workspace-registry.test.ts -t "lists a schema v2 descriptor as migration_required and refuses to acquire it"docker compose --env-file deploy/env/local.env.example -f compose.yaml -f deploy/compose.local.yaml config --format json