fix: close internal semantic review gaps

This commit is contained in:
2026-08-08 23:27:58 +02:00
parent 43d8063922
commit 2c4534d968
18 changed files with 806 additions and 77 deletions
+18 -2
View File
@@ -1,6 +1,6 @@
# ThothII — Project State
> Starting-point snapshot for new sessions. Last updated: 2026-08-08 (Task 13 verification audit).
> Starting-point snapshot for new sessions. Last updated: 2026-08-08 (final review fix round 1).
> Point a fresh session here ("read PROJECT_STATE.md") before substantial work.
## Internal Qdrant + Ollama semantic infrastructure — LIVE 2026-08-08
@@ -14,6 +14,12 @@
- **Semantic contract.** Internal semantic indexing is fixed to `qwen3-embedding:0.6b`,
`1024` dimensions, and cosine distance. Schema-v3 descriptors are operational; schema-v1/v2 descriptors remain `migration_required` until an explicit reviewed migration writes schema version 3. One workspace owns one Qdrant collection, and schema, Evidence, and Memory records
coexist inside that collection with payload `kind` separation.
- **Final review runtime barriers.** Operational routes, retained session pins, and runtime
rendering now require schema version 3 before resolving bindings, readiness, diagnostics, or
Pi. Session admission verifies the exact internal Qdrant collection (dimensions, cosine
distance, and required keyword payload indexes) before Ollama and before manifest persistence.
The Qdrant adapter binds every search/list/delete filter to its constructed workspace identity
and rejects conflicting caller namespaces.
- **Boundary and persistence.** Only DWH and LLM remain external runtime application endpoints.
There are no active external vector or embedding endpoint instructions, bindings, or secrets in
the supported operator manuals. Qdrant remains a derived but persistent semantic index: the
@@ -26,7 +32,9 @@
--confirm-project <name>` requires the exact repeated project confirmation, validates manifest
and archive safety before stopping `qdrant`, stages rollback content, restores in place, and
restarts `qdrant` only if it was previously running. Restore does not migrate legacy workspace
descriptors, rename collections, or repair a semantic-index incompatibility.
descriptors, rename collections, or repair a semantic-index incompatibility. Backup and restore
share one atomic Docker-daemon lock per Compose project/Qdrant volume; contenders fail before
volume resolution, and cleanup removes the lock only when its ownership labels still match.
- **Verification recorded for Task 13 final audit.** On Apple M4 Pro
(`Darwin 25.5.0`, Docker Server `29.6.2 linux/arm64`), harness pytest passed
**819 passed / 4 deselected**; backend Vitest passed **464/464** plus TypeScript and build;
@@ -59,6 +67,14 @@
SQL, L2 legacy fixtures, gitignored task notes, and historical reference notes. No active
schema-v3 operator manual or supported runtime deployment path retains external vector or
embedding endpoint coupling.
- **Final review fix verification.** Backend Vitest passed **477/477** plus TypeScript and build;
harness pytest passed **824 passed / 4 deselected** with the existing 74 warnings; touched Python
files are Ruff-clean. The deterministic backup/restore safety test proves lock ownership,
backup–backup and backup–restore contention, rollback, and cleanup. Internal semantic Compose
and no-deployment-coupling contracts pass. A fresh one-shot unified deployment smoke reached its
pre-existing `thothctl` bad-candidate rollback scenario and failed there before backup/restore;
its exact resource-cleanup proof passed, so this run is recorded as a limitation, not as a
successful revalidation of the earlier Task 13 unified-smoke result.
## Historical snapshots and archived reference notes