diff --git a/harness/tests/test_qdrant_cli_commands.py b/harness/tests/test_qdrant_cli_commands.py index 9ccc1894..4ad73271 100644 --- a/harness/tests/test_qdrant_cli_commands.py +++ b/harness/tests/test_qdrant_cli_commands.py @@ -179,3 +179,11 @@ def test_vector_migrate_command_is_absent(): assert res.exit_code != 0 assert "No such command 'migrate'" in res.output + + +def test_memory_solved_index_help_uses_semantic_store_wording(): + res = CliRunner().invoke(app, ["memory", "solved-index", "--help"]) + + assert res.exit_code == 0, res.output + assert "semantic" in res.output.lower() or "qdrant" in res.output.lower() + assert "vectordb" not in res.output.lower() diff --git a/harness/tests/test_taskdoc.py b/harness/tests/test_taskdoc.py index d294ca79..04d4bf87 100644 --- a/harness/tests/test_taskdoc.py +++ b/harness/tests/test_taskdoc.py @@ -45,6 +45,18 @@ def test_task_doc_byte_budget_violation_flagged(tmp_path): assert doc.byte_budget_ok is False +def test_taskdoc_truncates_over_budget(tmp_path): + s = tmp_path / "sess" + s.mkdir() + (s / "question.md").write_text("# Domanda\n" + "x" * 200_000) + + doc = generate_task_doc(session_dir=s, phase=1) + + assert doc.byte_budget_ok is False + assert len(doc.body.encode()) <= 80_000 + assert "troncato" in doc.body + + def test_task_doc_carries_phase_header(tmp_path): s = tmp_path / "sess" s.mkdir() diff --git a/harness/tht/cli/memory_cmd.py b/harness/tht/cli/memory_cmd.py index 5a6850bc..2288ff34 100644 --- a/harness/tht/cli/memory_cmd.py +++ b/harness/tht/cli/memory_cmd.py @@ -465,7 +465,7 @@ def solved_index_cmd( json_out: bool = typer.Option(False, "--json", help="Output JSON (per Pi)."), config: Path = CONFIG_OPT, ) -> None: - """Indicizza la coppia domanda->SQL nel vectordb (backfill; il finalize lo fa da solo).""" + """Indicizza la coppia domanda->SQL nel semantic store (backfill; il finalize lo fa da solo).""" import json as _json from tht.solved import SolvedIndexError