Files
ThothII/.superpowers/sdd/2026-08-08-internal-qdrant-ollama/task-6-report.md
T

7.0 KiB

Task 6 Report

Date: 2026-08-08

Status: implemented and verified

Summary:

  • Added schema-v3 Qdrant runtime support to the harness config/resource layer and vector factory.
  • Made Qdrant payloads carry workspace_id and workspace_revision on every point.
  • Routed schema and memory bulk indexing through the transport-neutral vector port with canonical hash-based dedup.
  • Kept Evidence canonical on filesystem and Memory canonical in JSONL; Qdrant remains derived/rebuildable.
  • Added focused tests for semantic-kind isolation, shared identity fields, search-pack kind boundaries, and the schema-v3 factory/config path.

Files changed:

  • harness/tht/config.py
  • harness/tht/config_compat.py
  • harness/tht/adapters/factory.py
  • harness/tht/adapters/vector/qdrant.py
  • harness/tht/vectorstore/records.py
  • harness/tht/cli/vector_cmd.py
  • harness/tht/cli/memory_cmd.py
  • harness/tests/test_semantic_kind_isolation.py
  • harness/tests/test_memory_save_one.py
  • harness/tests/test_search_pack.py
  • harness/tests/test_qdrant_vector_store.py
  • harness/tests/test_adapter_factory.py
  • harness/tests/test_config_resources.py

Verification:

  • Focused RED/GREEN task suite:
    • cd harness && .venv/bin/pytest tests/test_semantic_kind_isolation.py tests/test_memory_save_one.py tests/test_search_pack.py -q
  • Relevant harness suite:
    • cd harness && .venv/bin/pytest tests/test_semantic_kind_isolation.py tests/test_memory_save_one.py tests/test_search_pack.py tests/test_qdrant_vector_store.py tests/test_adapter_factory.py tests/test_config_resources.py tests/test_vector_port_contract.py tests/test_corpus_pipeline.py -q
    • Result: 131 passed
  • Changed-file Ruff:
    • cd harness && .venv/bin/ruff check tht/vectorstore/records.py tht/adapters/vector/qdrant.py tht/config_compat.py tht/config.py tht/adapters/factory.py tht/cli/vector_cmd.py tht/cli/memory_cmd.py tests/test_memory_save_one.py tests/test_search_pack.py tests/test_semantic_kind_isolation.py tests/test_qdrant_vector_store.py tests/test_adapter_factory.py tests/test_config_resources.py
    • Result: clean

Concerns / follow-up:

  • memory clear still retains its older direct-vector assumptions and was not expanded in this task because the brief focused on canonical builders and schema/evidence/memory routing through the active Qdrant path.
  • The relevant suite still emits pre-existing warnings (legacy config deprecation in older fixtures, plus existing Pydantic serializer warnings in corpus tests), but they are not introduced by this task.

Fix round 1 (2026-08-08)

Scope:

  • Fixed qdrant-only schema-v3 command gating for vector index-schema, memory promote, and memory index.
  • Replaced memory clear's direct-pgvector-only path with vector-port deletion by kind.
  • Added focused qdrant-only CLI regression tests and refreshed older CLI fixtures to the enforced internal embedding contract.

RED evidence:

  • cd harness && .venv/bin/pytest tests/test_qdrant_cli_commands.py -q
  • Initial result against commit 5e39cfa: 4 failed
  • Failure signatures:
    • ERRORE: sezioni mancanti nel workspace yaml: vector_db o vector_write_rest.
    • ERRORE: sezioni mancanti nel workspace yaml: vector_db.

GREEN evidence:

  • Focused fix suite:
    • cd harness && .venv/bin/pytest tests/test_qdrant_cli_commands.py tests/test_qdrant_vector_store.py tests/test_adapter_factory.py tests/test_config_resources.py tests/test_memory_save_one.py tests/test_search_pack.py -q
    • Result: 51 passed
  • Relevant broader vector/memory/schema/search suite:
    • cd harness && .venv/bin/pytest tests/test_qdrant_cli_commands.py tests/test_qdrant_vector_store.py tests/test_adapter_factory.py tests/test_config_resources.py tests/test_memory_save_one.py tests/test_search_pack.py tests/test_vector_port_contract.py tests/test_adapter_command_regressions.py tests/test_solved_search_cli.py tests/test_schema_introspect_guard.py tests/test_semantic_kind_isolation.py tests/test_corpus_pipeline.py -q
    • Result: 154 passed
  • Ruff on the fix surface:
    • cd harness && .venv/bin/ruff check tht/ports/vector.py tht/adapters/vector/qdrant.py tht/adapters/vector/pgvector.py tht/adapters/vector/thoth_http.py tht/vectorstore/rest_client.py tht/cli/vector_cmd.py tht/cli/memory_cmd.py tests/test_qdrant_cli_commands.py tests/test_solved_search_cli.py
    • Result: clean

Notes:

  • memory clear now deletes derived kind=memory points through the configured writable vector store, while leaving the JSONL registry as the source of truth until the registry file is removed by the command.
  • The broader suite still carries the same pre-existing warnings noted above; this fix round did not add new warnings or failures.

Fix round 2 (2026-08-08)

Scope:

  • Removed the accidental HTTP writer delete_kinds capability expansion from ThothHttpVectorStore and VectorRestClient.
  • Reworked memory clear so schema-v3 Qdrant uses scoped kind=memory deletion, while legacy transports keep the pre-task direct-sync path instead of advertising a nonexistent RPC.
  • Tightened the qdrant-only memory-clear regression to assert the exact ("memory", ["memory"]) delete scope.

RED evidence:

  • Re-review found a transport contract mismatch in fix round 1:
    • ThothHttpVectorStore exposed delete_kinds(...)
    • VectorRestClient exposed delete_kinds(...)
    • but the legacy HTTP writer migration only allowlists delete_vector_generation, not delete_vector_kinds
  • The new regressions added in this round capture that mismatch and the missing qdrant delete-scope assertion:
    • tests/test_vector_port_contract.py::test_http_store_supports_writer_without_reader
    • tests/l0/test_vector_adapter_parity.py::test_http_rest_client_does_not_advertise_nonexistent_delete_kinds_rpc
    • tests/test_qdrant_cli_commands.py::test_memory_clear_accepts_qdrant_only_runtime_config

GREEN evidence:

  • Focused regression suite:
    • cd harness && .venv/bin/pytest tests/test_qdrant_cli_commands.py tests/test_vector_port_contract.py tests/l0/test_vector_adapter_parity.py tests/test_adapter_command_regressions.py -q
    • Result: 53 passed
  • Broader relevant vector/memory/search suite:
    • cd harness && .venv/bin/pytest tests/test_qdrant_cli_commands.py tests/test_adapter_command_regressions.py tests/test_vector_port_contract.py tests/l0/test_vector_adapter_parity.py tests/test_solved_search_cli.py tests/test_qdrant_vector_store.py tests/test_search_similar_kinds.py tests/test_corpus_pipeline.py -q
    • Result: 135 passed
  • Ruff on the changed fix surface:
    • cd harness && .venv/bin/ruff check tht/cli/memory_cmd.py tht/ports/vector.py tht/adapters/vector/thoth_http.py tht/vectorstore/rest_client.py tests/test_qdrant_cli_commands.py tests/test_vector_port_contract.py tests/l0/test_vector_adapter_parity.py
    • Result: clean

Notes:

  • Legacy HTTP/vector-rest deployments do not gain a new destructive RPC surface from this fix; they keep their previous behavior and continue to fail closed for unsupported cleanup.
  • The broader suite still emits the same pre-existing deprecation and serializer warnings already noted above; this round did not introduce new warnings.