refactor(harness): route workflow persistence through repositories

This commit is contained in:
User
2026-07-16 18:01:29 +02:00
parent 259f021313
commit c1cddaa667
30 changed files with 925 additions and 348 deletions
+2 -6
View File
@@ -108,16 +108,12 @@ def test_do_run_offset_zero_path_unchanged(monkeypatch):
def test_preview_session_no_file_resolves_sql_final(monkeypatch, tmp_path, capsys):
"""--session without a positional FILE resolves sql_final.sql via _session_sql_file."""
"""--session without a positional FILE resolves repository SQL text."""
from types import SimpleNamespace
from tht.cli import sql_cmd
sql_file = tmp_path / "sql_final.sql"
sql_file.write_text("SELECT session_resolved")
# Patch _session_sql_file to return our tmp file (no real workspace/DB needed).
monkeypatch.setattr(sql_cmd, "_session_sql_file", lambda cfg, sid: sql_file)
monkeypatch.setattr(sql_cmd, "_session_sql", lambda cfg, sid: "SELECT session_resolved")
captured_sql = {}