feat: harden runtime readiness and session workflow

This commit is contained in:
User
2026-07-14 10:27:25 +02:00
parent 6d7738d538
commit 6dbf93fff9
52 changed files with 1464 additions and 169 deletions
+13 -1
View File
@@ -2,7 +2,7 @@ from pathlib import Path
import pytest
from tht.config import ConfigError, load_config
from tht.config import ConfigError, load_config, workspace_id_from_path
from tht.paths import resolve_workspace_paths
@@ -108,3 +108,15 @@ def test_no_data_root_preserves_legacy_relative_paths(monkeypatch, tmp_path):
assert cfg.paths.sessions == Path("sessions")
assert cfg.paths.artifacts == Path("artifacts")
def test_workspace_identity_resolves_config_symlink(tmp_path):
(tmp_path / "workspaces").mkdir()
workspace = _write_config(tmp_path / "workspaces/local.yaml")
alias = tmp_path / "config/tht.yaml"
alias.parent.mkdir()
alias.symlink_to(workspace)
assert workspace_id_from_path(alias) == "local"
assert load_config(alias)._workspace_id == "local"
assert load_config(alias)._config_source == workspace.resolve().as_posix()