refactor(harness): renaming prodotto tht (Onda -1)
Thoth (tht) è il prodotto, PSD è il cliente. Nessun riferimento al contesto
clinico nel codice.
Rinomine:
- comando+package nsp→tht (dir nsp/→tht/, 46 import, pyproject entry point)
- gate nsp-gate.js→tht-gate.js (+ rewrite token, relayIfNspFails→relayIfThtFails)
- workspace chirone.{example,test}.yaml→tht.{example,test}.yaml (generici)
- env THOTH_→THT_ (19 var) + NSP_ stragglers (NSP_HARNESS_ROOT, NSP_SESSION)
- commenti/docstring chirone/psdwp3/policlinico neutralizzati ('the reference
implementation', 'the DWH')
Aggiunto [tool.setuptools.packages.find] include=['tht*'] (necessario: l'auto-
discovery rompeva con tht/ + workspaces/ come top-level multipli).
.env operatore aggiornato in-place (prefissi THT_, valori preservati, gitignored).
Verifica: pytest 109 passed, npm test 14 pass, tht phase meta --json OK, zero
residui nsp/THOTH_/NSP_/chirone nel package.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""L2: nsp memory save-one against real pgvector (spec D11, L2).
|
||||
"""L2: tht memory save-one against real pgvector (spec D11, L2).
|
||||
|
||||
Validates D11 end-to-end: a single promoted decision is upserted to the real
|
||||
pgvector via the WRITER key (not a full resync), and a subsequent search_similar
|
||||
@@ -13,18 +13,18 @@ from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
from nsp.memory import MemoryRecord, save_one_memory
|
||||
from nsp.workspace import load_workspace
|
||||
from tht.memory import MemoryRecord, save_one_memory
|
||||
from tht.workspace import load_workspace
|
||||
|
||||
pytestmark = [pytest.mark.l2]
|
||||
WORKSPACE = Path(__file__).resolve().parents[2] / "workspaces" / "chirone-test.yaml"
|
||||
WORKSPACE = Path(__file__).resolve().parents[2] / "workspaces" / "tht-test.yaml"
|
||||
|
||||
|
||||
def test_save_one_upserts_to_real_pgvector(l2_env):
|
||||
"""save_one_memory pushes one row to the real pgvector via the writer key, and
|
||||
a subsequent search_similar retrieves it. Idempotent (re-running upserts >= 0)."""
|
||||
from nsp.vectorstore.embeddings import OllamaEmbeddings
|
||||
from nsp.vectorstore.rest_client import VectorRestClient
|
||||
from tht.vectorstore.embeddings import OllamaEmbeddings
|
||||
from tht.vectorstore.rest_client import VectorRestClient
|
||||
|
||||
ws = load_workspace(WORKSPACE)
|
||||
if not ws.vector_write_rest or not ws.vector_write_rest.api_key.strip():
|
||||
|
||||
Reference in New Issue
Block a user