feat: glass ui pass
This commit is contained in:
@@ -125,6 +125,29 @@ class TestWebServerEndpoints:
|
||||
assert "hermes_home" in data
|
||||
assert "active_sessions" in data
|
||||
|
||||
def test_get_sessions_uses_only_persisted_cwd(self, monkeypatch):
|
||||
"""Session rows without persisted cwd must not inherit TERMINAL_CWD.
|
||||
|
||||
/api/sessions should reflect per-session DB state, not process/global
|
||||
cwd settings, so workspace grouping stays stable and deterministic.
|
||||
"""
|
||||
from hermes_state import SessionDB
|
||||
|
||||
monkeypatch.setenv("TERMINAL_CWD", "/tmp/global-default")
|
||||
|
||||
db = SessionDB()
|
||||
try:
|
||||
db.create_session(session_id="session-no-cwd", source="cli")
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
resp = self.client.get("/api/sessions?limit=20&offset=0")
|
||||
assert resp.status_code == 200
|
||||
|
||||
rows = resp.json()["sessions"]
|
||||
row = next(s for s in rows if s["id"] == "session-no-cwd")
|
||||
assert row["cwd"] is None
|
||||
|
||||
def test_audio_transcription_endpoint(self, monkeypatch):
|
||||
import tools.transcription_tools as transcription_tools
|
||||
|
||||
|
||||
Reference in New Issue
Block a user